Table of contentsAppendices |
2.3 Comparing IRI ReferencesComparing IRI ReferencesIRI references identifying namespaces are compared when determining whether a name belongs to a given namespace, and whether two names belong to the same namespace. The two IRIs are treated as strings, and they are identical if and only if the strings are identical, that is, if they are the same sequence of characters. The comparison is case-sensitive, and no %-escaping is done or undone. A consequence of this is that IRI references which are not identical in this sense may resolve to the same resource. Examples include IRI references which differ only in case or %-escaping, or which are in external entities which have different base URIs (but note that relative IRIs are deprecated as namespace names). In a namespace declaration, the IRI reference is the normalized value of the attribute, so replacement of XML character and entity references has already been done before any comparison. Examples: The IRI references below are all different for the purposes of identifying namespaces, since they differ in case:
The IRI references below are also all different for the purposes of identifying namespaces:
As are these:
If the entity eacute has been defined to be é,
the start tags below all contain namespace declarations binding
the prefix p
to the same IRI reference,
Because of the risk of confusion between IRIs that would be equivalent if dereferenced, the use of %-escaped characters in namespace names is strongly discouraged. |