Beta 5 makes a few small bug fixes and code clean ups, especially in the DOM navigator. It also restires some test files that were inadvertently left out of the Beta 4 distribution.
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. Witha 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.
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 ;-).
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...
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 auxillary implementation detail changes, which shouldn't affect the public API in any way are as follows
Initial beta development cycle. Please see CVS changelogs for up-to-date list of changes.
upper-case()
and lowercase-case()
could well follow the example of
XSLT 2.0
by using the Unicode case mappings