[QT] CER-06 xs:string/xs:anyURI

Query Lang [Appendix B] xs:string/xs:anyURI

Given the lack of a formal derivation relation between xs:string and xs:anyURI, 
there is a serious usability issue for any function (such as the fn:doc
function) that expects a URI as an argument. If the argument is declared as
xs:string, users will get type errors if they pass data that happens to be
xs:anyURI. Conversely, if the argument is declared as xs:anyURI, users will get
type errors if they pass string literals. Either situation is likely to occur
in practice. We therefore request that xs:anyURI and xs:string be subject to
special promotion rules, such as those applying to xs:float and xs:double to
avoid this problem.

Specifically: A function that expects a parameter $p of type xs:string can be
invoked with a value of type xs:anyURI and a function that expects a parameter
$p of type xs:anyURI can be invoked with a value of type xs:string.

Received on Tuesday, 17 February 2004 11:09:58 UTC