[jdom-interest] Attribute name verification special casing for xml:base

Bradley S. Huffman hip at a.cs.okstate.edu
Mon Jun 17 15:38:01 PDT 2002

Elliotte Rusty Harold writes:

> At 1:13 PM -0700 6/17/02, Jason Hunter wrote:
> >I agree with what Brad said.  (Except on the "errata" issue I don't have
> >a strong opinion.  My gut instinct is just that it's wasteful to do a
> >string comparison against that namespace for all namespaces just to
> >ensure someone doesn't do something somewhat stupid, but whatever.)
> >
> >I agree with your conclusion, Rusty, that special casing makes things
> >more complicated.
> >
> OK, just to be clear: I should go ahead and patch these files so that 
> xml:space, xml:base, and xml:lang are not treated any differently 
> than any other attribute in a namespace, right?

Sounds good to me, IMO the patch should

   1. remove the special casing from Verfier
   2. Namespace should throw a IllegalNameException if attempting to 
      remap "xml" prefix, or map another prefix to
   3. In Attribute, setName should check that name is only "space", "base",
      "lang" when namespace == Namespace.XML_Namespace, conversely for


More information about the jdom-interest mailing list