[jdom-interest] getAttributeValue(): wrong signatures?

Alex Rosen arosen at silverstream.com
Tue Apr 30 10:36:17 PDT 2002


I was going to agree with you, and add the supporting evidence that DOM uses
(String name, String namespaceURI) so that's what people are used to. But
actually DOM uses (String namespaceURI, String name). Ugh. Certainly a pain
for people that have to use both DOM and JDOM to remember which is which.
But I agree, that (String name, String defaultValue) is at least as
confusing.

> Another problem, is that this is a really significant method call that
> really requires the user to be familar with the Namespace class. In
> fact, I'm not sure if anyother classes actually require the developer to
> be familar with Namespace at all. For instance, you can use a Namespace
> object when constructing an Element object, but you can also use raw
> strings. This is one of the few places in the API where there's no raw
> string alternative for the namespace.

Except for getChild(String name, Namespace ns) and friends. Are you
proposing that we change all of these?

Alex





More information about the jdom-interest mailing list