[Bug 28241] most names are specified using the EQName production? most?

https://www.w3.org/Bugs/Public/show_bug.cgi?id=28241

--- Comment #4 from Michael Kay <mike@saxonica.com> ---
Well, it's not quite right yet. For example, "names are bound to namespaces" is
misleading. Here's my attempt:

The concept of a QName is defined in [XML Names]. XQuery|XPath uses QNames not
only for element and attribute names, but also for the names of functions,
variables, types, and other constructs.

An *expanded QName* is a triple: its components are a prefix, a local name, and
a namespace URI. In the case of a name in no namespace, the namespace URI and
prefix are both absent. In the case of a name in the default namespace, the
prefix is absent. When comparing two expanded QNames, the prefixes are ignored:
the local name parts must be equal under the Unicode Codepoint Collation, and
the namespace URI parts must either both be absent, or must be equal under the
Unicode Codepoint Collation.

In the XQuery|XPath grammar, QNames representing the names of elements,
attributes, functions, variables, types, or other such constructs are written
as instances of the grammatical production EQName. This allows a QName to be
written in one of three ways:

* local-name only (for example, invoice). A name written in this form has no
prefix, and the rules for determining the namespace depend on the context in
which the name appears

* prefix plus local-name (for example my:invoice). In this case the prefix and
local name of the QName are as written, and the namespace URI is inferred from
the prefix by examining the in-scope namespaces in the static context where the
QName appears; the context must include a binding for the prefix.

* uri plus local-name (for example Q{http://example.com/ns}invoice). In this
case the local name and namespace URI are as written, and the prefix is absent.
This way of writing a QName is context-free, which makes it particularly
suitable for use in queries|expressions that are generated by software.

The first two forms are referred to as *lexical QNames*; the third form is
called a URI-Qualified Name. Collectively they are described by the EQName
production in the XQuery|XPath grammar.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Tuesday, 24 March 2015 17:58:51 UTC