Data Model pseudo-code: more errors

XQuery 1.0 and XPath 2.0 Data Model
W3C Working Draft
7 June 2001

4.1 Documents

In the declaration of sequence-map, the first occurrence of
    UnitValue2
should be
    Sequence(0,1)<UnitValue2>
in order to handle applying it to dm-node and delete-whitespace-node.

Also, section 2 says that a UnitValue refers to a node or a simple value,
but the application of sequence-map to dm-node, dm-namespace-node, and
dm-attribute-node requires that the 'UnitValue1' in its declaration
include InfoItems as well.

The definition of dm-node assumes a declaration of the "not" function:
    not : xs:boolean -> xs:boolean


4.2 Elements ; 4.3 Attributes

The definitions of dm-element-node and dm-attribute-node assume the
declaration of the "xfo:expanded-QName" function:
    xfo:expanded-QName : ( Sequence(0,1)<xs:anyURI>, xs:string ) ->
xs:QName


4.5 Processing Instructions

The definition of dm-pi-node assumes a declaration of the "xfo:NCName"
function:
    xfo:NCName : xs:string -> xs:NCName


4.8 Text

The definition of dm-char-to-text assumes a declaration of the
"code2string" function:
    code2string : Code -> xs:string

In the declaration of
    dm-text-node
the identifier should actually be
    dm-text-nodes

In the definition of
    dm-collapse-text-node
the identifier should actually be
    dm-collapse-text-nodes

The definition of dm-collapse-text-nodes assumes a declaration of the
"delete-whitespace-node" function:
    delete-whitespace-node : Node -> Sequence(0,1)<Node>

The definition of dm-text-nodes assumes a declaration of the "xfo:concat"
function:
    xfo:concat : (xs:string, xs:string) -> xs:string


6 Sequences:

The declaration for 'empty-sequence' does not suggest that it is a
function. You could change it to:
    empty-sequence : () -> Sequence<UnitValue>
Moreover, the declaration could indicate that result is empty:
    empty-sequence : () -> Sequence(0,0)<UnitValue>

-Michael Dyck

Received on Thursday, 4 October 2001 03:28:23 UTC