XSLT with XPAth 2.0 Expressions and Java

I would like to use XPath 2.0, more precisely a function distinct-values

. I downloaded Saxon Home Edition because it can use XPath 2.0 and XSLT 2.0, but now it moans that it can't use Java stuff.

Cannot find a matching 1-argument function named {http://xml.apache.org/xslt/java}java.text.SimpleDateFormat.new(). Note that direct calls to Java methods are not available under Saxon-HE;

The embedded processor in the JRE has no problem with java expressions. Is there a way to mix Saxon-HE and the default JRE processor? Or is there some free processor that can do both?

Side question: why XPath 2.0 and XSLT 2.0 are so rarely implemented? It's a few years old, but all the big wig processors can't do it ... :-(

+3


source to share


2 answers


If you want to use Saxon 9 features and extension features , you need to use one of the commercial editions, or you need to use the new integrated extension features engine, or you need to use Saxon 9.1 (still available). In terms of formatting dates, XSLT and XPath 2.0 support the xs: date and xs: dateTime schema datatypes, and there are functions to format them, such as http://www.w3.org/TR/xslt20/#format-date . As far as XSLT and XPath 2.0 support goes, XPath 2.0 is a subset of XQuery 1.0, you can find implementations for this besides Saxon. XSLT 2.0 is a complex specification and, for example, there are other implementations from IBM and Intel, but not as open source projects.



+4


source


The answer to the second question (why XPath 2.0 and XSLT 2.0 are so rarely implemented?) Is implied in your first - this is because of the economics of the software market - so many people would like to have everything for free, and that makes it difficult to create a business case for software development ...



If you can't afford £ 50 for a Saxon Professional Edition license, you have the option to use "integrated extensibility features" as Martin suggests, or stick with Saxon-B 9.1 as Dimitar suggests.

+4


source







All Articles