| Previous | Next
Stylesheet ProcessorsAn XSLT processor is a piece of software that reads an XSLT stylesheet, reads an input XML document, and builds an output document by applying the instructions in the stylesheet to the information in the input document. An XSLT processor can be built into a web browser, just as MSXML is in Internet Explorer 6. It can be built into a web or application server, as in the Apache XML Project's Cocoon (http://xml.apache.org/cocoon). Or it can be a standalone program run from the command like Michael Kay's SAXON (http://saxon.sourceforge.net) or the Apache XML Project's Xalan (http://xml.apache.org/xalan-j/ ). Command-Line ProcessorsThe exact details of how to install, configure, and run the XSLT processor naturally vary from processor to processor. Generally, you have to install the processor in your path, or add its jar file to your class path if it's written in Java. Then you pass in the names of the input file, stylesheet file, and output file on the command line. For example, using Xalan, Example 8-3 is created in this fashion: % For exact details, you'll need to consult the documentation that comes with your XSLT processor. The xml-stylesheet Processing InstructionXML documents that will be served directly to web browsers can have an <?xml version="1.0"?> <?xml-stylesheet type="application/xml" href="http://web.archive.org/web/www.anonymous.com/styles/people.xsl"?> <people> ... TIP: Microsoft Internet Explorer uses |