OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   RE: [xml-dev] Why associate an attribute with a namespace ?

[ Lists Home | Date Index | Thread Index ]

> >>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/






 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS