[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: xmlns created literally

Subject: RE: xmlns created literally
From: Owen Rees <owen.rees@xxxxxx>
Date: Thu, 26 Feb 2009 17:07:17 +0000
RE:  xmlns created literally
--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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.