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

RE: Why associate an attribute with a namespace ?


RE:  Why associate an attribute with a namespace ?
> >>For that
> >>you only need a
> >>special syntax like:
> >>
> >>:AllLowerCase:
> >>:lang:
> >>:space:
> >>:base:
> >>

> For your described case (special attributes)  you need merely 
> syntax changes and
> not namespaces. Are namespaces just syntax ?
> 

Sorry my reply was to terse for you to understand.

I gave examples of four attributes (xml:lang, xml:base, xsi:type,
xsl:version) invented by three different working groups, and therefore in
three different namespaces.

The traditional approach to this kind of requirement, back in the 1970s, was
to use a name that you thought other users were unlikely to think of, for
example, names prefixed by an underscore. Then someone else might use names
with two underscores. This seems to be the approach you are advocating. It
doesn't work, of course, because there is no way of making my special names
distinct from yoru special names.

Either that, or you are proposing that each group with such a requirement
should modify the syntax of XML names and require XML parsers to be updated.
That's obviously a non-starter.

In any case, your argument that attributes don't need namespaces because
their names only need to be unique within a given element is disproved by
these counter-examples. These attributes apply to any element under the sun,
and it's important that they have names that don't conflict with any
user-chosen attribute names. Namespaces achieve that.

There are a lot of horrible things in the namespace design, notably the way
it's layered on top of the XML core rather than being part of its
foundations. But namespaced attributes are undoubtedly useful.

Michael Kay
http://www.saxonica.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.