Subject: Re: Errors with JAXP
From: Robert Koberg <rob@xxxxxxxxxx>
Date: Wed, 05 Mar 2008 08:08:16 -0500
|
On Wed, 2008-03-05 at 13:03 +0000, Andrew Welch wrote:
> On 05/03/2008, igutierrez027@xxxxxxxxxxxxx <igutierrez027@xxxxxxxxxxxxx> wrote:
> > I am using JAXP to execute XSLT 2.0.
>
> JAXP was considered OT the other day...
That was what I thinking...
>
>
> > 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
|