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

Re: Re: Default namespace for attributes?

  • To: xml-dev@l...
  • Subject: Re: Re: Default namespace for attributes?
  • From: "Mukul Gandhi" <gandhi.mukul@g...>
  • Date: Mon, 17 Jul 2006 14:18:27 +0530
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=NL57gOKaJniYU9eXU2bVuXrj//fqyMF4Z3x6N9YBgkS8v03IbTGehU0HoYC2/7cQkVKjyD63/x9jIJI5NOuCyCeqZq1h7xVv8KVSZZSY7uKr7JucxHDAvl6sOZAHvyqsIPhIDh0RsRce8HvqU8re+JSNPuNKjLro5+ElzaLEouI=
  • In-reply-to: <e9dmkn$2og$1@s...>
  • References: <7870f82e0607151005nd7094fboc43dd7ecdc9b360a@m...> <e9dmkn$2og$1@s...>

xsi type default namespace
Thanks to all who replied and getting my doubts cleared..

Regards,
Mukul

On 7/16/06, Dimitre Novatchev <dnovatchev@y...> wrote:
>
> "Mukul Gandhi" <gandhi.mukul@g...> wrote in message
> 7870f82e0607151005nd7094fboc43dd7ecdc9b360a@m...">news:7870f82e0607151005nd7094fboc43dd7ecdc9b360a@m......
> > The XML Namespaces Recommendation says that the default namespace
> > applies only to elements, and not to attribues
> > (http://www.w3.org/TR/REC-xml-names/#defaulting).
> >
> > i.e. an unprefixed attribute name will always be in the null namespace.
> >
> > I am curious to know why this is so?
>
>
> It seems to have some reason:
>
>  An attribute belongs to an element and its semantics must be defined as
> part of the semantics of the parent-element. Therefore, additionally there
> is no need to put the attribute in the same namespace as the one of its
> parent.
>
> On the other side, if we want to specify on a given element a "special"
> attribute that is not specific only to that element, but is "globally
> defined and owned", then having this attribute in some namespace will serve
> to give the attribute this semantics and be able to distinguish this
> attribute from the attributes that are ("local") specific only for the
> element or from other "global" attributes.
>
> This is how we generally specify such attributes as xml:lang, xml:id,
> xsi:type, ..., etc.
>
> Exactly because local attributes do not belong to any namespace and their
> names do not have prefixes, it is easy to distinguish the global attributes
> whenever they are specified on an element.
>
> So,  my understanding is that one goal of this part of the namespace spec
> was to provide a way of specifying attributes that would be easy to
> understand and that would allow special/global attributes to be seen easily,
> avoiding namespace-prefix clutter altogether.
>
>
> --
> Cheers,
> Dimitre Novatchev
> ---------------------------------------
> Truly great madness cannot be achieved without significant intelligence.

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.