[jdom-interest] Anything else for beta 9?
Bradley S. Huffman
hip at a.cs.okstate.edu
Tue Apr 8 21:10:58 PDT 2003
Jason Hunter writes:
> > > > >Right now SAXBuilder's default is to always set SAX "namespaces" to
> > > > >true and "namespace-prefix" to false, and you cannot change that.
> > > >
> > > > I think that's wrong. It should set both to true in order to
> > > > propagate namespaces in scope and additional namespaces properly.
> > >
> > > Looks like it's been that way since beta 5 and hasn't cause any major pro
> blem
> > > s
> > > yet (key word being "yet). But thinking about this "namespace-prefixes" =
> = tr
> > > ue
> > > ensures the qname will be availible through startElement, otherwise it's
> > > optional and I guess Xerces (and Crimson before) always provided it even
> > > though they didn't have to. So I guess we've been living on borrowed time
> .
> > >
> > > Guess that should be fixed before beta 9.
> >
> > Does this need to be fixed, change "namespace-prefixes" from false to true
> > in SAXBuilder? And does anyone have time to change SAXBuilder and give it
> > a quick test.
>
> I think you're right only testing will reveal what *really* is the right
> thing to do. Since there've been no problems thus far I don't think
> this is b9 holdup, and it's a "big risk" change.
Not really that big of risk. Both JDOM's SAXHandler and Elliotte's XOMHandler
get the prefix, local name, and namespace from the same parameters in
startElement and in this respect the only difference between the two is
we set "namespace-prefixes" to false and he sets it to true. I change
SAXBuilder and ran jdom-test and D. Sosnoski test suite (which has a couple
dozen test files) and both ran with not problems so I think it's a fairly
safe change.
*** SAXBuilder.java Tue Apr 8 22:54:34 2003
--- SAXBuilder.new Tue Apr 8 22:34:13 2003
***************
*** 612,618 ****
true, "Namespaces");
internalSetFeature(parser,
"http://xml.org/sax/features/namespace-prefixes",
! false, "Namespace prefixes");
}
// Set entity expansion
--- 612,618 ----
true, "Namespaces");
internalSetFeature(parser,
"http://xml.org/sax/features/namespace-prefixes",
! true, "Namespace prefixes");
}
// Set entity expansion
More information about the jdom-interest
mailing list