[
Lists Home |
Date Index |
Thread Index
]
> Simon St.Laurent wrote:
>
> [[
> The namespaces specification made a simple but horrid
> mistake in failing to recognize the close relationship
> between an attribute and its containing element. That
> there is a difference between:
>
> <x:foo x:bar="bogus"/>
>
> and:
>
> <x:foo bar="bogus"/>
>
> seems like yet another consequence of a disastrous
> specification. ... It's time to start fixing stuff
> instead of just letting bad decisions perpetuate
> themselves. In practice, I really doubt that this will
> break ANY applications.
> ]]
It's not clear to me that the namespaces spec did fail to recognise
the relationship.
It seems to me that in theory and practice the "traditional"
attribute that is closely bound to its element is the unprefixed
case. The fact that unprefixed attribute names don't pick up the default
namespace ensures that this association is kept.
<x:foo bar="bogus"/>
bar here is in no namespace and so easily bound by the application to
behaviour determined by x:foo. It is not in some other random namespace
that happens to be the default at this point.
Conversely prefixed attribute names are useable (and used) for
attributes that derive their primary processing independantly of the
element.
xml:lang example has already been given, the xlink: attributes are
perhaps a better example as are xsl: attributes on literal result
elements in an XSLT stylesheet. The processing of
xsl:use-attribute-sets="..."
is entirely determined by XSLT and can be placed on any element
whatsoever. These sorts of attributes naturally live in a namespace
and end up with prefixed names in the concrete syntax.
David
_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.
|