RE: Comments on

> The XPath type functions comment(), node(), text(), 
> processing-instruction(), node(), id(),  do not appear to be 
> described in this document.  These functions may occur not 
> just as a qualification in an XPath expression but as 
> stand-alone functions within predicates that test the type of 
> the context node.  As such stand-alone functions they need to 
> be both described in this standards document and bound to an 
> explicit namespace, so that the developer knows their 
> behaviour and what their binding is. 

These things are not functions. They don't behave like functions (in
computing a value that depends on the values of the arguments), they merely
use a function-like syntax.
> These functions should also be described in Appendix B.. 
> Compatability with XPath 1.0.
> The prefixes fn: op: xs: and xdt: are not explicitly mapped 
> to namespaces. While the bindings can be inferred I think a 
> standard should not invite such inferences.

The intention is that the bindings of fn:, xs:, and xdt: should be
explicitly defined in the specifications. The op: prefix doesn't need a
user-visible namespace because it's not intended that the functions should
be user-visible.
> In section 5.1 it is stated that "The semantics of the 
> constructor function xs:TYP (xdt:anyAtomicType) are identical 
> to the semantics of "cast as xs:TYPE(xdt:anyAtomicType)".  
> This begs the question of whether such functions must be 
> implemented/may be implemented/or like those functions bound 
> to the op: namespace will not be implemented.  This issue 
> should be resolved since it impacts upon the portability of 
> XQuery that employs functions in the xs: and xdt: namespaces, 
> rather than a cast.

Constructor functions such as xs:date() must be provided by every
implementation. I would expect them to be very widely used.

Michael Kay
> Omitting these functions from those that must be implemented 
> has the attractive property that all XQuery function which 
> "must be implemented" reside in the
> fn: namespace.
> I hope my comments are viewed as constructive ones..
> Regards, Ian Davis

Received on Wednesday, 13 August 2003 12:01:35 UTC