[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Default namespace for attributes?

  • To: "Jirka Kosek" <jirka@k...>
  • Subject: Re: Default namespace for attributes?
  • From: "Mukul Gandhi" <gandhi.mukul@g...>
  • Date: Sun, 16 Jul 2006 16:43:24 +0530
  • Cc: xml-dev@l...
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=gNGFjzNPN+Fo2kwjIJdZZTCBNEqCdRr8pRQYG9p2lqVa/0ap1dtZj1j0QjjQC6n9F/7xkIecGinR29n0tBff10ILr2m9wETn7smEWZ8/gIJt8ekhjXlIAoWzf9Z7zOKFGoIWts3BB7V19bbJIgdex65HtJwm4EptUWFsAQ9dLE0=
  • In-reply-to: <44BA0926.9070505@k...>
  • References: <7870f82e0607151005nd7094fboc43dd7ecdc9b360a@m...> <44BA0926.9070505@k...>

Re:  Default namespace for attributes?
On 7/16/06, Jirka Kosek <jirka@k...> wrote:
> My own understanding is that attribute is always related to an element
> on which it appears. So you can know identity of unnamespaced attribute
> if you take current element into account, and you will save few bits of
> memory when parsing and processing XML.

If it was like this then it was fine. But I think the spec doesn't implies this.

Please consider this XML:

<a xmlns="http://my.com/namespace">
  <x xyz="hello" />
</a>

for element a, the namespace declaration is present for the null
prefix. This is known as the default namespace.

Now what namespace binding applies to element x and attribute xyz. To
element x, the default namespace applies (http://my.com/namespace).
But attribute xyz is in the null namespace (i.e. there is no namespace
binding applicable to it). This is what that looks illogical to me.

Regards,
Mukul

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.