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)
-> - Opening from and then Saving t... (1)
-> - Please help me find time query... (1)
-> + Need access to the 2007 versio... (2)
-> + Connecting to a iSeries DB2 da... (2)
-> + Windows 7 Enterprise and Stylu... (5)
-> + How do you create a record inc... (2)
-> - How to convert lines with no i... (6)
-> ->How to convert lines with...
-> ->How to convert lines with...
-> ->How to convert lines with...
-> ->How to convert lines with...
-> ->How to convert lines with...
-> + http://www.milyn.org/schema/ed... (3)
-> + Using source configuration fil... (2)
-> + Is there any way that we could... (3)
-> - Water mark problem in PDF Gene... (1)
-> + Conversion file for swift mt10... (4)
-> + Stylus Studio converter error (7)
-> + Help for upgrade (6)
-> + Conversion File for a Header D... (2)
-> + Java Heap Space (9)
-> - Export mappings as text (1)
-> + XQuery, Pipeline generated jav... (2)
-> + Conditional XML Conversion? (2)
-> + iDoc to EDI (2)
-> + Pipeline XSLT Java Problem (6)
-- Previous [661-680] [681-700] [701-720] Next
+ Website Feedback (249)
+ XSLT Help and Discussion (7625)
+ XQuery Help and Discussion (2017)
+ Stylus Studio FAQs (159)
+ Stylus Studio Code Samples & Utilities (364)
+ Stylus Studio Announcements (113)
Topic  
Postnext
Zemer MargolinSubject: How to convert lines with no identification
Author: Zemer Margolin
Date: 06 Jan 2010 06:09 AM
Hello,
I need to convert a txt file which has the following structure:
header line with a specific ID at position 0
transaction lines with no id
trailer line with a specific ID at position 0

this block repeats itself numerous times in the file.
each block contains transactions of one type only.
transactions type within a block is specified in one of the block header fields.
All lines are tab delimited.
how can I convert such file using Stylus?
thanks
Zemer

Postnext
Tony LavinioSubject: How to convert lines with no identification
Author: Tony Lavinio
Date: 06 Jan 2010 09:17 AM
If you create three patterns, two with regular expression matching
rules and one without, the one without will always be used last.

So the header could match, the trailer could match, and everything
else would use the pattern with no regexp.

Postnext
Zemer MargolinSubject: How to convert lines with no identification
Author: Zemer Margolin
Date: 06 Jan 2010 10:14 AM
Thanks.
the problem is, that each transaction type can have different number of fields with different length.
would Stylus be able to "split" each transaction to fields just by using the fact that it's tab delimited?

Postnext
Tony LavinioSubject: How to convert lines with no identification
Author: Tony Lavinio
Date: 06 Jan 2010 05:18 PM
Each different regular expression row can have its own field layout, so yes.

Postnext
Zemer MargolinSubject: How to convert lines with no identification
Author: Zemer Margolin
Date: 07 Jan 2010 01:39 AM
Thanks.
the problem is, that each transaction type can have different number of fields with different length.
would Stylus be able to "split" each transaction to fields just by using the fact that it's tab delimited?

Posttop
Tony LavinioSubject: How to convert lines with no identification
Author: Tony Lavinio
Date: 09 Jan 2010 08:31 PM
If I understand your question, then the answer is "yes".

   
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.