xsl-list
[Top] [All Lists]

RE: [xsl] xmlns created literally

2009-02-26 12:07:54
--On Thursday, February 26, 2009 16:09:30 +0000 Michael Kay wrote:

Section 8 of Namespaces 1.1 says: To conform to this specification, a
processor MUST report violations of namespace well-formedness, with the
exception that it is not REQUIRED to check that namespace names are legal
IRIs. Namespaces 1.0 has essentially the same rule.

Note also, Namespaces 1.1 says: "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. "

Given that XML parsers appear to have universally decided to take
advantage of the freedom to allow any string as a namespace name, we had
to tread very carefully in XSLT because users would get upset if their
documents got through the XML parser only to be rejected by the XSLT
processor. We do say, for xs:element:

[ERR XTDE0835] It is a non-recoverable dynamic error if the effective
value of the namespace attribute is not in the lexical space of the
xs:anyURI data type.

However, that's just a bit of nifty buck-passing, because the XSD 1.0 spec
is rather ambiguous about the lexical space of xs:anyURI, and XSD 1.1 has
cut the Gordian knot by saying it's any character string.

It seems to me that this ends up meaning that an XML namespace is identified by a string.

The comparison is already defined to be case sensitive string comparison.

Namespace names that have the form of a relative URI reference are deprecated; as far as I can tell that is because people mistakenly try to interpret them as URI references rather than as strings.

Apart form the names of some XPath functions, is there any relationship between namespace names and URIs?

Since namespace names do not seem to have any well defined use as URIs would it make sense (apart from the upheaval and reworking) to replace the XPath namespace-uri() and related functions with namespace-name() returning a string and where namespace names are supplied (xsl:namespace etc.) just require a string?

--
Owen Rees; speaking personally, and not on behalf of HP.
========================================================
Hewlett-Packard Limited.   Registered No: 690597 England
Registered Office:  Cain Road, Bracknell, Berks RG12 1HN

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>