Book HomeJava and XML, 2nd EditionSearch this book

7.4. Is JDOM a Standard?

More than any other question about JDOM, I am asked whether JDOM is a standard. This is a common question, especially among either those who want to use JDOM (and need justification) or those who don't like JDOM (and need justification). I address some of those issues in this section, so that whatever camp you are in, you know the details about JDOM and its standardization process.

7.4.1. JDOM as a JSR

First and foremost, JDOM is now an official JSR, which is a Java Specification Request. In other words, it is going through the formal standardization process, sponsored by Sun and governed by the JCP (the Java Community Process). You can read all about the JSR and JCP processes at http://java.sun.com/aboutJava/communityprocess/. As for JDOM, it is now officially JSR-102 and can be found online at Sun's web site, located at http://java.sun.com/aboutJava/communityprocess/jsr/jsr_102_jdom.html.

Once JDOM moves through the JCP, probably in late 2001, several things will happen. First, it will receive a much more elevated status in terms of standards; although the JCP and Sun aren't perfect, they do offer a lot of credence. The JCP has support and members within IBM, BEA, Compaq, HP, Apache, and more. Additionally, it will become very easy to move JDOM into other Java standards. For example, there is interest from Sun in making JDOM part of the next version of JAXP, either 1.2 or 2.0 (I talk more about JAXP in Chapter 9, "JAXP"). Finally, future versions of the JDK are slated to have XML as part of their core; in years to come, JDOM may be in every download of Java.

7.4.2. SAX and DOM as Standards

Keep in mind that JDOM isn't getting some sort of elevated status; DOM and SAX are already both a part of JAXP, and so are actually ahead of JDOM in that regard. However, it's worth making some comments about the "standardization" of DOM and SAX. First, SAX came out of the public domain, and remains today a de facto standard. Developed primarily on the XML-dev mailing list, no standards body ratified or accepted SAX until it was already in heavy use. While I am by no means criticizing SAX, I am wary of folks who claim that JDOM shouldn't be used because it wasn't developed by a standards body.

On the other hand, DOM was developed by the W3C, and is a formal standard. For that reason, it has a staunch following. DOM is a great solution for many applications. Again, though, the W3C is simply one standards body; the JCP is another, the IETF is yet another, and so on. I'm not arguing the merits of any particular group; I just caution you about accepting any standard (JDOM or otherwise) if it doesn't meet your application's needs. Arguments about "standardization" take a backseat to usability. If you like DOM and it serves your needs, then use it. The same goes for SAX and JDOM. What I would prefer that everybody do, though, is stop trying to make decisions for everyone else (and I know I'm defending my API, but I get this sort of thing all the time!). Hopefully, this book takes you deeply enough into all three APIs to help you make an educated decision.



Library Navigation Links

Copyright © 2002 O'Reilly & Associates. All rights reserved.