The Source for Java Technology Collaboration
User: Password:



Eduardo Pelegri-Llopart

Eduardo Pelegri-Llopart's Blog

JAXP 1.3 sources now at Java.Net!

Posted by pelegri on April 01, 2005 at 12:05 AM | Comments (7)

JAXP is the core API for XML processing in the Java platform. The latest version is JAXP 1.3 which is in bundled in Tiger and is also available unbundled 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.


Bookmark blog post: del.icio.us del.icio.us Digg Digg DZone DZone Furl Furl Reddit Reddit
Comments
Comments are listed in date ascending order (oldest first) | Post Comment

  • I forgot to point out that the sources are available under JRL and JDL, like we did earlier with JAX-RPC, JAXB, and others.

    - eduard/o

    Posted by: pelegri on April 01, 2005 at 10:30 AM

  • Are there good examples of JAXP including the 1.3 additions that include complete source for the examples?

    I have read the article but it does not include complete source. I'm off to look at the Apache project next.

    Thanks,

    Gary

    Posted by: garyfreder on April 04, 2005 at 10:03 AM


  • Perhaps they are at jwsdp-samples? If not, perhaps Neeraj and the team will be willing to post them? - Eduard/o

    Posted by: pelegri on April 04, 2005 at 10:11 AM

  • I went to https://jwsdp-samples.dev.java.net/ and it did not look like there were jaxp samples. There was an example but not the samples I would like to see. Thanks

    Posted by: garyfreder on April 04, 2005 at 10:33 AM

  • there are samples provided with the JAXP 1.3 source code.
    if you download the binary bundle, a "samples" directory is created.
    if you download the CVS source code, there is a "samples" directory in the root directory.

    Posted by: jeffsuttor on April 04, 2005 at 11:12 AM

  • Thanks!

    I was reluctant to download the binary. I had replaced 1.4 with 1.5 to get JAXP and I was not sure what would happened if in installed a standalone version. It looks like they do not conflict.

    I'm looking at the samples.

    Gary

    Posted by: garyfreder on April 04, 2005 at 02:03 PM

  • this link https://jaxp.dev.java.net/Updating.html#java-14
    mentions Using JAXP with version 1.4 of the Java 2 platform
    but the same mechanism should work when using JDK 1.5

    Posted by: neerajbj on April 05, 2005 at 01:07 AM





Powered by
Movable Type 3.01D
 Feed java.net RSS Feeds