Subject: Re: [xsl] Advantages and disadvantages of XSLT From: "G. Ken Holman g.ken.holman@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Sat, 15 Feb 2025 13:13:59 -0000 |
https://cranesoftwrights.github.io/resources/#xslstyle https://cranesoftwrights.github.io/resources/xslstyle/index.htm http://fgeorges.blogspot.com/2009/02/xslstyle-and-oxygen.html
Hi Folks,
I like XSLT. It is powerful at transforming small- to medium-sized XML documents. A few lines of XSLT code can do what hundreds of lines of Java code does. But XSLT does have disadvantages that one needs to be aware of (and I often forget):
1. XSLT is best suited for input data that is XML-formatted. It can process non-XML-formatted data, but XSLT is clunky at this; there are better languages for that.
2. XSLT is good when the XML is not too large. Recall that an XSLT processor builds an in-memory representation of the entire XML document; a large XML document results in blowing up memory and you get an out-of-memory error--and no amount of additional heap space helps. There is Streaming XSLT to deal with large XML documents. It's okay. Not great. With large XML documents, it is probably better to use SAX with a general-purpose programming language.
3. XSLT has a "limited set of data structures available in the XDM data model." This means that it's difficult--well-nigh, impossible--to implement an XSLT processor--or any processor--in XSLT. On November 3, 2024, Michael Kay wrote: "I have written a number of papers over the years on the potential for writing an XSLT processor in XSLT: see for example
https://www.saxonica.com/papers/xmlprague-2019mhk.pdf
The main difficulty in doing it is the limited set of data structures available in the XDM data model. XSLT has always been designed as a special-purpose programming language rather than a general-purpose language, and writing compilers is not one of those special purposes."
What other advantages and disadvantages does XSLT have?
/Roger
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Advantages and disadvantages , Roger L Costello cos | Thread | Re: [xsl] Advantages and disadvanta, Martin Honnen martin |
[xsl] Advantages and disadvantages , Roger L Costello cos | Date | Re: [xsl] Advantages and disadvanta, Martin Honnen martin |
Month |