documentation examples changes overview quick start installation command-line configuration admin amber clustering caching database deployment ejb 3.0 embedding filters hessian hmtp ioc jsp logging messaging performance quercus/php remoting scheduled tasks security server push servlets third-party troubleshooting virtual hosting watchdog webapp xml and xslt introduction jaxp xml path language (xpath) xslt filter xslt xpath functions | jaxp - specifying xml and xslt implementations
JAXP is a standard interface which supports pluggable XML and XSL implementations. JAXP selects the parser based on system properties. You can set the properties to select a different parser than the default one. By default, Resin will use the JDK's parsers. Other parsers, including Resin's own parsers can be selected with the <system-property> tag.
Usually Resin will use its XML parsers and fast XSLT transformer. Sometimes placement of certain jars in the classpath causes problems. can be used to explicitly set the Resin XML and XSLT implementation classes.<!-- xml --> <system-property javax.xml.parsers.DocumentBuilderFactory= "com.caucho.xml.parsers.XmlDocumentBuilderFactory"/> <system-property javax.xml.parsers.SAXParserFactory= "com.caucho.xml.parsers.XmlSAXParserFactory"/> <!-- xslt --> <system-property javax.xml.transform.TransformerFactory= "com.caucho.xsl.Xsl"/> The Sun JDK 1.5 includes the Xerces and Xalan JAXP implementations packaged under a different name. <web-app> <!-- xml --> <system-property javax.xml.parsers.DocumentBuilderFactory= "com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl"/> <system-property javax.xml.parsers.SAXParserFactory= "com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl"> <!-- xslt --> <system-property javax.xml.transform.TransformerFactory= "com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl"/> </web-app> system-propertyJAXP system properties are used to specify the XML and XSLT implementations that are used. Resin defaults to using it's own XML parsers and fast XSLT transformer. Other implementations are used with the specification of the appropriate system properties and values. Examples of using system-property for commonly used alternative XML parsers and XSLT transformers are in separate sections below. The system property configuration tags can be placed at the web-app or the server level. <web-app> <!-- xml --> <system-property javax.xml.parsers.DocumentBuilderFactory= "..."/> <system-property javax.xml.parsers.SAXParserFactory= "..."/> <!-- xslt --> <system-property javax.xml.transform.TransformerFactory= "..."/> </web-app> <server> <!-- xml --> <system-property javax.xml.parsers.DocumentBuilderFactory= "..."/> <system-property javax.xml.parsers.SAXParserFactory= "..."/> <!-- xslt --> <system-property javax.xml.transform.TransformerFactory= "..."/> </server> jar file placementSetting system properties for alternative libraries requires that the implementation classes, usually in a .jar file, are available in the classpath.
The implementation classes are available for a single web application when the
jar file(s) are placed in
If the <!-- xml --> <system-property javax.xml.parsers.DocumentBuilderFactory= "org.apache.xerces.jaxp.DocumentBuilderFactoryImpl"/> <system-property javax.xml.parsers.SAXParserFactory= "org.apache.xerces.jaxp.SAXParserFactoryImpl"/> <!-- xslt --> <system-property javax.xml.transform.TransformerFactory= "org.apache.xalan.processor.TransformerFactoryImpl"/> Cocoon users may need the following: <system-property org.xml.sax.driver= "org.apache.xerces.parsers.SAXParser"/>
Put your xerces and xalan jar files in Crimson is the xml parser that is included with JDK 1.4. <!-- xml --> <system-property javax.xml.parsers.DocumentBuilderFactory= "org.apache.crimson.jaxp.DocumentBuilderFactoryImpl"/> <system-property javax.xml.parsers.SAXParserFactory= "org.apache.crimson.jaxp.SAXParserFactoryImpl"/>
|