XSLT Compilers

To conclude today's lesson we will take a quick look at XSLT compilers.

One drawback to XLST stylesheets is performance. An XLST processor, such as XALAN, first reads in the XSLT stylesheet and builds an internal structure representing the rules that must be applied. The processor must then read in the XML document, match each element to the defined rules, and generate the required output. All of this takes time.

One way to improve performance is to preprocess the XSLT stylesheet to create a custom program that will transform an XML document in a more efficient manner.

Such a technology is called an XSLT compiler. This is a fast changing area of XSL technology, but the original XSLT compiler, called XSLTC, developed by Sun Microsystems, is now developed and maintained by the Apache project.

Apache provides the XSLTC compiler used to compile an XSL stylesheet into a translet (a set of Java classes). An associated runtime processor is used to apply the compiled translet to an XML document and perform the XML document transformation.

An XSLT translet can be invoked from the command line or included in a developer's application. For more information on XSLTC refer to the Apache XML Project on-line at http://xml.apache.org/xalan-j/xsltc_usage.html.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.226.185.87