[F&O] XSCH-FO-003 fn:data algorithm description

Dear Colleagues,

This comment pertains to the 25 December 2003 internal WD of XQuery 1.0
and XPath 2.0 Functions and Operators, as provided to our WG [1].

[1] 
http://lists.w3.org/Archives/Member/w3c-xml-schema-wg/2004Feb/0000.html

Xan Gregg, on behalf of the XML Schema Working Group
----------------------------------------------------

XSCH-FO-003 fn:data algorithm description (2.3)

        fn:data($arg as item()*) as xdt:anyAtomicType*

        Summary: fn:data takes a sequence of items and returns a sequence
        of atomic values.

        The result of fn:data is the sequence of atomic values produced 
by
        applying the following rules to each item in $arg:
           *  If the item is an atomic value, it is returned.
           *  If the item is a node, fn:data() returns the typed value of
            the node as defined by the accessor function dm:typed-value
            in Section 6.6 typed-value AccessorDM.

The use of "returns" in the item description is confusing (since it
implies the end of the function), and we're not sure what happens when
the item is a node with a list type itself, since a sequence cannot
contain other sequences.  Perhaps it would be less confusing if the
process were described as first creating an empty sequence, and then
appending values to it for each input item as appropriate, and finally
returning the composed sequence.

Received on Sunday, 15 February 2004 10:20:00 UTC