Appendix E: Saxon


Overview

Saxon is an implementation of XSLT 2.0 produced by the author of this book, Michael Kay. Recent releases of Saxon also include an XQuery processor. At the time of writing this appendix, Saxon is the only reasonably complete implementation of XSLT 2.0 available (Oracle and Apache have both made it clear that implementations are underway, but have not yet delivered products).

I will refer to the version of Saxon that implements XSLT 2.0 as Saxon 8.0, though you should check the Web site for details on the latest version as releases are frequent. Saxon 8.0 is available in two variants, corresponding to the two conformance levels defined in the W3C specification. The open -source version is available at http://saxon.sf.net/ , and this aims to meet all the requirements for a Basic XSLT Processor-which essentially means an XSLT processor without support for XML Schema. A schema-aware version of the product, which aims to conform to the higher conformance level defined by W3C, is undergoing beta-testing, and will become available as a commercial product from http://www.saxonica.com/ .

There is also an older version of Saxon available, version 6.5.3, which implements the XSLT 1.0 specification. The older version is also available at http://saxon.sf.net/ . This appendix is concerned only with the XSLT 2.0 processor.

Saxon is written in Java and requires JDK 1.4. It should run successfully on any platform that supports this (or a later) Java release, and there are no other dependencies.

Installing Saxon is simple: Create a suitable directory (say c: \saxon) and unzip the distribution file into this directory. Look for the JAR file containing the saxon classes (for example c: \saxon\saxon8.jar) and add this file to the Java classpath. Remember to add the actual JAR file to the classpath, not the directory that contains the JAR file. (The classpath is an environment variable called CLASSPATH. The way you set this depends on your operating system. Under Windows XP, for example, go to Settings/Control Panel/System/Advanced/Environment Variables. If there is already an environment variable called CLASSPATH, click Edit to change its value, adding the new entries separated by semicolons from the existing entries. Otherwise, click New either under User Variables if you want to change the settings only for the current user , or under System Variables if you want to change settings for all users. Enter CLASSPATH as the name of the variable, and a list of directories and/or .jar files, separated by semicolons, as the value.)

Saxon doesn't include its own XML parser. It will work with any parser that implements SAX2. By default it picks up the Crimson parser, which is a standard component of JDK 1.4.




XSLT 2.0 Programmer's Reference
NetBeansв„ў IDE Field Guide: Developing Desktop, Web, Enterprise, and Mobile Applications (2nd Edition)
ISBN: 764569090
EAN: 2147483647
Year: 2003
Pages: 324

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