You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Brian Young <Br...@sas.com> on 2000/07/31 20:25:59 UTC

Getting the JAXP reference implementation to work with Xalan...

Hello,

I am working on an application that persists its data as XML.  Code is already in place using Sun's JAXP reference implementation of an XML parser to persist and restore this XML.  I am tasked with writing XSLT to transform this XML into a JSP.  I chose to use Xalan as my XSL processor, as Sun doesn't have one ready in the time-frame that I need to finish my work.  I've gotten the transformation of the XML to JSP working, but only from a separate VM.  It is, at this time, using the default Xerces XML parser.

When I try to get the JAXP reference implementation jars (jaxp.jar and parser.jar) and the Xalan/Xerces jars (notably xerces.jar) to co-exist in the VM (my application running) I end up with the XML persistence code that should use the JAXP reference implementation trying to use Xerces instead.  I imagine there are conflicts from trying to have all the jars in the same VM.

I'm mulling over my options, and would like your input.

1)  Make JAXP reference implementation and Xerces exist together peacefully and each only be used when appropriate (JAXP reference for the XML persistence/restoration, Xerces for the transformation to JSP).  Is this possible?

2)  Convert the XML persistence/restoration over to use Xerces.  Right now, the tree that is parsed is a DOM Level 1 tree, not the DOM Level 2 that Xerces likes.  Is that an issue, or will Xerces handle down-level DOM Levels greacefully?  Also there is a significant bit of resistance to do this, as this existing code is stable and working to specification.

3)  Make the XML to JSP code use the JAXP reference implementation rather than Xerces.  It is my understanding that I need to provide a liaison implementation in order to accomplish this.  Does a liaison to the JAXP reference implementation exist yet?  How daunting is such a task?  Lastly, where can one find documentation on the class and interface that must be implemented?  The JavaDoc of those is not enough for me to go by, I'm afraid.

Any thoughts are greatly appreciated.  I'm trying to use Xalan v1.1.D01, by the way.

Thanks,
   Brian Young