W3C home > Mailing lists > Public > www-style@w3.org > August 2012

Re: [css3-namespace] Empty namespace vs. no namespace.

From: Kang-Hao (Kenny) Lu <kanghaol@oupeng.com>
Date: Sat, 11 Aug 2012 09:44:36 +0800
Message-ID: <5025B904.3090807@oupeng.com>
To: Simon Sapin <simon.sapin@kozea.fr>
CC: WWW Style <www-style@w3.org>
(12/08/11 2:46), Simon Sapin wrote:
> In section 2.1:
>> In CSS Namespaces a namespace name consisting of the empty string is
>> taken to represent the null namespace or lack of a namespace.
> In section 3.1:
>> All strings—including the empty string and strings representing
>> invalid URIs—are valid namespace names in @namespace declarations.
> The two are contradictory about empty strings. 

This can be read in a non-contradictory way. The sentence in section 2.1
talks about the semantics (or perhaps just terminology nonsense) not
about syntax, which is what section 3.1 is talking about. I do find the
"null namespace" and "lack of a namespace" concept confusing: I have no
idea why we don't just call it a namespace with namespace name being the
empty string. I suppose that has been a terminological heritage from XML.

As a data point, the css3-namespace test suite has a test[1] that relies on

  @namespace foo "";

being valid, matching 3.1.

> 2.1 is more consistent with xml-names:
> http://www.w3.org/TR/2009/REC-xml-names-20091208/#nsc-NoPrefixUndecl
>> In a namespace declaration for a prefix (i.e., where the NSAttName is
>> a PrefixedAttName), the attribute value MUST NOT be empty.
> http://www.w3.org/TR/2009/REC-xml-names-20091208/#defaulting
>> The attribute value in a default namespace declaration MAY be empty.
>> This has the same effect, within the scope of the declaration, of
>> there being no default namespace.
> Therefore, I think that 3.1 is wrong about empty strings. I suggest
> moving the first quoted sentence and its example from 2.1 to 3.1 (it’s
> not really about terminology) and changing the other sentence to "All
> non-empty strings are valid namespace names…"

We could have matched xml-names, but that would mean

  @namespace foo "";

is invalid while

  @namespace "";

is. Is this what you are suggesting?

[1] http://www.w3.org/Style/CSS/Test/CSS3/Namespace/current/prefix-002.xml

Web Specialist, Oupeng Browser, Beijing
Try Oupeng: http://www.oupeng.com/
Received on Saturday, 11 August 2012 01:45:08 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:20 UTC