RE: [xsl] typing the input from within xslt

Subject: RE: [xsl] typing the input from within xslt
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Tue, 4 Nov 2008 15:01:18 -0000
> More than that, it's non-conformant (file URIs may not have 
> query parameters).

We've had this debate before, but I don't think you are right. The doc()
function requires only that the parameter be a legal xs:anyURI, and the
rules for xs:anyURI explicitly require only conformance to the generic
syntax of URIs, not to scheme-specific syntax. XSD 1.0 Part 2, secion

"Each URI scheme imposes specialized syntax rules for URIs in that scheme,
including restrictions on the syntax of allowed fragment identifiers.
Because it is impractical for processors to check that a value is a
context-appropriate URI reference, this specification follows the lead of
[RFC 2396] (as amended by [RFC 2732]) in this matter: such rules and
restrictions are not part of type validity and are not checked by .minimally
conforming. processors."

Similarly, the rules for the doc() function allow any arbitrary mapping from
URIs to document nodes, they do not constrain this to follow the semantics
for URI dereferencing defined for any particular URI scheme (and in fact the
file scheme defines no such semantics).

In other words: it might not be a URI that conforms to the rules of the file
URI scheme, but there is nothing in the XSLT/XPath specs that says it should

Michael Kay 

Current Thread