xsl-list
[Top] [All Lists]

Re: [xsl] Applying XSL transformation to non-xml (but fixed structure) file

2010-06-02 11:21:53
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,

Well, it wasn't Herculean at all -- just a few free hours spent well
three years ago. It was just   *f u n*.

I would agree that probably it *should not* be done in XSLT


Hmm... probably the next step would be to put in jail anyone who does
what "*should not* be done in XSLT"? I guess I have already earned my
life sentence.

Anyway, thanks. To be considered a modern witch, by not anyone else
but Michael Kay himself, is a huge recognition... :)

Michael Kay

Dimitre Novatchev





On Wed, Jun 2, 2010 at 7:19 AM, Michael Kay <mike(_at_)saxonica(_dot_)com> 
wrote:
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

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--





-- 
Cheers,
Dimitre Novatchev
---------------------------------------
Truly great madness cannot be achieved without significant intelligence.
---------------------------------------
To invent, you need a good imagination and a pile of junk
-------------------------------------
Never fight an inanimate object
-------------------------------------
You've achieved success in your field when you don't know whether what
you're doing is work or play
-------------------------------------
I enjoy the massacre of ads. This sentence will slaughter ads without
a messy bloodbath.

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--