Posted by pelegri
on April 1, 2005 at 12:05 AM PST
The JAXP team just posted the sources for JAXP 1.3 to Java.net -- and here is a nutshell summary of what's new in JAXP 1.3...
JAXP is the core API for XML processing in the Java platform.
The latest version is JAXP 1.3
which is in bundled in
and is also available
for older JVMs.
Those implementations were frozen
sometime before the final round of integrations into Tiger
and were overdue for an update with the latest changes
Xerces and Xalan .
The JAXP team just finished
that integration; the sources are available at Java.Net
right now and will be donated
to Apache very soon (tomorrow?).
The integration milestone seems a good excuse to do a quick review of the JAXP 1.3 features.
Neeraj has written a nice article ,
but below is a very brief summary for those in a hurry...
The biggest addition in JAXP 1.3 is the new Schema validation framework. In the older APIs, validation was a feature
of the XML parser used: you requested a validating or non-validating parser (be it SAX or DOM) and there you went. The new Validation API decouples the validation of an instance document from the parsing of the document. This new approach has a number of advantages including reuse of compiled Schemas, support for other schema languages (Relax NG fans will like that), the ability to validate without parsing, like after a transformation or in memory, and others. I always found the old mechanism a bit awkward, so I was very happy to see the new API.
Another substantial addition is a new API for XPath .
The API currently supports XPath 1.0 but it was designed with the intention
of extending it to XPath 2.0 in a future version of JAXP.
The API allows reevaluating expressions in different contexts, support for namespaces, support for variables in XPath expressions, and others.
JAXP 1.3 also includes
some additional XML Schema Datatypes,
support for XInclude ,
a new reset() method to reuse a parser instance,
and a new property to alleviate denial of service attacks
Have fun! If you want to use the features right away, download Tiger or the unbundled implementation at Java.Net.
The unbundled version is based on the same sources as the version in Tiger so it is very stable; I expect builds based on the latest updates from Xerces and Xalan to follow pretty soon.