[jdom-interest] getName(), getLocalName(), and getQualifiedName()
Elliotte Rusty Harold
elharo at metalab.unc.edu
Sun Aug 11 19:26:45 PDT 2002
Currently, the getName() method in both Element and Attribute is defined
to return the local name. The getQualifiedName() method returns the full
name including prefix.
Unfortuantely according to XML 1.0, the "name" is the qualified name,
not the local name. Namespaces in XML does not change this; that is, it
does not redefine "name" as local name. It simply introduces new
concepts of local name and qualified name. Logically, the getName()
method should return the qualified name. A getLocalName() method could
return the local name, but getName() should really return what XML 1.0
defines as the element or attribute's name.
Alternately, we could use getQualifiedName() and getLocalName(), and
eliminate (after deprecation) getName(). This is also completely
consistent with XML 1.0, is less ambiguous, and would be much more
compatible with existing code. Thoughts?
More information about the jdom-interest