[jdom-interest] Possible bug in SAXHandler when "namespaces" feature is off

Dmitri Plotnikov dmitri at apache.org
Mon Jan 19 15:21:58 PST 2004


> At 4:30 PM -0500 1/19/04, Dmitri Plotnikov wrote:
> >Jason,
> >
> >>  > Unless the code has changed since beta 9 it looks like the correct
> >>  > statement is that JDOM *only* supports XML+Namespaces. The setName
> >>  > method for Element, for instance, treats ':' as an illegal
> >>  > This violates the XML recommendation.
> >>  >
> >>  > I'm not saying that only supporting XML+Namespaces is a bad design
> >>  > choice - very few people are using XML-Namespaces these days - but
> >>  > should be stated in the project description (at least in the fine
> >>  > print...).
> >>
> >>  We support XML with namespaces.  We support XML without namespaces.
> >>  What we don't support is colons in local names.  Too many people
> >>  mistakenly try to use colons in local names *thinking* they're adding
> >>  namespace.  They're not, so we warn them off.
> >
> >I have an issue with the statement that JDOM supports XML without
> >if it always treats a colon in a special way.  Here's a quote from the
> >specification:
> >
> >[Definition: A Name is a token beginning with a letter or one of a few
> >punctuation characters, and continuing with letters, digits, hyphens,
> >underscores, colons, or full stops, together known as name characters.]
> >
> >Later the spec says:
> >
> >XML processors must accept the colon as a name character.
> >
> You're being very selective in your quotes. The XML, 2nd edition,
> spec also says,
> The Namespaces in XML Recommendation [XML Names] assigns a meaning to
> names containing colon characters. Therefore, authors should not use
> the colon in XML names except for namespace purposes, but XML
> processors must accept the colon as a name character.
> The 1st edition spec was even clearer:
> The colon character within XML names is reserved for experimentation
> with name spaces. Its meaning is expected to be standardized at some
> future point, at which point those documents using the colon for
> experimental purposes may need to be updated. (There is no guarantee
> that any name-space mechanism adopted for XML will in fact use the
> colon as a name-space delimiter.) In practice, this means that
> authors should not use the colon in XML names except as part of
> name-space experiments, but that XML processors should accept the
> colon as a name character.
> In other words, anybody who has ever used a colon in an XML name in a
> non-namespace well-=formed way should have known they were asking for
> trouble. There's no plausible justification for non-namespace
> well-formed documents in 2004. In the five years are so since
> Namespaces in XML was finalized, I have encountered exactly *one*
> well-formed XML document that was namespace malformed; and that one
> document dated back to the year or so in which Namespaces in XML was
> in working draft, and in which the RDF draft spec depended on the
> working draft namespace spec rather than the final syntax.

I guess I started this whole excercise in beating the dead horse. I just
want to give it one last kick: you are saying that users should not do
what's wrong and I am repeating after my favorite teacher, Capt. E.A.Murphy,
that if something can go wrong, it will. Thus the situation should be
identified and reported.  That's the whole substance of this conversation
and Jason has already agreed with it. I suggest we wrap it up.


- Dmitri

More information about the jdom-interest mailing list