[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?

  • From: Ronald Bourret <rpbourret@h...>
  • To: xml-dev@l...
  • Date: Wed, 19 Jul 2000 00:29:15 +0000 (CEST)

default namespaces attribute
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!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.