Re: [csswg-drafts] [css-namespaces] Restore Terminology section

CC @tabatkins, @bzbarsky 

And because I don’t want to throw it away, here is the evidence I gathered this morning to argue for a normative spec change, before I realized the statement I wanted was already in the spec, just not in the ED.

The css-namespaces spec distinguishes these two cases:
> All strings—including the empty string and strings representing invalid URIs—are valid namespace names in `@namespace` declarations.
> The prefix of a qualified name may be omitted to indicate that the name belongs to no namespace, i.e. that the namespace name part of the expanded name has no value.


However, the rest of the platform ensure that it is not possible for an element’s or attribute’s name to have an empty string namespace name, as opposed to no namespace. Any attempt to construct the former results in the latter.

Or, equivalently, the empty namespace name and the lack and namespace can be considered to be the same thing.
> To validate and extract a namespace and qualifiedName, run these steps:
> 1. If namespace is the empty string, set it to null. 
> 2. […]
> […] an attribute whose namespace is the XMLNS namespace, namespace prefix is null, and local name is "xmlns", then return its value if it is not the empty string, and null otherwise.
>  The empty string, though it is a legal URI reference, cannot be used as a namespace name.
> Namespace constraint: No Prefix Undeclaring
> In a namespace declaration for a prefix (i.e., where the NSAttName is a PrefixedAttName), the attribute value MUST NOT be empty.
> 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. 


These tests pass in all of Firefox, Chromium, Safari, and Edge:


(They are served with a `Content-Type: application/xml` HTTP response header, so they’re parsed with the XML parser rather than the HTML parser.)

GitHub Notification of comment by SimonSapin
Please view or discuss this issue at using your GitHub account

Received on Wednesday, 17 May 2017 09:52:13 UTC