W3C home > Mailing lists > Public > www-xml-query-comments@w3.org > May 2001

Re: XML query constructors: not well-defined

From: Mary F. Fernandez <mff@research.att.com>
Date: Wed, 02 May 2001 13:52:32 -0400
Message-ID: <3AF04960.9E0DE78E@research.att.com>
To: connolly@w3.org
Cc: www-xml-query-comments@w3.org
Dear Dan,

This is a response to the following message, which you posted to the XML 
Query Working Group's comments list:

   
http://lists.w3.org/Archives/Public/www-xml-query-comments/2001Apr/0014.html

The XML Query Working Group has approved the following response:

    The next draft of the data model includes the following text to
    address your question about node identity:

    "Each kind of node has its own constructor. The effect of a node
    constructor is to create a new node with a unique identity,
    distinct from all other nodes."

    In each individual subsection on nodes, there is an explanation
    such as: 

    "Like all other node constructors, the element node constructor
     has the effect of creating a new node with a unique identity,
     distinct from all other nodes."

    You are correct that a node constructor is not function in the
    mathematical sense, because it has the side effect of creating a
    node with a unique identity.  

    Based on the definition above, using your example below, the
    expression node-equal(e1, e2) is false, because e1 and e2 do not
    have the same identity.  However, value-equal(e1, e2) is true,
    because the nodes are structurally equivalent.  In the next draft
    of the data model, we use 'node-equal' in lieu of '==' and
    'value-equal' in lieu of '='.

    > Let's call the child element nodes e1 and e2:
    >
    >        e1 ::= elemNode("anElt", [])
    >        e2 ::= elemNode("anElt", [])
    >
    > Since elemNode is a function, clearly
    >
    >        elemNode("anElt", []) == elemNode("anElt", [])
    > i.e.    e1 == e2


We appreciate your feedback on the XML Query specifications. Please let
us 
know if this response is satisfactory. If not, please respond to this 
message, explaining your concerns.

Mary Fernandez
On behalf of the XML Query Working Group
-- 
Mary Fernandez                    AT&T Labs - Research          
Principal Technical Staff Member  180 Park Ave., Bldg 103, E243 
mff@research.att.com		  Florham Park, NJ 07932-0971   
http://www.research.att.com/~mff  973-360-8679 FAX: 973-360-8187
Received on Wednesday, 2 May 2001 13:53:23 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 2 February 2007 00:13:02 GMT