For now jd.xslt supports these parser types:
Parser | Type | Location |
Crimson from Apache | SAX 2 | http://xml.apache.org/crimson/index.html Note: JDK 1.4 already contains Crimson |
Xerces from Apache | SAX 2 | http://xml.apache.org/xerces-j/index.html |
Ælfred from Michael Kay's Saxon | SAX 2 | http://saxon.sourceforge.net/ |
Oracle XDK | SAX 2 | http://technet.oracle.com/tech/xml/xdk_java/content.html |
XPP3 from Aleksander Slominski | Pull Parser | http://www.extreme.indiana.edu/soap/xpp/ |
If you want to deploy Xerces or Crimson, then you are already done, since jd.xslt automatically recognizes and uses these parsers if not explicitly directed to another parser.
Parser | Java Class |
Crimson from Apache | org.apache.crimson.parser.XMLReaderImpl |
Xerces from Apache | org.apache.xerces.parsers.SAXParser |
Ælfred from Michael Kay's Saxon | com.icl.saxon.aelfred.SAXDriver |
Oracle XDK | oracle.xml.parser.v2.SAXParser |
Pull Parser | org.xmlpull.mxp1.MXParser |
-parser
, -parserxml
and -parserxsl
which let you specify the parser used to parse the input documents and/or
the stylesheet documents. For further details jump to command-line page.
jd.xml.xpath.model.parser
to the desired parser
class when starting up the Java virtual machine:
java -Djd.xml.xpath.model.parser=myxml.MyParser ...
As an alternative in case you are using a SAX 1 or SAX 2 parser you can also set the system property
org.xml.sax.driver
. The advantage is that its a standard way to configure the
default SAX parser class so other programs could use this information too:
java -Dorg.xml.sax.driver=myxml.sax.MySaxParser ...
javax.xml.transform.sax.SAXSource
to pass a SAX Parser to the stylesheet (see method SAXSource.setXMLReader
) when
you specify the stylesheet or input source.setParser
allows you to pass a parser along with the input source.