[
Lists Home |
Date Index |
Thread Index
]
- From: Ronald Bourret <rpbourret@hotmail.com>
- To: xml-dev@lists.xml.org
- Date: Wed, 19 Jul 2000 00:29:15 +0000 (CEST)
Leigh Dodds wrote:
> > -----Original Message-----
> > From: Lisa Retief [mailto:lisa@exinet.co.za]
> > Sent: 17 July 2000 10:21
> > To: xml-dev@lists.xml.org
> > Subject: Default Namespaces - why don't they apply to attributes?
> >
> >
> > I have been trying to understand the reasons why default namepaces do
>not
> > apply to attributes but only elements.
>
>This question has been confusing people for a while - so you're not the
>first to encounter it. There was some discussion on the topic back in
>January [1].
>
>There were several illustrative postings [2, 3, 4].
It's also important to note that the purpose of XML namespaces is to allow
applications to uniquely identify names. If an attribute is unprefixed, it
doesn't really matter whether it's in the namespace of its corresponding
element or not -- the application can still identify it because it knows the
corresponding element and it knows what namespace that element is in.
Put another way, an application can uniquely identify an element because XML
namespaces apply to elements. The application can then uniquely identify an
unprefixed attribute of that element because the element "applies" to that
attribute. Thus, whether the attribute is "in" the namespace is irrelevant
for purposes of identifying it.
By the way, I would be really curious to see any applications for which
knowing of an attribute is "in" a namespace -- as opposed simply identifying
the attribute -- is important. I can't think of any, but maybe I'm just
unimaginative.
-- Ron Bourret
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
|