Change History

Jaxen 2.0.0

Jaxen 2.0.0 (BETA) requires Java 1.5 or later.

The biggest change in 2.0.0 is that the third party models for XOM, JDOM, and dom4j have been marked optional. This avoids many unnecessary dependencies and breaks many dependency cycles. Navigators for JDOM2 and dom4j 2 are available in their respective projects.

Jaxen 2 also fixes one obscure bug in XPath evaluation found through fuzz testing.

The core of Jaxen and the DOM navigator should be fully API compatible with code written to Jaxen 1.1 and later.

Jaxen 1.2.0

Jaxen 1.2.0 now requires Java 1.4 or later and is compatible with Java 9 and later. It no longer bundles any of the org.w3c.dom classes. It also deprecates the org.jaxen.pattern package. It should be fully compatible with code written to Jaxen 1.1. There were also a number of internal changes to account for the demise of codehaus.

Jaxen 1.1.6

Jaxen 1.1.6 fixes several bugs in the handling of IEEE-754 -0.

Jaxen 1.1.5

Jaxen 1.1.5 is now compatible with Maven 3, and has a significantly reduced dependency tree when built with Maven 3. It also fixes one very remote bug in boolean-to-number conversion that has probably never showed up in practice.

Jaxen 1.1.4

Jaxen 1.1.4 is now compatible with Java 7. It also fixes several bugs involving namespace nodes, and variable and function bindings in the presence of the default namespace.

Jaxen 1.1.3

Jaxen 1.1.3 fixes one bug involving non-element nodes and relational operators.

Jaxen 1.1.2

Jaxen 1.1.2 fixes a few assorted minor bugs.

Jaxen 1.1.1

Jaxen 1.1.1 fixes a number of minor bugs.

Jaxen 1.1.1

Jaxen 1.1.1 fixes a number of minor bugs.

Jaxen 1.1

Aside from the version number, 1.1 is identical to beta 12.

Jaxen 1.1 Beta 12

Beta 12 contains a few small bug fixes including the removal of an unintentional Java 5 dependence, some more API documentation, a few small API changes (getIterableAxis now throws an exception rather than returning null on a bad axis constant; getOperator has been pulled up into BinaryExpr rather than its subclasses) and two major API changes:

  • The Visitor interface, VisitorSupport class, XPath2XMLVisitor class, and associated methods have been deleted because they were undocumented, untested, and were tightly coupled to the underlying implementation. They may return in the future if there's demand and if someone volunteers to do or pay for the necessary work to bring them up to the standards of the rest of the code base.
  • The matrix-concat extension function has been removed because its license status was unclear, the originator could not be contacted, and it was undocumented and untested. If someone cares to reimplement it, it could be restored in the future.

Jaxen 1.1 Beta 11

The primary impetus for beta 11 was fixing the build process so it once again generates source bundles. A couple of small, almost cosmetic, bugs were also fixed. If you haven't noticed any problems with beta 10, you can safely skip this iteration.

Jaxen 1.1 Beta 10

Beta 10 fixes an assortment of small issues.

Jaxen 1.1 Beta 9

Beta 9 contains some small optimizations, improvements to the documentation, and minor bug fixes. The license should now be the same across all the files.

Jaxen 1.1 Beta 8

Beta 8 fixes a couple of bugs in XPath evaluation and optimizes the code in several places. The test suite has been expanded.

Jaxen 1.1 Beta 7

Beta 7 fixes a number of important bugs, especially involving operator associativity, the string and substring functions, and the dom4j navigator. The various root exception classes (JaxenException, JaxenRuntimeException, and SAXPathException) and all their subclasses now support Java 1.4 exception chaining even in 1.3 and earlier VMs. The DOM navigator should compile and run in both Java 1.4 and 1.5 (i.e. DOM level 2 and DOM Level 3). Namespace handling in DOM is more accurate. Paths can be begin with parenthesized steps like (//foo)/x. Beta 7 also features a reorganized, more modular test suite and expanded and improved API documentation.

Jaxen 1.1 Beta 6

Beta 6 makes a few small bug fixes and code clean ups, including removing an unintended dependence on Java 1.4. Most importantly it removes a file (IdentityHashMap) that we do not have the right to redistribute. All prior betas of Jaxen 1.1 should be considered tainted, and not redistributed in any way. If your project uses an earlier version, please remove it and replace it with beta 6. Jaxen 1.0 is not affected by any of this.

Jaxen 1.1 Beta 5

Beta 5 makes a few small bug fixes and code clean ups, especially in the DOM navigator. It also restores some test files that were inadvertently left out of the Beta 4 distribution.

Jaxen 1.1 Beta 4

1.1 is a major upgrade that significantly improves Jaxen's conformance to the underlying XPath specs. Even though it's officially a beta, it is a vast improvement over 1.0, and all users are strongly encouraged to upgrade. With a few small exceptions (e.g. the the document() function has moved to the org.jaxen.function.xslt package and the ElectricXML navigator has been deleted) it is backwards compatible with code written to the 1.0 APIs.

The lang() function is now supported.

All queries return nodes in the correct document order, without exception.

ancestor::* and ancestor-or-self::* axes no longer include the document node

NaN is handled properly.

The mod operator works on floating point numbers.

Navigators are now included for XOM, HTML DOM, and JavaBeans. These are experimental and may not be included in the final release.

Jaxen 1.0 FCS

Applied patch submitted by Shawn Bayern to fix the booleanValueOf() method.

Added licenses to each source file and a proper manifest to the build at last ;-).

Jaxen 1.0 RC1

There is now an XPath interface in the org.jaxen package to represent any XPath implementation. So this means that the XPath API of Jaxen is now polymorphic, the same interface can work with any model.

This now means that the org.jaxen.* package represents a purely interface based API to any XPath engine. So it should be possible to implement XPath, FunctionContext, NamespaceContext, VariableContext on any XPath engine if so desired.

The XPath implementation for each model has now got a fully qualified class name. The following code describes how to instantiate an XPath object for each model.

// for DOM
XPath xpath = new DOMXPath( "//foo" );

// for dom4j
XPath xpath = new Dom4jXPath( "//foo" );

// for JDOM
XPath xpath = new JDOMXPath( "//foo" );

The XPath.valueOf() method is now deprecated, XPath.stringValueOf() should be used instead.

Added new extension functions kindly provided by Mark Wilson. They are as follows...

  • upper-case() - converts the first argument to an upper case string using either the default Locale or the Locale specified by the second parameter
  • lower-case() - converts the first argument to a lower case string using either the default Locale or the Locale specified by the second parameter
  • ends-with() - evaluates true if the first string ends with the postfix

Locales can be specified either using a variable which is a Locale object or using an xml:lang style string which specifies the Locale via a language together with an optional country and variant such as 'fr', 'fr-CA' or 'es-ES-Traditional_WIN'. e.g.

upper-case( @foo, $myLocale )
upper-case( /foo/bar, 'fr' )
lower-case( foo, 'fr-CA' )
upper-case( @foo, 'es-ES-Traditional_WIN' )

The translate() function is now implemented - thanks to Jan for that!

Some auxiliary implementation detail changes, which shouldn't affect the public API in any way are as follows

  • The org.jaxen.JaXPath class has been removed. Now that we have an org.jaxen.XPath interface it's no longer required.
  • The org.jaxen.expr.XPath class has been renamed to org.jaxen.expr.XPathExpr to avoid confusion and to use a more consistent name. Similarly the DefaultXPath class has been renamed to DefaultXPathExpr as well.
  • The very confusing jaSelect*() methods have gone from JaXPath and BaseXPath. All evaluation methods can take a Context object, null, a node or a node set.

Jaxen 1.0 beta 8

Initial beta development cycle. Please see CVS changelogs for up-to-date list of changes.

To Do List

  • Implement a GenericXPath which could use reflection on the nodes passed into it to choose the Navigator to use. So the same GenericXPath instance could be used to evaluate XPaths on any object. This feature would be particularly useful in JSTL since it would allow web developers to mix and match any all XML models.
  • Jaxen is already pretty fast, but we are sure it could use some more tuning.
  • selectSingleNode() and possibly the *ValueOf() methods should be return-fast as a performance improvement. For example selectSingleNode( "//foo" ) on a document with lots of <foo/> elements would actually create a full node-set of results then extract the first element - rather than just returning as soon as the first one is found.
  • Better user guides and examples!
  • Any Locale specific functions, such as upper-case() and lowercase-case() could well follow the example of XSLT 2.0 by using the Unicode case mappings

Known problems

  • The id() function is not implemented for most models, though it works fine for W3C DOM.