|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Default Namespaces - why don't they apply to attributes?
Leigh Dodds wrote: > > -----Original Message----- > > From: Lisa Retief [mailto:lisa@e...] > > Sent: 17 July 2000 10:21 > > To: xml-dev@l... > > 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|
|||||||||

Cart








