Data Model pseudo-code syntax errors

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

Here are some syntax errors I found in the pseudo-code.

4.1 Documents
sequence-map : ... Sequence<UnitValue1) ...
    Insert ">" before ")".

dm-node : ... Sequence<(0,1)Node>
    Move "<" to before "Node".

function dm-node ... "comment") { ...
    Insert "then" before "{".

4.6 Comments
function dm-comment-node ... (infoset-comment-value i) ...
    Add parentheses around "i".

4.8 Text
function dm-char-to-text ... (infoset-char-code c) ...
    Add parentheses around "c".

function dm-text-nodes ... head(t))), ...
    Add another ")" before the comma.

9 Equality
decl of xfo:value-equal:
   Remove italicization. (Or limit it to just "UnitValue"?)

decl of xfo:node-equal:
   Remove italicization.

Issue-0007: TextNodes
text-node : ... Sequence<Node] ...
    Change "]" to ">".

---------------------------------------------

Also, there are two different styles of "let/return".
dm-document-node, dm-element-node, and dm-attribute-node use this style:
       id1 = expr1
       id2 = expr2
       return expr
but dm-collapse-text-node and dm-text-nodes use this style:
       let id1 := expr1,
           id2 := expr2
       return expr
(The second is preferable in that it avoids the first's possible confusion
with an equality-test.)

----------------------------------------------

Also, functions differ on whether the top-most expression in the function
body needs a "return": dm-node, dm-namespace-node, dm-pi-node, and
dm-comment-node have a top-level "return", but dm-char-to-text and
dm-text-nodes don't. (I think it's unnecessary.)

-Michael Dyck

Received on Tuesday, 18 September 2001 01:11:24 UTC