[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [xml-dev] Use of colon in ID
>Anyone know the status on the use of colons in IDs?
The Namespaces spec is a little unclear on the subject. It says:
An XML document conforms to this specification if all other tokens
in the document which are required, for XML conformance, to match
the XML production for Name, match this specification's production
Unfortunately there's no such thing as "XML conformance" (of a
document) defined in XML 1.0. There's well-formedness and validity.
IDs are only required to match Name for validity.
It goes on to say
Strictly speaking, attribute values declared to be of types ID,
IDREF(S), ENTITY(IES), and NOTATION are also Names, and thus should
and notes that only validating parsers can be relied on to check this.
One might suggest that from the point of view of XML Namespaces, a
colon in an ID is like, say, a semicolon in an ID under plain XML 1.0.
I proposed an erratum to make this explicit - a colon in an ID would
be "XML+Namespaces well-formed" but not "XML+Namespace valid". But to
introduce such unwieldy terminology seems like using a sledgehammer to
crack a nut.
In any case, you should certainly avoid it.