XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Conferences Close Tree View
+ Stylus Studio Feature Requests (1192)
- Stylus Studio Technical Forum (14621)
-> - More flexible generated Java c... (1)
-> + Generic Schemas for representi... (2)
-> + Stylus Studio Professional rep... (2)
-> + XML XML Help (2)
-> + xsd help (2)
-> + XML data element friendly name... (2)
-> + HTML Tidy adapter is missing? (3)
-> + New Guy Here... (2)
-> + How to combine two similar fil... (2)
-> + Berkeley XML DB (4)
-> + What is the context node in th... (3)
-> + Multi element List (4)
-> + Cannot preview XSL transformat... (9)
-> + Why is this variable not showi... (7)
-> + Customising Schema Prefix (3)
-> + Please help!! XML AND XSL Tra... (6)
-> + XML to Excel in Home Edition (2)
-> + how to copy elements from an x... (2)
-> + Setting Saxon parameters in pi... (2)
-> + Trying to move SS license (3)
-> + Does SS PRO Support CSS (2)
-> + Selected values are not showin... (3)
-> + Copy Xpath To Clipboard Option... (2)
-> + Upgrading to SS 2006 3 - Activ... (3)
-> + XSL Efficiency tips (4)
-> - Report page Size and table hea... (1)
-> + Endless loop with xquery (8)
-> - Xpress XML (1)
-> + Extracting XML data into SQL s... (2)
-> + Crashes when I save (2)
-> + XSL cannot save: I/O error...b... (8)
-> + Diagram view has disappeared f... (5)
-> + Convert from http://www.w3.org... (2)
-> + Round-trip Converting; CSV-XML... (2)
-> + XSL error function call PHP (8)
-> + WYSIWYG XSLT Designer (5)
-> + generate xhtml+css from xml re... (2)
-> + generate xhtml+css from xml re... (3)
-> + generate xhtml+css from xml re... (2)
-> - Help using xsd xs:redefine nee... (1)
-> + Data loss opening External sch... (2)
-> + Install Apache FOP Plugin with... (8)
-> + Generating a Publisher Canvas ... (2)
-> + Stylus Studio comment block no... (3)
-> + Report Designer Screen Repaint... (5)
-> + validating on values (5)
-> + reuse of xslt (2)
-> + The evaluation period for the ... (2)
-> + export to documentation (3)
-> + Validating XML files using sev... (2)
-> + Missing 'Command' Tab in Custo... (3)
-> + Do I have to download new vers... (6)
-> + Can SS validate tags used in a... (5)
-> + validating schemas (2)
-> + Off-Topic Question - Looking f... (4)
-> + cannot see anything in mapper ... (2)
-> + Validating XSD schema sets (7)
-> + Standard Validation Engines (3)
-> + Style Sheet amendment to inclu... (2)
-> + Documentation - prevent import... (3)
-> + Debugging breakpoints with Sax... (17)
-> + Conversion (3)
-> + New and I am sure this is an e... (7)
-> + Saxon 8 with multiple xml inpu... (3)
-> + Compilation error (5)
-> + webservice call failing - pls ... (3)
-> + C# from Java Binding Classes (3)
-> + Java binding class generation (5)
-> + Validation of deeply-nested sc... (5)
-> + How to make Drag and drop in X... (2)
-> + Malformed XPATH expression par... (5)
-> + Toolbars and missing options (4)
-> + Converting Text File (2)
-> + Java Heap Issue (2)
-> + Formatting SOAP messages (6)
-> + Attribute Entity Expansion on ... (2)
-> - Text File to xml conversion wi... (9)
-> ->Text File to xml conversi...
-> ->Text File to xml conversi...
-> ->Text File to xml conversi...
-> ->Text File to xml conversi...
-> ->Text File to xml conversi...
-> ->Text File to xml conversi...
-> ->Text File to xml conversi...
-> ->Text File to xml conversi...
-> + Different XPath results when u... (7)
-> + Where is my XSLT mapper module (3)
-> + Where is my XSLT WYSIWYG Edito... (2)
-> + Regarding Stylus support of IA... (2)
-> + Debugging Problem with Enterpr... (5)
-> + various report designer prob;e... (12)
-> - will it EVER get fixed ?? Stru... (1)
-> - Migrate from wysiwyg xslt edit... (1)
-> + Entity Resolver in UI? (4)
-> + Visual Studio and Stylus Studi... (2)
-> + how to get rid of parameter in... (8)
-> + XQuery file (2)
-> + 505 error calling a WS from SS... (2)
-> + Configure Subversion with Styl... (2)
-> + XSLT Mapping of xsi:nil and xs... (2)
-> + Printing values in a table or ... (2)
-> + query on using stylus API for ... (12)
-> + WSDL retruns no response (2)
-> + SS XSL Processor Bug: Count() (6)
-> + Stylus Studio crashes after re... (2)
-> + Custom Converter in IBM JVM is... (10)
-> + Malformed XPATH epressions on ... (4)
-> - XML Report table borders when ... (1)
-- Previous [1501-1520] [1521-1540] [1541-1560] Next
+ Website Feedback (249)
+ XSLT Help and Discussion (7625)
+ XQuery Help and Discussion (2016)
+ Stylus Studio FAQs (159)
+ Stylus Studio Code Samples & Utilities (364)
+ Stylus Studio Announcements (113)
Topic  
Postnext
Thomas DorganSubject: Text File to xml conversion with groups
Author: Thomas Dorgan
Date: 14 Jun 2007 03:03 PM
In the Create Custom xml Converter module, I cannot find a way to set hierarchical levels in the xml output. For instance, making a name-address group in the detail loop. I believe I have to do a flat conversion and add the grouping (like the EDI adaptor does) using a secondary xslt. Is there any way to do this in one step using the converter definition? (by the way, my current file is a fixed-length format IDOC file.)

Postnext
Ivan PedruzziSubject: Text File to xml conversion with groups
Author: Ivan Pedruzzi
Date: 14 Jun 2007 04:04 PM
Hi Thomas,

Could you please provide a complete example that shows what you are trying to accomplish?

Thanks!
Ivan Pedruzzi
Stylus Studio Team

Postnext
Thomas DorganSubject: Text File to xml conversion with groups
Author: Thomas Dorgan
Date: 14 Jun 2007 04:45 PM
I am attaching an IDOC file. What I need is the looping in the xml file like the attached xml file. I used a different method to parse it into xml and added the loops with an xslt. I want to change to the Stylus Studio adapter and have the looping added with the adapter. I am also attaching an EDIFACT file in xml form. (Notice the use of groups). If I can get a file that is similar in structure it would make data transforming manageable.

If you need more, please let me know.


DocumentLoopFiles.zip
Sample Files

Postnext
Thomas DorganSubject: Text File to xml conversion with groups
Author: Thomas Dorgan
Date: 21 Jun 2007 09:56 AM
I see from Stylus Studio Technical Forum » Converting Text File, Tony Lavinio stated, "There is no 'loop'
mechanism." The standard adaptors have this feature. This is not a difficult task as it is done by any EDI translator I have ever used when building a file definition. If there is a way to open a standard adaptor (like the EDI converter), as a .conv file, I am sure I could use that to build a converter with "looping".
This is an integral part of defining a file. Without it, it is difficult to build an xslt (though not impossible).

Please let me know wht this deficiency has not been addressed when you are on release 8.

Postnext
Tony LavinioSubject: Text File to xml conversion with groups
Author: Tony Lavinio
Date: 21 Jun 2007 12:04 PM
You misunderstood.

'regions' are not the mechanism you want to use. Regions do not loop.
They are for physical partitions of the file.

What you want to use is the pattern matching feature. Your file only
has one region, but many different record layouts.

First, open the file as fixed-width, and choose as the
'Line Terminator' the value LF.

Then, for each unique row structure, right-click on the row
and choose 'Add Node and Pattern'. This will let you enter a
regular expression that uniquely matches lines of that layout,
and you can then create fields within that line by using the
right-click and 'Begin Field in This Column' choice. You can
also name those fields.

The node/patterns will be applied within the region as they
are seen.

See http://www.stylusstudio.com/docs/v2007R2/d_flatfileconversion35.html
for more details.

Postnext
Thomas DorganSubject: Text File to xml conversion with groups
Author: Thomas Dorgan
Date: 21 Jun 2007 02:01 PM
Okay, let's start again. I am attaching 2 files. One is a text extract of a file definition created in the Gentran translator. it will show you the structure of the converter I need to build. It has grouping, that defines the looping characteristics of the file. It also shows the pattern match.
The other file is a 3pl Oracle flat file. The Record Identifier is at offset 92. When I try to build a converter using the Record Number I get erroneous matches. The only way to uniquely identify the records is using the characters at offset 92. Otherwise, when I look for the 0070 record, for instance, record 1000 is a match for 0070 (the previous record type) because it contains the date 20070509.
So there are actually two problems with this method; no way to identify the exact characters to read for the match test and the lack of a means to set hierarchical levels (looping structures) within the file.


UnknownPOO6786.3pl


Unknown3plFileDefinition.txt

Postnext
Tony LavinioSubject: Text File to xml conversion with groups
Author: Tony Lavinio
Date: 22 Jun 2007 09:23 AM
The way to match something that isn't at the start of the record
is to use something like "^.{89}XYZ" which means 'from the start
of the row (^) match any 89 characters (.{89}) and then, match
only the literal XYZ (XYZ)'.

For hierarchies, we went in a different direction. Rather than
trying to make the Custom XML Converter system do everything, it
does one thing - that is, it converts input to XML.

We depend on XQuery or XSLT to take the output from that step
and reorder or group according to the final requirements. This
way, those languages can be used for what they are good at, and
users can take full advantage of the mapper functionality present
and refined within them.

Either the Pipeline designer can be used to pull the pieces together,
or the input specified to the XQuery or XSLT can be of the form:
converter:myconverter.conv?file:///c:/myoriginalfile.txt

Postnext
Thomas DorganSubject: Text File to xml conversion with groups
Author: Thomas Dorgan
Date: 22 Jun 2007 03:20 PM
The pattern match worked. I have been building xslt's to add loops to the input document, but I have been using a template match to do so. If I convert the input format to a schema and edit the schema and edit the schema with hierarchies, it may work better. The issue I have had is with ptional records at the beginiing or end of a group. I will work out a better solution for this.

Thank you.

Posttop
venessa KentSubject: Text File to xml conversion with groups
Author: venessa Kent
Date: 25 Jul 2007 09:41 AM
Hi Thomas,

I think i have the solution you are looking for to solve this problem adn other porblems you have posted on other threads..

Can you please send me your email address (use my email below)

Regards,
Venessa kent
contact me: stylus.xpert@gmail.com

   
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.