Does Jasper-Reports support Xpath 2.0

For an old Jasper version the question has already been asked. But for version 6.0.3 does Jasper Reports finally supports XPath 2.0?

klas.klassen's picture
Joined: Feb 24 2015 - 5:19am
Last seen: 7 years 11 months ago

1 Answer:

I talked with JR Team in order to better clarify the topic. So currently the version supported is XPath version 1.0.
This because JR relies on Xalan or Jaxen for XPath support. These thirdy-part libraries currently support version 1.0.

Looking at the Jaxen FAQ it seems to be a "strict" decision they made, focusing only on compatibility support:

Which version of XPath does jaxen support? Does jaxen support XPath 2?
jaxen supports XPath 1.0. It does not support XPath 2.0. XPath 2.0 is a very different spec with many things to recommend it and a few things not to like as well. However XPath 2.0 is not compatible with XPath 1.0. It is far from a simple upgrade from XPath 1.0. It has a very different data model, that might well require significant revisions to jaxen's internal data structures, and possibly a very different API as well.
The current release plan focuses exclusively on XPath 1.0 compatibility. Perhaps one day someone will make a branch or fork of jaxen that supports XPath 2. However, this would be a significant undertaking, and so far little interest in this has been shown.
Therefore for the moment we will stay with version 1.0 of XPath.
mrabbi's picture
Joined: Oct 31 2011 - 9:20am
Last seen: 1 week 19 hours ago