W3C: Namespaces in XML Errata, 29 April 2002

Namespaces in XML Errata, 29 April 2002

Abstract

This document records all known errors in the Namespaces in XML specification.

Known Errors

NE01 editorial

Namespace Constraint: Prefix Declared

Remove duplicate "an" in "an an ancestor element".

NE02 editorial

A.3 Expanded Element Types and Attribute Names

In the second table, change ">" to "/>" in the row for CLASS.

NE03 editorial

A.3 Expanded Element Types and Attribute Names

In the second table, add quotes around the value of the ns attribute in the row for HTML:CLASS.

NE04 substantive

1 Motivation and Summary

After the definition of "identical" for URIs, add a paragraph:

The use of relative URI references in namespace declarations is deprecated. Future W3C specifications will define no interpretation for them.

Rationale:

See Results of W3C XML Plenary Ballot on relative URI References in namespace declarations

NE05 substantive

Namespace Constraint: Prefix Declared

Remove the second and third sentences of the Namespace Constraint "Prefix Declared" in section 4.

Namespace Constraint: Leading "XML"

Replace the Namespace Constraint "Leading XML" in section 2 with:

Namespace constraint: Reserved Prefixes and Namespace Names

The prefix xml is by definition bound to the namespace name http://www.w3.org/XML/1998/namespace. It may, but need not, be declared, and must not be bound to any other namespace name. No other prefix may be bound to this namespace name.

The prefix xmlns is used only to declare namespace bindings and is by definition bound to the namespace name http://www.w3.org/2000/xmlns/. It must not be declared. No other prefix may be bound to this namespace name.

All other prefixes beginning with the three-letter sequence x, m, l, in any case combination, are reserved. This means that

  • users should not use them except as defined by later specifications
  • processors must not treat them as fatal errors.

Rationale:

This erratum clarifies several issues concerning prefixes beginning "xml". The xmlns prefix is purely syntactic, and it makes no sense to declare it. The xml namespace could work like any other, were it not that the xml:space and xml:lang attributes are required to use that prefix, but it was considered too confusing to allow anything more than declaring it normally. The meaning of "reserved" has been made explicit.

NE06 clarification

Namespace Constraint: Leading "XML"

After the Namespace Constraint replaced in NE05 above, add a paragraph:

Though legal, it is inadvisable to use prefixed names whose LocalPart begins with the letters x, m, l, as these names would be reserved if used without a prefix.

NE07 clarification

Namespace Scoping

Change the first paragraph of section 5.1 to read:

A namespace declaration is considered to apply to the element where it is specified and its attributes, and to all elements and their attributes within the content of that element, unless overridden by another namespace declaration with the same NSAttName part.

Namespace Defaulting

Change the first sentence of the first paragraph of 5.2 to read:

A default namespace declaration is considered to apply to the element where it is specified, and to all elements within the content of that element, unless overridden by another default namespace declaration.

Rationale:

Certain differences in wording between these two paragraphs suggested a difference in meaning that did not in fact exist.

NE08 substantive

6. Conformance of Documents

Replace all of section 6 with the following:

6. Conformance of Documents

This specification applies to XML 1.0 documents. To conform to this specification, a document must be well-formed according to the XML 1.0 specification.

In XML documents which conform to this specification, element types and attribute names must match the production for QName and must satisfy the "Namespace Constraints". All other tokens in the document which are required, for XML 1.0 well-formedness, to match the XML production for Name, must match this specification's production for NCName.

Definition: A document is namespace-well-formed if it conforms to this specification.

It follows that in a namespace-well-formed document

  • All element types and attribute names contain either zero or one colon;
  • No entity names, PI targets, or notation names contain any colons.

In addition, a namespace-well-formed document may also be namespace-valid.

Definition: A namespace-well-formed document is namespace-valid if it is valid according to the XML 1.0 specification, and all tokens other than element types and attribute names which are required, for XML 1.0 validity, to match the XML production for Name, match this specification's production for NCName.

It follows that in a namespace-valid document

  • No attributes with a declared type of ID, IDREF(S), ENTITY(IES) or NOTATION contain any colons.

Rationale:

It was unclear whether such errors as colons in IDs rendered a document non-conformant. This erratum makes it clear that they do not, and also provides terms paralleling XML 1.0's well-formed and valid.



Donate to the XiMoL project SourceForge.net Logo If you have any questions about XiMoL, you could write to tournois@users.sourceforge.net.