The QName URN NamespaceAyogo Games, Inc.orchard@pacificspirit.comIBMrsalz@us.ibm.comgreenbytes GmbHHafenweg 16MuensterNW48155Germanyjulian.reschke@greenbytes.dehttp://greenbytes.de/tech/webdav/NamespacesQNameXMLURNThis specification defines a Uniform Resource Name namespace for XML
namespace-qualified names, QNames. As long as the URN is encoded in
the same character set as the document containing the original QName,
the Qname URN provides enough information to maintain the semantics,
and optionally the exact syntax, of the original name.
Please send comments to the xml-dev mailing list
().
XML versions, latest edits and the issues list for this document
are available from .
This specification defines a Uniform Resource Name namespace for XML
namespace-qualified names, QNames. As long as the URN is encoded in
the same character set as the document containing the original QName,
the Qname URN provides enough information to maintain the semantics,
and optionally the exact syntax, of the original name.There are a variety of situations when a QName may need to be mapped
to a URI. For example, when exchanging (or referencing) an identifier
for an XML element contained within a document, and the medium of
exchange prefers URIs to QNames, such as an XML Schema anyURI data
type. Another scenario is for comparing the identifiers, which can be
simpler by comparing just a string without having to also compare the
context setting XML namespace attribute that may be declared
arbitrarily earlier in the document.The XML Namespaces specification does not
provide a canonical mapping between QNames and URIs. Any XML
specification that wants to enable identifier exchanges must define
a language specific QName to URI mapping. There have emerged a
variety of different algorithms and solutions for the mapping. To
date, there have been no standardized algorithms available that
they can re-use, which has increased their efforts. A standardized
mapping, such as this, should provide increased productivity.Almost all of the algorithms for Qname to URI mappings are based
upon concatenation of the URI and the name with variations based
upon prefix inclusion, namespace name and name separator, etc.
These are typically problematic because it is difficult to recover
the QName from the URI as the namespace name and name separator may
have already been used in the namespace name. Having the namespace
name at the end of the identifier string avoids these and other
problems.The following paragraphs contain the URN namespace registration
data, as defined in .
Namespace ID:
qname
Registration Information:
Version number: 1
Registration date: 2004-11-30
Declared registrant of the namespace:
The W3C Technical
Architecture Group (TAG), reachable at tag@w3.org.
Declaration of syntactic structure:
The QName URN is structured as four colon-separated fields.
Note that colons within the fourth field, the URI part, are not
significant; the entire fourth field is treated as a single
opaque entity by this URN scheme.
The first field identifies the naming scheme.
The second contains the QName prefix, or an empty string if
the QName comes from the default namespace, or an asterisk
if the prefix is not significant.
A QName URN is defined by the following ABNF :
Here are three examples of a QName URN:
The first correspond to the following element content
QNames (the element name is not significant):
The third example would match both of the others, as
well as an inifinite number of QNames, since
the namespace prefix is explicitly marked as "don't-care."
Relevant ancillary documentation:
Identifier uniqueness considerations:
An XML QName is semantically defined as a (namespace-uri,
localname) pair; the namespace prefix is not significant.
For some applications, such as signature functions, the
prefix is important and must be preserved.
The QName URN provides both a one-to-one mapping, that
preserves the uniquess of the underlying QName, and an
explicit many-to-one mapping, that does not preserve
the uniquess when it is not important to do so.
Identifier persistence considerations:
QName URN's have the same persistance as the underlying
XML QName from which they are derived.
Process of identifier assignment:
Assignment of identifiers depends on the original XML QName,
typically deferring to the namespace URI. Anyone with access to
an XML QName can create an equivalent QName URN; no registration
is required.
Process for identifier resolution:
Inherited from the QName resolution rules (typically the
namespace URI) from which the QName URN is created.
Rules for Lexical Equivalence:
If necessary, convert each QName URN to the same encoding.
The encoding of a QName URN is determined by context, and depends
on the encoding of the document in which it appears.
To be lexically equivalent the resultant QName URN's must be
identical when compared byte-for-byte. To be semantically
equivalent, ignore the prefix field when comparing bytes.
Conformance with URN Syntax:
Fully conformant.
Validation mechanism:
Inherited from the namespace URI of the original QName.
Scope:
Inherited from the original QName.
This scheme can also support the XML 1.1
and XML namespaces 1.1 standards.In the 1.1 Namespace specification, namespace URI's (universal
resource identifiers; see ...xref...) become IRI's (internationalized
resource identifiers, see ...xref...).
Although currently an Internet-Draft, and therefore not feasible to
use as a normative reference here, it is expected that the final RFC
will continue to define a way to map IRI's to URI's.
To apply this specification to IRI's, then, first apply that mapping
before using the syntax here.QName URN's provide a way to transcribe XML QName's into and out of
URN syntax. Any security considerations are inherited from the
original QName.Extensible Markup Language (XML) 1.0 (Fifth Edition)Textuality and Netscapetbray@textuality.comMicrosoftjeanpa@microsoft.comW3Ccmsmcq@w3.orgSun Microsystems, Inc.eve.maler@east.sun.comExtensible Markup Language (XML) 1.1 (Second Edition)Textuality and Netscapetbray@textuality.comMicrosoftjeanpa@microsoft.comW3Ccmsmcq@w3.orgSun Microsystems, Inc.eve.maler@east.sun.comcowan@ccil.orgNamespaces in XML 1.0 (Third Edition)Textualitytbray@textuality.comContivo, Inc.dmh@contivo.comMicrosoftandrewl@microsoft.comUniversity of Edinburgh and Markup Technology Ltdrichard@cogsci.ed.ac.ukUniversity of Edinburgh and W3C mailto:ht@w3.orgNamespaces in XML (Second Edition)Textualitytbray@textuality.comContivo, Inc.dmh@contivo.comMicrosoftandrewl@microsoft.comUniversity of Edinburgh and Markup Technology Ltd.richard@cogsci.ed.ac.ukUniform Resource Names (URN) Namespace Definition MechanismsThinking Cat Enterprisesleslie@thinkingcat.comWebWeaving Internet Engineeringdirkx@webweaving.orgIPR Systems Pty Ltd.renato@iprsystems.comCisco Systems Incpaf@cisco.comAugmented BNF for Syntax Specifications: ABNFBrandenburg InternetWorkingdcrocker@bbiw.netTHUS plc.paul.overell@thus.net
Updated references and fix reference to XMLNS which was meant to reference XMLNS11.
Add a set of issues:
"any-uri",
"contacts",
"curie",
"examples",
"i18n",
"mailing-list",
"qname-vs-expname",
"reg-info",
"registrant",
"xml11".
Type: editjulian.reschke@greenbytes.de (2009-12-11):
Update author information.
Type: editjulian.reschke@greenbytes.de (2009-12-12):
In the boilerplate, state where this Internet Draft should be discussed.
Proposal: xml-dev.
Type: editjulian.reschke@greenbytes.de (2009-12-12):
Maybe we should clarify the relation with CURIEs (which can be confused with
QNames)?
Type: editjulian.reschke@greenbytes.de (2009-12-12):
There's a risk that we confuse people by claiming this is about QNames.
What we map to URNs is the triple (namespace-name, local-name, prefix),
where the prefix is optional. The tuple (namespace-name, local-name)
is the *expanded name*, not the QName. Options: (1) just clarify the
prose, (2) rename the URN scheme (is it in use already?) to something
like "xmlname".
Type: changejulian.reschke@greenbytes.de (2009-12-11):
Need to state how non-ASCII characters are mapped to the URN.
In Section 2:
Type: editjulian.reschke@greenbytes.de (2009-12-11):
Update registration info.
In Section 2:
Type: editjulian.reschke@greenbytes.de (2009-12-11):
Update registrant info.
In Section 2:
Type: changejulian.reschke@greenbytes.de (2009-12-12):
Need a grammar for "any valid URI". Do we follow stricly XMLNS,
which would make it a "URI reference" as per RFC 3986, or do we tolerate
junk and/or IRIs (no offense). Also, we need to state that this
part of the URN will be empty for elements that are in no namespace
(right?).
In Section 2:
Type: changejulian.reschke@greenbytes.de (2009-12-11):
Having just examples of QNames in element content might be confusing
to people not familiar with that use case; we also should have at least
one example for an XML element name, and for a QName in content.
(potentially also move the examples out of the registration template?)
Type: changejulian.reschke@greenbytes.de (2009-12-11):
Consider removing any material related to XML 1.1.