Java News from Thursday, June 10, 2004

I'm pleased to announce the first alpha of XOM 1.0, my free-as-in-speech library for processing XML with Java. My definition of alpha is a lot stricter than most people's. While there are still some flaky parts in the internals to be worked out — the internal URI parsing is a complete hack, and I'd like to remove recursion from the last few methods where it occurs to avoid potential stack overflows in very deep documents — but the API is now considered to be complete and frozen. Code you write to XOM today should not require recompilation against future release, and if a really major flaw is discovered in the API design, I'll try to provide a deprecation cycle first before removing the flawed methods.

The API has changed not at all since 1.0d25. All code that ran with 1.0d25 should not require recompilation to work with 1.0a1. Internal changes include:

In addition several bugs have been fixed and some operations have been sped up. Bradley Huffman is pushing back on the design of the base URI handling, but this is just a really ugly, nasty part of the XML world; and XOM can't help but reflect some of that ugliness. The Infoset, URI, and XML Base specifications really don't say how to handle parts of documents that don't have base URIs. Trying to make this work in a sensible way is like trying to push a bubble out of wall-to-wall carpet. Anywhere I fix the problem, it pops up somewhere else. I tried to push the base URI bubble into the least apparent place I could find, and there I think it's going to stay.


Sun has released Rome 0.1 (alpha), an open source (Apache license) library for parsing, translating, and saving various syndication formats including RSS 0.90, 0.91, 0.92, 0.93, 0.94, 1.0, and 2.0 and Atom 0.3. "The parsers can give you back Java objects that are either specific for the format you want to work with, or a generic normalized SyndFeed object that lets you work on with the data without bothering about the underlying format. Rome is called like this because all feeds lead to Rome." It's not immediately clear if Rome will wo rwill not handle malformed feeds, but since Rome is based on JDOM and Xerces I suspect not.