Project

Profile

Help

Saxon without JAXP

Added by Anonymous over 17 years ago

Legacy ID: #4107924 Legacy Poster: Alantin (bvoven)

Hi all. Is it possible to call Saxon from a Java class that resides in a web application that uses JAXP without going through JAXP? The application is a pipelining framework and we would like to add an XSLT 2.0 pipe. However, since all stylesheets developed up until now use Xalan-specific extensions, we can't just add Saxon to the web application and have it override the TransformerFactory. Hence my question. Can I call Saxon from within my Java class (not command-line) and use a method that transforms a source document with a stylesheet to a string that can be provided to the next pipe in line? TIA


Replies (2)

RE: Saxon without JAXP - Added by Anonymous over 17 years ago

Legacy ID: #4108240 Legacy Poster: Michael Kay (mhkay)

You can create the Saxon TransformerFactory using new net.sf.saxon.TransformerFactoryImpl() and then you can happily use JAXP interfaces starting from this object knowing that you are using the Saxon implementation; this doesn't stop other parts of the application using Xalan, also via JAXP interfaces.

RE: Saxon without JAXP - Added by Anonymous over 17 years ago

Legacy ID: #4109320 Legacy Poster: Alantin (bvoven)

Doh... thanks, Michael. Sometimes I can't see the POJOs through the specifications forest.

    (1-2/2)

    Please register to reply