Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 184489 - [69cat] XML: Request for XSLT 2.0 and XPATH 2.0 support
[69cat] XML: Request for XSLT 2.0 and XPATH 2.0 support
Status: NEW
Product: xml
Classification: Unclassified
Component: XSL
All All
: P2 with 10 votes (vote)
Assigned To: Svata Dedic
Depends on:
  Show dependency treegraph
Reported: 2010-04-19 17:12 UTC by gliesian
Modified: 2013-04-16 17:00 UTC (History)
0 users

See Also:

XSLT Panel Options - Example Suggestion (29.65 KB, image/jpeg)
2010-06-05 01:34 UTC, gliesian

Note You need to log in before you can comment on or make changes to this bug.
Description gliesian 2010-04-19 17:12:51 UTC
It appears as if NetBeans transformations are XSLT 1.0/XPath 1.0 compliant... and not XSLT 2.0/XPath 2.0.  I have validated this by attempting a XSLT 2.0 transform through a right-click of an XML file followed by "XSL Transformation..." and the appropriate settings.

My request is for NetBeans to use XSLT 2.0 and XPath 2.0 compliant transformations.

I couldn't tell for sure, but it appears as if NetBeans uses the JAXP API which
targets XSLT 1.0.

Actually, taking another look... looks like Xalan (XSLT 1.0 target) is utilized as shown from these validation error:

-- Using - default JRE XSLT processor.
-- Unsupported XSL element ''


As far as I could tell, Saxon is the only current open-source implementer of XSLT 2.0/XPath 2.0 standards, along with the Altova commericial products.

Some more notes:

- XSLT 2.0 Specification --

XSL Transformations (XSLT) Version 2.0
W3C Recommendation 23 January 2007


Saxon; The XSLT and XQuery Processor
Saxon is an open source product available under the Mozilla Public License. It provides implementations of XSLT 2.0, XQuery 1.0, and XPath 2.0 at the basic level of conformance defined by W3C.


JSR-000206 Java™API for XML Processing
Version: 1.4
Maintenance Release
16 August 2006
"This specification supports XSL Transformations (XSLT) Version 1.0"

Xalan-Java Version 2.7.1 
Xalan-Java is an XSLT processor for transforming XML documents into HTML, text, or other XML document types.
It implements XSL Transformations (XSLT) Version 1.0 

XT is an implementation of XSLT 1.0


Forum question about JAXP and XSLT 2.0:

- Implementation notes --

XSLT Implementations:
Comment 1 gliesian 2010-04-23 13:52:22 UTC
The ability to directly use XSLT 1.0 and XPath 1.0 implementations, should not be lost when including XSLT 2.0 and XPath 2.0 capabilities in the IDE.
Comment 2 gliesian 2010-05-19 12:28:10 UTC
I pinged a listserver for a list of XSLT 2.0 and XPath 2.0 implementations;  Here's part of the main response:  

>> Can someone please provide me with a list of all XSLT 2.0/XPath 2.0 implementations:

XSLT 2.0/XPath 2.0 vendor implementations
-- Saxon 
-- Altova
-- IBM Websphere
-- Intel SOA Expressway
-- Gestalt (No longer maintained or supported)
-- Mark Logic (possible plans for the future)
-- eXist (possible plans for the future)


IMHO, I would think that Saxon would be the target.. Thanks.
Comment 3 gliesian 2010-05-19 16:43:49 UTC


How can I use another XSLT Processor?

    XSLT processor it located using JAXP 1.1 mechanism.
    It allows you to change it globally for used JRE.
    I tried Saxon 6.5.2. Installation is pretty easy simply unzip and copy saxon.jar to your jre/lib/ext. Saxon seems to be times faster on XPath operations than default Sun's JRE 1.4.1 XSLT processor or Xalan 2.0.X.


As such, perhaps package the libraries with NetBeans... and allow the user to decide which XSLT Transformer to use (e.g., Xalan or Saxon)... NetBeans would provide the dialog box and do the binding behind the scenes.

Comment 4 gliesian 2010-06-05 01:21:23 UTC
Recommended change:

This file:

needs to be adjusted to use an XSLT 2.0 processor (i.e. Saxon) through JAXP.

IMPORTANT: When the user opens up the transformation dialog, he/she should be presented with which version of XSLT/XPath to use (i.e. 1.0 or 2.0).  This is important as there are some features in 1.0 that are no longer supported in 2.0, so the user must have the option to decide.


Comment 5 gliesian 2010-06-05 01:34:28 UTC
Created attachment 99833 [details]
XSLT Panel Options - Example Suggestion
Comment 6 gliesian 2010-06-05 01:35:19 UTC
I've uploaded a rough image as an example of how the XSLT transformation dialog can support both XSLT 1.0 and XSLT 2.0.

Comment 7 argonym 2013-04-16 17:00:41 UTC
This refers to configuring Saxon as XSLT Processor as mentioned in

In addition to copying the saxonXYZ.jar to jre/lib/ext, there is just one step missing for configuring Saxon as the JRE-installation-default XSLT transformer.
In your jre/lib dir create a file with following content:
javax.xml.transform.TransformerFactory = net.sf.saxon.TransformerFactoryImpl

There are other ways of achieving this. See here:

If Saxon has been used for an XSL Transformation in Netbeans the XSLT Processor output will contain:
"Using net.sf.saxon.Controller XSLT processor from file ..."

[Tested with NetBeans 7.3.1 / Saxon-HE 9.4.0 / JRE 1.7.0_17]

So it works without changing anything on Netbeans' side. But at least Netbeans XSL Support website should be complemented with this information.
Still, I support the idea of making the used XSLT processor configurable through Netbeans UI and/or even shipping Netbeans with Saxon as default.

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo