| ||||||||||||||||||||||||||||||||
Resin 3.1 Documentation Examples Changes Overview Installation Configuration Quercus SOA/IoC JSP Servlets and Filters Admin (JMX) EJB Amber Security Performance Hessian XML and XSLT Third-party Troubleshooting/FAQ Introduction JAXP XML Path Language (XPath) XSLT Filter XSLT XPath Functions FAQ Scrapbook |
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. The Resin parsers and transformers
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"/> JDK 1.5 JAXP implementationThe 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> Using alternative XML and XSLT implementationssystem-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 Using Xalan and Xerces<!-- 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 Using CrimsonCrimson 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"/>
|