[jdom-interest] JDOM2 Update.
jdom at tuis.net
Thu Oct 6 07:42:19 PDT 2011
I have decided to fix and backport issue #2 and issue #48 as well to
1.1.2. This is going to affect the release timeline of the 1.1.2 code.
As a result, the current tag jdom-1.1.2 in github is going to be moved.
Please don't rely on it.
Issue #48 ( https://github.com/hunterhacker/jdom/issues/48 ) is only
recently found. It has a simple fix that is easy to back-port.
Issue #2 ( https://github.com/hunterhacker/jdom/issues/2 ) should always
have been back-ported, but it somehow slipped through the cracks when I was
looking for issues to backport. I think it's because it was on 'page 2' of
the issue list, and it has a lot of comments that are somewhat complicated
to get your head around.
I like the fix proposed by Brad, but even though the suggested fix is
actually simpler than the current code, it 'reverses' the way JDOM thinks
about the QName and localName values for both Element and Attribute names.
As a result it is a little more complicated to back-port and test. It is
compounded by the issue #1 (defaulted/fixed attributes in a Namespace) fix
which makes that area of code more complex.
I am trying to put together a table of what to expect from a SAX parser
when the three main configurations are used: not-namespace-aware,
namespace-aware, and namespaces-with-prefixes
JDOM does not support not-namespace-aware SAX parsers, but it should
support the other two modes. The way I see it is that issue #2 is actually
caused by JDOM messing up the assumptions on what data is provided in the
two different supported SAX modes. Further, technically SAX Parsers only
need to 'optionally' support the namespaces-with-prefixes mode, and JDOM
assumes that all parsers do. The different modes of operation set different
expectations on what values are passed in to the SAX 'startElement' event.
In essence, JDOM sets the 'namespaces' feature, but expects the
startElement() event to contain details only provided by the optional (and
not set) 'namespace-prefixes' feature.
The combination of Brad's patch plus the issue #1 fix *should* mean that
JDOM fully supports both SAX parse features "namespaces" and
"namespace-prefixes" : see
although if a namespace-aware parser does not provide prefix details then
JDOM will generate 'implementation-specific' prefixes.
As a result I am also back-porting a number of the jUnit tests I have for
JDOM2 to get some sense of reliability in the code.
Expect this to delay 1.1.2 until at least next week.
On Sun, 02 Oct 2011 21:36:30 -0400, Rolf <jdom at tuis.net> wrote:
> Hi All
> Another update.
> This has been a busy spell since the last update.
> JDOM 1.1.2
> This is ready to go, and has been going through the final stages of
> publishing it. You can see the change-log by either inspecting the
> Changes file or the issues list:
> In summary, there have been 14 bug fixes, and the Jar will be available
> on maven-central.
> The JDOM 1.x branch will remain open for bug-fixes only.
> If you want a sneak-peak of the 1.1.2 code you can download the source
> at: https://github.com/hunterhacker/jdom/zipball/jdom-1.1.2
More information about the jdom-interest