xsl-list
[Top] [All Lists]

Re: [xsl] Errors with JAXP

2008-03-05 06:06:58
On 05/03/2008, igutierrez027(_at_)ikasle(_dot_)ehu(_dot_)es 
<igutierrez027(_at_)ikasle(_dot_)ehu(_dot_)es> wrote:
 I am using JAXP to execute XSLT 2.0.

JAXP was considered OT the other day...


 ERROR:  'Unsupported XSL
 element 'http://www.w3.org/1999/XSL/Transform:next-match''

 For the SECOND OPTION of template:

 ERROR:  'Error of sintaxis in '$x/(.,following-sibling::node())'.'

Both are XSLT 2.0 techniques so it's most likely you are using an XSLT
1.0 processor when running the transform using JAXP.

When you do:

TransformFactory.newInstance()

...you'll get the first TransformFactory found on the classpath.

To specify to use Saxon regardless of the ordering of the classpath, use:

System.setProperty("javax.xml.transform.TransformerFactory","net.sf.saxon.TransformerFactoryImpl");

You can set the propery either internally or externally so its easy to
swap in a different JAXP compliant processor at a later date.

If you're happy to have compile time references to Saxon, then just do:

new net.sf.saxon.TransformerFactoryImpl()

Of course Saxon needs to be on the classpath in the first place...
which could be your problem at the moment.

cheers
-- 
Andrew Welch
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>