Friday, November 21, 2008

Woodstox: first Release Candidate for 4.0.0 (aka "Woodstox-core-3.9.9-1")

It has been quite a while -- the last major Woodstox release (3.0) was two years ago, and the minor one (3.2) almost a year ago. But now the First Release Candidate of Woodstox 4.0.0 is finally out. It is versioned as 3.9.9-1 to try to make it easier to use versioning facilities of Maven and OSGi bundle resolution (i.e. to avoid these messing up operation when 4.0.0 finally arrives)

So what is new with 4.0.0? Here are the major things that come to mind (for the rest, check out release notes)

Typed Access API

I have already mentioned Typed Access API a few times, since I think it is The Thing with Woodstox 4.0. To quickly recap features, it:

  • Supports reasonable subset of Schema datatypes: Scalars (booleans, ints, long, doubles, QNames), arrays (space-separated ints, longs, doubles) and Binary (base64, with variants including "URL-modified")
  • Supports reading and writing o
  • element content and attribute
  • and does all of above Conveniently AND Efficiently

My hope is that this will be a real boon for data binding; as well as providing alternative for MIME-attachment - based binary data passing. With Woodstox 4.0 you should be able to embed binary data efficiently(-enough) to forgo other workarounds.

Typed Access API is now integral part of Stax2 API, as of version 3.0.0.

W3C Schema Validation

As to Schema validation, well, it has been coming for a while. I suspect many users find it useful; and there have also been some improvements to existing validation support (DTD, RelaxNG) as a result of adding Schema validation.

OSGi support

OSGi support is another things that I am actually quite excited about: OSGi is a great idea in itself, and I am happy that now Woodstox will support it explicitly and hopefully well. OSGi support includes post-processing of bundled MSV jars as well.

Stax2 API (v3.0.0) with bundled Reference Implementation

The Stax2 API has been improved a lot since Woodstox 3.2 (which bundled Stax2 api v2.0.0). For Woodstox 4.0, Stax2 API is provided as a full-featured stand-alone OSGi-enabled reusable artifact. And it also comes with fairly extensive Reference Implementation, which allows for easy/easier implementation of Stax2 by other Stax implementations. StaxMate project, for example, will use it to provide Stax2 adapters that wrap regular Stax 1.0 implementations to offer significant subset of Stax2 functionality. And the Ultra-High-Performance Stax implementation called Aalto will use Stax2 RI to get a fully-featured Stax Event API implementation essentially for free.

Interoperability Improvements

In addition to easier implementation of Stax2 API (which should foster interoperability between Stax implementations) via Stax2 RI, DOM interoperability has also been significantly improved. Namespace-repairing mode works well, text coalescing mode is implemented as well as the Typed Access API methods. Unit test coverage has been upgraded to be comparable to testing of "native" Stax parser/writer functionality, for basic use cases. So you might even consider using Stax2-on-DOM just to be able to access typed data conveniently via Stax2 Typed Access API.

Internal Cleanup

Internally Woodstox-4.0 has been significantly refactored: lots of unnecessary legacy code was killed, some moved to Stax2 RI, and Javadoc comments should be much improved. Also, the baseline JDK requirement was lifted from 1.2 to 1.4 (which enabled some of the cleanup). This should not be a huge change as most users have hopefully migrated to 1.4 and beyond by now. For Woodstox 5.0 baseline will move at least to 1.5, to be able to use Enums, and just a little bit of generics, but for now 1.4 will work fine.

Anything Else?

Above is just the overview, of course -- there are dozens of other visible improvements (check the release notes), as well as significant internal cleanup and refactoring, which should make 4.0 well-maintainable and allow for further improvements.

At this point I am excited about upcoming 4.0.0 release. Especially, if you ever work with actual typed non-textual data (which should be true for most common Woodstox use cases), you really should try out the Typed Access API. You will like the way that works.

... and now I will be off to start work on StaxMate-2.0.0 which will make good use of Stax2 API v3.0.0.

Stay 7un3d!

blog comments powered by Disqus

Sponsored By


Related Blogs

(by Author (topics))

Powered By

About me

  • I am known as Cowtowncoder
  • Contact me at@yahoo.com
Check my profile to learn more.