Chapter 17. XSLT


Extensible Stylesheet Language Transformations (XSLT) is provably Turing complete. That is, given enough memory, an XSLT stylesheet can perform any calculation a program written in any other language can perform. Note, however, that XSLT is not designed as a general-purpose programming language, and attempting to use it as one inevitably causes pain ( especially if you're accustomed to procedural languages like Java instead of functional languages like Scheme). Instead, XSLT is designed as a templating language. Used in this manner, it is extremely flexible, powerful, and easy to use. But you do have to recognize what it is and is not good for. You could calculate Fibonacci numbers in XSLT, but Java will do a much better job of that. You could write a Java program to convert DocBook documents to XHTML, but XSLT will make the task much easier. Use the right tool for the right job. Fortunately, you can combine XSLT stylesheets with Java programs so that each tool can be applied to the parts of the job for which it's appropriate.



Processing XML with Java. A Guide to SAX, DOM, JDOM, JAXP, and TrAX
Processing XML with Javaв„ў: A Guide to SAX, DOM, JDOM, JAXP, and TrAX
ISBN: 0201771861
EAN: 2147483647
Year: 2001
Pages: 191

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net