Feedback on XQuery F&O

This feedback applies to the Nov15th XQuery F&O at
http://www.w3.org/TR/2002/WD-xquery-operators-20021115/

  ----

3 (Error function) and Issue #181 (semantics of fn:error)

Consider aligning this function with XSLT's message system (which can
optionally terminate or not).

  ----

8.3.1 (op:duration-equal) Dead code

This function is defined here, but not used in the operator mapping of the
XQuery spec.  Perhaps related to the open item to cut it (issue#185).

  ----

8.3.1-8.3.21 (op:*-equal) Useless definitions

"Returns true if and only if $operand1 is exactly equal to $operand2."
Well, duh.  But what is the meaning of the phrase "is exactly equal to" ??

(The ordinary date/time types point to the XML Schema spec, but for some
reason the Gregorian types do not.  For each type, either point to the XML
Schema spec, or else repeat its definitions here.  Don't make statements
that are devoid of content.)

  ----

13.1.7 (fn:deep-equal)

The equivalent XQuery given for deep-equal() is incorrect.  When both nodes
lack a name, the second condition fails.

A corrected version would be:

if (not(fn:empty(fn:node-name($parameter1)) and
fn:empty(fn:node-name($parameter2)))
  and (fn:node-name($parameter1) != fn:node-name($parameter2)) then false()
else

On a minor related note, this query given will also fail to compile, since
it always writes false instead of false().

  ----

14.3.1 (fn:sequence-deep-equal)

The sequence-deep-equal() function is strangely asymmetric with the
sequence-node-equal() function.  The latter returns the empty sequence if
either argument is empty, but the former does not.

Received on Sunday, 2 February 2003 22:21:21 UTC