[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 15:19:21 +0100
Re:  Applying XSL transformation to non-xml (but fixed
On 02/06/2010 15:07, Ruud Grosmann wrote:
Ruud Grosmann wrote:
Christian Schouten wrote:
Hi all,

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


hoi Christian,

ik antwoord je even rechtstreeks, want ik vloek niet graag in de kerk (de xsl-gemeenschap). Mijn eerste reactie is de vraag waarom iemand een xml tool zou willen gebruiken voor niet-xml-input. Waarom niet een simpel perl- of ruby-scriptje maken (of een andere taal naar keuze)?. Levert een fractie op van de code die je anders nodig hebt. Bovendien gebruik je het juiste hulpmiddel voor de juiste taak.

Heb je een reden dat je dat perse via xslt wilt?

groeten, Ruud


Sorry list,


I meant to send this message off list to Christian, that's why it is not in English.
Anyway, I suggested him to consider to use a tool like perl or ruby. Why use an xml tool for non xml input?



Thanks, I enjoyed deciphering your mail and I think I got the gist of it. ("My first reaction is to ask why anyone an XML tool would want to use for non-XML-input..") The answer is that if it's simple structured data, XSLT is quite capable of handling it, and the other capabilities of XSLT (pattern matching, XML output generation, etc) might well make it the most suitable tool. But if you're writing a parser for a recursive language, then despite Dimitre's herculean efforts to demonstrate that it *can* be done in XSLT, I would agree that probably it *should not* be done in XSLT, but instead should be pre-processed into XML using some other language.


Michael Kay
Saxonica

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

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.
Email
First Name
Last Name
Company
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.