SAX2: Namespace Processing and NSUtils helper class

roddey at roddey at
Mon Dec 20 19:25:37 GMT 1999

>>I've done a lot of thinking about how we
>>can make SAX2 Namespace processing both efficient and
>I'm not sure backwards-compatible is really a good idea.  The
>namespace-sensitive and namespace-oblivious views of a chunk of XML
>are just deeply, totally, massively incompatible, and it seems wrong
>to try to paper that over.  I also don't think it's worth investing
>any effort at all in accomodating XML documents that use colons in names
>but aren't namespace-aware, given the explicit warnings against doing
>this in the XML 1.0 spec.
>So I think it would be cleaner to deal with the fact that names can have
>two parts, and not kludge them together with {} marks.  -Tim

But its also a code issue. The event callbacks from a parser has to be able
to pass out data from both namespace and non-namespace aware documents
using the same APIs. For some folks, this type of syntax might allow that
to be done much easier. Personally I didn't go this route, and have event
API parameters for prefix and URI that just aren't used if namespaces are
not enabled, but some folks might prefer the {uri}name thing to use the
same API for both styles. You have to pick one or the other though, right?
Either you use some such kludge, or your event handlers have to always know
whether namespaces are enabled and look at some event parameters sometimes
but not others (though I guess they also have to be aware enough to strip
out the parts of the {uri}name form anyway, since its not a legal name as

Dean Roddey
Software Weenie
IBM Center for Java Technology - Silicon Valley
roddey at

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at
Archived as: and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo at the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo at the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at

More information about the Xml-dev mailing list