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
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Dan JagelewskiSubject: Flat File fixed width fields variable length records
Author: Dan Jagelewski
Date: 30 Jun 2005 01:05 PM
Encountering problems converting this type of file to XML.

The plan was to take an application flat file, convert to xml and then
apply a style sheet for specific customer requirements.

I made the file fixed width as this seems to be the only way to define
the fields.

I have then made the rows regions in order to define the different lengths and field widths.

How do you introduce new rows and field changes and delete regions?

THanks Dan Jagelewski



Applicationdj
Application file

Postnext
Tony LavinioSubject: Flat File fixed width fields variable length records
Author: Tony Lavinio
Date: 05 Jul 2005 01:16 AM
First, you can define separator characters so that you can use any
delimiters you want between fields - there is no reason to make
everything fixed width.

Second, regions are always fixed in size and based on the absolute
offset from the start of the file. Instead of regions, you want to
use the pattern matching ability. Using the "Add Node and Pattern"
option on the menu, you can filter rows based on regular expressions
and have each row that matches a given pattern produce a specific set
of output elements.

See http://www.stylusstudio.com/SSDN/?action=9&read=3578&fid=23

Postnext
Dan JagelewskiSubject: Flat File fixed width fields variable length records
Author: Dan Jagelewski
Date: 05 Jul 2005 03:53 PM
Tony,

This application file to be converted to XML will never have separators.

Should I use line oriented or fixed width?

Should I use 1 region or define each unique row as a region.

With 1 region I can use the row matching but how do you then define
the fields for this unique row? field definition seems to only work
for a region.

Thanks Dan


Posttop
Tony LavinioSubject: Flat File fixed width fields variable length records
Author: Tony Lavinio
Date: 06 Jul 2005 08:47 AM
I don't think regions are the answer, and unfortunately for regions
with fixed-width fields, we only support the case where the fields
have the same length regardless of pattern.

But perhaps if you can post a sample of the data and the specification,
or send it to stylusstudio (at) stylusstudio.com, we can find a solution
for you.

 
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
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.