I should have made it clear that I was talking about the parser itself, not
the DOM. The parser treats these things very literally, just like they are
any other attribute. The DOM can do whatever it feels is necessary of
course. But I couldn't begin to justify making everyone special case this
one type of attribute by doing something different from every other
attribute does. If xmlns is a prefix, then its mapped to its magic URL,
which semi-special case in the parser but doesn't require anyone getting
event callbacks to do anything different. In the case of xmlns="" it is
clearly not a prefix by namespace rules, and having to force everyone to
look for an empty attribute name with a special prefix URL is kind of silly.
Its just an attribute named xmlns. It does cause interesting things to
happen, but no one should have their program fall over when they get an
empty attribute name.

If you mean by not being in the infoset that they are not to be reported,
that's clearly not workable. In order to recreate a document they have to be
reported.

--------------
Dean Roddey
Software Geek Extraordinaire
Portal, Inc
[EMAIL PROTECTED]



-----Original Message-----
From: David E. Cleary [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 30, 2001 6:21 AM
To: [EMAIL PROTECTED]
Subject: RE: Namespace of xmlns attribute


> its a prefix that maps to the xmlns URL. In the former, if you go by XML
> rules, and I don't see why you shouldn't, xmlns="" is an
> attribute just like
> any other attribute and its in the global namespace and I think
> it should be
> treated the same as any other such, to avoid having to have special case
> code in applications that use the parser. In the later, xmlns is clearly a
> prefix and should map to a URL.
>
> Personally, I can't see any good enough argument to deviate and treat the
> first scenario specially, and force everyone else to as well.

Namespace declarations are not attributes. They do not appear in the infoset
as attribute information items. They do not have to be declared in XML
Schema to make a document that uses them valid. While I wasn't aware that
they were associated with a namespace, they do require special handling.
Xerces should follow the DOM spec in this regard and associate all xmlns
attributes with the proper namespace. The tricky part which I didn't see in
the DOM spec was how would prefix and localname work. I would assume that
the default namespace decl would have a null or zero length local name.

David Cleary
Progress Software


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to