[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Errors with JAXP

Subject: Re: Errors with JAXP
From: "Andrew Welch" <andrew.j.welch@xxxxxxxxx>
Date: Wed, 5 Mar 2008 13:03:55 +0000
Re:  Errors with JAXP
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...


>  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/

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.