Skip to content

Commit f4525c3

Browse files
committed
various empty string namespace clarifications, see message at http://lists.w3.org/Archives/Public/www-style/2008Apr/0396.html and issues-2#9
1 parent f44133b commit f4525c3

3 files changed

Lines changed: 71 additions & 50 deletions

File tree

css3-namespace/Overview.html

Lines changed: 37 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@
1111
<body>
1212
<div class=head> <!--begin-logo-->
1313
<p><a href="http://www.w3.org/"><img alt=W3C height=48
14-
src="http://www.w3.org/Icons/w3c_home" width=72></a> <!--end-logo--></p>
14+
src="http://www.w3.org/Icons/w3c_home" width=72></a> <!--end-logo-->
1515

1616
<h1 id=css-namespaces>CSS Namespaces Module</h1>
1717

18-
<h2 class="no-num no-toc" id=longstatus>Editor's Draft 16 April 2008</h2>
18+
<h2 class="no-num no-toc" id=longstatus>Editor's Draft 22 April 2008</h2>
1919

2020
<dl>
2121
<dt>This version:</dt>
22-
<!-- <dd><a href="http://www.w3.org/TR/2008/WD-css3-namespace-20080416/">http://www.w3.org/TR/2008/WD-css3-namespace-20080416/</a></dd> -->
22+
<!-- <dd><a href="http://www.w3.org/TR/2008/WD-css3-namespace-20080422/">http://www.w3.org/TR/2008/WD-css3-namespace-20080422/</a></dd> -->
2323

2424
<dd><a
2525
href="http://dev.w3.org/csswg/css3-namespace/">http://dev.w3.org/csswg/css3-namespace/</a>
@@ -80,34 +80,9 @@ <h2 class="no-num no-toc" id=status>Status of this document</h2>
8080
<!--begin-status-->
8181

8282
<p>This is a public copy of the editors' draft. It is provided for
83-
discussion only and may change at any moment. Its publication here does
84-
not imply endorsement of its contents by W3C. Don't cite this document
85-
other than as work in progress.
86-
87-
<p>The (<a
88-
href="http://lists.w3.org/Archives/Public/www-style/">archived</a>) public
89-
mailing list <a href="mailto:www-style@w3.org">www-style@w3.org</a> (see
90-
<a href="http://www.w3.org/Mail/Request">instructions</a>) is preferred
91-
for discussion of this specification. When sending e-mail, please put the
92-
text &#8220;css3-namespace&#8221; in the subject, preferably like this:
93-
&#8220;[<!---->css3-namespace<!---->] <em>&hellip;summary of
94-
comment&hellip;</em>&#8221;
95-
96-
<p>This document was produced by the <a href="/Style/CSS/members">CSS
97-
Working Group</a> (part of the <a href="/Style/">Style Activity</a>).
98-
99-
<p>This document was produced by a group operating under the <a
100-
href="/Consortium/Patent-Policy-20040205/">5 February 2004 W3C Patent
101-
Policy</a>. W3C maintains a <a href="/2004/01/pp-impl/32061/status"
102-
rel=disclosure>public list of any patent disclosures</a> made in
103-
connection with the deliverables of the group; that page also includes
104-
instructions for disclosing a patent. An individual who has actual
105-
knowledge of a patent which the individual believes contains <a
106-
href="/Consortium/Patent-Policy-20040205/#def-essential">Essential
107-
Claim(s)</a> must disclose the information in accordance with <a
108-
href="/Consortium/Patent-Policy-20040205/#sec-Disclosure">section 6 of the
109-
W3C Patent Policy</a>.</p>
110-
<!--end-status-->
83+
discussion only and may change at any moment. It probably contains errors.
84+
Its publication here does not imply endorsement of its contents by W3C.
85+
<!--end-status-->
11186

11287
<p>This specification is a <strong>Last Call Working Draft</strong>. All
11388
persons are encouraged to review this document and <strong>send comments
@@ -171,7 +146,7 @@ <h2 id=intro><span class=secno>1. </span>Introduction</h2>
171146
or what they mean: that depends on their context and is defined by a host
172147
language, such as Selectors (<a href="#SELECT"
173148
rel=biblioentry>[SELECT]<!--{{SELECT}}--></a>), that references the
174-
syntax defined in the CSS Namespaces module.</p>
149+
syntax defined in the CSS Namespaces module.
175150

176151
<p>Note that a CSS client that does not support this module will (if it
177152
properly conforms to <a
@@ -191,7 +166,7 @@ <h2 id=conformance><span class=secno>2. </span>Conformance</h2>
191166
conformance requirements in this specification when implementing CSS or
192167
another host language that normatively references this specification.</p>
193168

194-
<p>Conformance to CSS Namespaces is defined for two classes:</p>
169+
<p>Conformance to CSS Namespaces is defined for two classes:
195170

196171
<dl>
197172
<dt><dfn id=style>style sheet</dfn>
@@ -219,14 +194,14 @@ <h2 id=conformance><span class=secno>2. </span>Conformance</h2>
219194

220195
<p>Examples in this specification are introduced with the words "for
221196
example" or are set apart from the normative text with
222-
<code>class="example"</code>, like this:</p>
197+
<code>class="example"</code>, like this:
223198

224199
<div class=example>
225200
<p>This is an example of an informative example.</p>
226201
</div>
227202

228203
<p>Informative notes begin with the word "Note" and are set apart from the
229-
normative text with <code>class="note"</code>, like this:</p>
204+
normative text with <code>class="note"</code>, like this:
230205

231206
<p class=note>Note, this is an informative note.</p>
232207

@@ -329,6 +304,10 @@ <h3 id=syntax><span class=secno>3.1 </span>Syntax</h3>
329304
a literal string: as with the <code>STRING</code> syntax, no URI-specific
330305
normalization is applied.</p>
331306

307+
<p>All strings&#8212;including the empty string and strings representing
308+
invalid URIs&#8212;are valid namespace names in <code>@namespace</code>
309+
declarations.</p>
310+
332311
<h3 id=scope><span class=secno>3.2 </span>Scope</h3>
333312

334313
<p>The namespace prefix is declared only within the style sheet in which
@@ -340,7 +319,9 @@ <h3 id=prefixes><span class=secno>3.3 </span>Declaring Prefixes</h3>
340319

341320
<p>A <dfn id=namespace>namespace prefix</dfn>, once declared, represents
342321
the namespace for which it was declared and can be used to indicate the
343-
namespace of a namespace-qualified name.</p>
322+
namespace of a namespace-qualified name. Namespace prefixes are, <a
323+
href="http://www.w3.org/TR/CSS21/syndata.html#counter">like CSS counter
324+
names</a>, case-sensitive.</p>
344325

345326
<p>If in the namespace declaration the namespace prefix is omitted, then
346327
the namespace so declared is the default namespace. The <dfn
@@ -356,17 +337,17 @@ <h3 id=prefixes><span class=secno>3.3 </span>Declaring Prefixes</h3>
356337
must define how those unqualified names are to be interpreted when no
357338
default namespace is declared.</p>
358339

340+
<p>Where the empty string is not recognized as a possible namespace, local
341+
names associated with an empty string default namespace must be
342+
interpreted as being associated with no namespace.</p>
343+
359344
<p class=note>Note that using default namespaces in conjunction with type
360345
selectors can cause UAs that support default namespaces and UAs that
361346
don't support default namespaces to interpret selectors differently. See
362347
<a href="http://www.w3.org/TR/css3-selectors/#downlevel">Namespaces and
363348
down-level clients</a> in the Selectors module <a href="#SELECT"
364349
rel=biblioentry>[SELECT]<!--{{SELECT}}--></a> for details.</p>
365350

366-
<p>Namespace prefixes are, <a
367-
href="http://www.w3.org/TR/CSS21/syndata.html#counter">like CSS counter
368-
names</a>, case-sensitive.</p>
369-
370351
<p>If a namespace prefix or default namespace is declared more than once
371352
only the last declaration shall be used.</p>
372353
</div>
@@ -451,9 +432,22 @@ <h2 id=css-qnames><span class=secno>4. </span>CSS Qualified Names</h2>
451432
rule sets with an invalid selector to be completely ignored.</p>
452433
</div>
453434

454-
<p>In a CSS qualified name, a prefix that is declared to represent the
455-
empty string namespace (<code>""</code>) is interpreted as representing
456-
no namespace.</p>
435+
<p>When a CSS qualified name is used in a context (such as Selectors <a
436+
href="#SELECT" rel=biblioentry>[SELECT]<!--{{SELECT}}--></a>) that does
437+
not recognize association with the empty string namespace and lack of a
438+
namespace as two distinct, valid possibilities, prefixes representing the
439+
empty string namespace and no namespace must be treated as equivalent.</p>
440+
441+
<div class=example>
442+
<p>For example, given the namespace declarations:</p>
443+
444+
<pre>@namespace empty "";
445+
<!-- -->@namespace "";</pre>
446+
447+
<p>The <a href="http://www.w3.org/TR/css3-selectors/#type-selectors">type
448+
selectors</a> <code>elem</code>, <code>|elem</code>, and
449+
<code>empty|elem</code> are equivalent.</p>
450+
</div>
457451
</div>
458452

459453
<h2 class=no-num id=acknowledgments>Acknowledgments</h2>

css3-namespace/Overview.src.html

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,10 @@ <h3 id="syntax">Syntax</h3>
218218
a literal string: as with the <code>STRING</code> syntax, no URI-specific
219219
normalization is applied.</p>
220220

221+
<p>All strings&#8212;including the empty string and strings representing
222+
invalid URIs&#8212;are valid namespace names in <code>@namespace</code>
223+
declarations.</p>
224+
221225
<h3 id="scope">Scope</h3>
222226

223227
<p>The namespace prefix is declared only within the style sheet in which its
@@ -229,7 +233,9 @@ <h3 id="prefixes">Declaring Prefixes</h3>
229233

230234
<p>A <dfn>namespace prefix</dfn>, once declared, represents the namespace for
231235
which it was declared and can be used to indicate the namespace of a
232-
namespace-qualified name.</p>
236+
namespace-qualified name. Namespace prefixes are,
237+
<a href="http://www.w3.org/TR/CSS21/syndata.html#counter">like CSS counter
238+
names</a>, case-sensitive.</p>
233239

234240
<p>If in the namespace declaration the namespace prefix is omitted, then the
235241
namespace so declared is the default namespace. The <dfn>default
@@ -242,15 +248,15 @@ <h3 id="prefixes">Declaring Prefixes</h3>
242248
names to the default namespace must define how those unqualified names are
243249
to be interpreted when no default namespace is declared.</p>
244250

251+
<p>Local names associated with an empty string default namespace must be
252+
interpreted as being associated with no namespace.</p>
253+
245254
<p class="note">Note that using default namespaces in conjunction with type
246255
selectors can cause UAs that support default namespaces and UAs that don't
247256
support default namespaces to interpret selectors differently. See
248257
<a href="http://www.w3.org/TR/css3-selectors/#downlevel">Namespaces and
249258
down-level clients</a> in the Selectors module [[SELECT]] for details.</p>
250259

251-
<p>Namespace prefixes are, <a href="http://www.w3.org/TR/CSS21/syndata.html#counter">like
252-
CSS counter names</a>, case-sensitive.</p>
253-
254260
<p>If a namespace prefix or default namespace is declared more than once only
255261
the last declaration shall be used.</p>
256262
</div>
@@ -325,9 +331,22 @@ <h2 id="css-qnames">CSS Qualified Names</h2>
325331
ignored.</p>
326332
</div>
327333

328-
<p>In a CSS qualified name, a prefix that is declared to represent the
329-
empty string namespace (<code>""</code>) is interpreted as representing
330-
no namespace.</p>
334+
<p>When a CSS qualified name is used in a context (such as Selectors [[SELECT]])
335+
that does not recognize association with the empty string namespace and
336+
lack of a namespace as two distinct, valid possibilities, prefixes
337+
representing the empty string namespace and no namespace must be treated
338+
as equivalent.</p>
339+
340+
<div class="example">
341+
<p>For example, given the namespace declarations:</p>
342+
343+
<pre>@namespace empty "";
344+
<!-- -->@namespace "";</pre>
345+
346+
<p>The <a href="http://www.w3.org/TR/css3-selectors/#type-selectors">type
347+
selectors</a> <code>elem</code>, <code>|elem</code>, and
348+
<code>empty|elem</code> are equivalent.</p>
349+
</div>
331350
</div>
332351

333352
<h2 class="no-num" id="acknowledgments">Acknowledgments</h2>

css3-namespace/issues-2.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,11 @@ Response: http://lists.w3.org/Archives/Public/www-style/2008Apr/0034.html
7373
Closed: Accepted (to add note instead)
7474
Verified: http://lists.w3.org/Archives/Public/www-style/2008Apr/0299.html
7575
----
76+
Issue 9.
77+
Summary: Define declaration of empty default namespace
78+
From: Anne van Kesteren
79+
Comment: http://lists.w3.org/Archives/Public/public-css-testsuite/2008Mar/0015.html
80+
Testcase: http://lists.w3.org/Archives/Public/www-style/2008Apr/0391.html
81+
Response: http://lists.w3.org/Archives/Public/www-style/2008Apr/0396.html
82+
Closed: Accepted
83+
----

0 commit comments

Comments
 (0)