S
Sebastian Millies
I need to run an application that will use the latest version
of Xerces/Xalan inside a server that itself depends on a proprietary
JAXP 1.1 compliant XML package.
I can figure out how to load Xalan in my own app classloader etc.,
but I'm having trouble getting the Parser and Transformer factories
to work without influencing my server. It seems one has to set the
following properties as System Properties, which makes them known
in the entire VM:
javax.xml.parsers.DocumentBuilderFactory
javax.xml.transform.TransformerFactory
javax.xml.parsers.SAXParserFactory
However, I only want these properties known inside my application,
i. e. inside the TransformerFactory loaded by my own classloader.
Should I simply go and instantiate
org.apache.xalan.processor.TransformerFactoryImpl
org.apache.xerces.jaxp.DocumentBuilderFactoryImpl
org.apache.xerces.jaxp.SAXParserFactoryImpl
directly in my application, instead of going through
TransformerFactory tFactory = TransformerFactory.newInstance();
etc.?
-- Sebastian
of Xerces/Xalan inside a server that itself depends on a proprietary
JAXP 1.1 compliant XML package.
I can figure out how to load Xalan in my own app classloader etc.,
but I'm having trouble getting the Parser and Transformer factories
to work without influencing my server. It seems one has to set the
following properties as System Properties, which makes them known
in the entire VM:
javax.xml.parsers.DocumentBuilderFactory
javax.xml.transform.TransformerFactory
javax.xml.parsers.SAXParserFactory
However, I only want these properties known inside my application,
i. e. inside the TransformerFactory loaded by my own classloader.
Should I simply go and instantiate
org.apache.xalan.processor.TransformerFactoryImpl
org.apache.xerces.jaxp.DocumentBuilderFactoryImpl
org.apache.xerces.jaxp.SAXParserFactoryImpl
directly in my application, instead of going through
TransformerFactory tFactory = TransformerFactory.newInstance();
etc.?
-- Sebastian