Using multiple XML/XSLT engines simultaneously in one server

  • Thread starter Sebastian Millies
  • Start date
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top