Re: Which QName?

On Sunday 2003-08-17 16:56 +0200, Chris Lilley wrote:
> RB> That, unfortunately, is very theoretical. There is dissent on
> RB> which of the QName resolving rule applies to QNames in content:
> RB> for XML Schema's xs:QName, the "element rules" apply so that no
> RB> prefix means the default namespace applies; for XSLT, the
> RB> "attribute rules" apply, and no prefix means no namespace.
> 
> CSS3 also picks the element rules (for both elements and, it seems,
> for attributes)
> http://www.w3.org/TR/2003/WD-css3-syntax-20030813/#defining

No, the default namespace applies only to elements without an explicit
namespace in CSS3, and attributes without an explicit namespace have no
namespace.

> "If the optional namespace prefix is omitted, then the namespace URI
> is considered to be the default namespace. The default namespace
> applies only to type selectors that have no explicit namespace prefix
> declared as described in the Selectors Module [SELECT]. "

The first sentence here describes how the default namespace is defined,
not how it is used.  The second sentence applies the element rules only
to elements ("type selectors" could perhaps be called "element type
selectors").  For attribute selectors (see [1]) and attr() values (see a
future draft of the values and units module), no prefix means no
namespace.

The syntax draft would probably be clearer if the the second sentence
you quote stated the element vs. attribute rule in general (to apply to
any CSS modules that use namespaces) rather than referring to the one
CSS module that currently uses namespaces with element names.

-David

[1] http://www.w3.org/TR/css3-selectors/#attrnmsp

-- 
L. David Baron                                <URL: http://dbaron.org/ >

Received on Sunday, 17 August 2003 13:48:49 UTC