[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Applying XSL transformation to non-xml (but fixed

Subject: Re: Applying XSL transformation to non-xml (but fixed structure) file
From: Michael Kay <mike@xxxxxxxxxxxx>
Date: Wed, 02 Jun 2010 12:32:28 +0100
Re:  Applying XSL transformation to non-xml (but fixed
On 02/06/2010 11:32, Christian Schouten wrote:
Hi all,

I need to apply an XSL transformation to a non-xml file that has a fixed
The goal is to read in the file, add/edit/delete a record and write it

A sample file (start to finish) is as below:

It's very hard to judge from one sample file what is the range of possible inputs that your program needs to deal with; in particular, whether you can get by with a simple line-by-line analysis using regular expressions, or whether you need to do full recursive parsing based on a BNF grammar. Superficially, it looks like the second case, but I might be misjudging. The answer to this question fundamentally affects the design approach you adopt. In the second case, I would recommend writing a parser for the input format (perhaps using a tool such as JavaCC) that converts it into XML, and then write the XSLT transformation to process the resulting XML.

Michael Kay

Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.