W3C home > Mailing lists > Public > public-qt-comments@w3.org > February 2004

RE: [XQuery] IBM-XQ-011: Validation and identity

From: Michael Rys <mrys@microsoft.com>
Date: Thu, 12 Feb 2004 01:19:28 -0800
Message-ID: <EB0A327048144442AFB15FCE18DC96C702053705@RED-MSG-31.redmond.corp.microsoft.com>
To: "Michael Kay" <mhk@mhk.me.uk>, <public-qt-comments@w3.org>
Michael Kay is correct. Currently validate provides copy-semantics, thus
the new elements are parentless. And this copy semantics is needed
because otherwise we start violating the content models of ancestor
elements. 

 

The update issue is an issue, but node that update only needs to
revalidate the newly inserted nodes and just check for the validity of
the existing nodes (which does not need to generate new nodes).

 

So I would consider this proposed change to be semantically problematic
and don't think it will work.

 

Best regards

Michael

 

  _____  

From: public-qt-comments-request@w3.org
[mailto:public-qt-comments-request@w3.org] On Behalf Of Michael Kay
Sent: Wednesday, February 11, 2004 5:01 PM
To: public-qt-comments@w3.org
Subject: RE: [XQuery] IBM-XQ-011: Validation and identity

 

I agree there are usability problems here. But I don't see how two nodes
with different attributes can have the same identity, and making nodes
mutable at this stage seems too ghastly a prospect to contemplate.

 

I think the current semantics for validate are that the result of
validating an element is a parentless element.

 

Michael Kay

-----Original Message-----
From: public-qt-comments-request@w3.org
[mailto:public-qt-comments-request@w3.org] On Behalf Of Don Chamberlin
Sent: 11 February 2004 23:52
To: public-qt-comments@w3.org
Subject: [XQuery] IBM-XQ-011: Validation and identity


(IBM-XQ-011) Section 3.14 (Validate Expression) states that validating a
node destroys its identity. I believe that this issue needs more
thought. The reason for giving a new identity to a validated node is
that some of its contents may change (for example, default attributes
may appear). But consider the following: 

(a) The validated note has the same parent as the original node, right?
Doesn't this mean that the content of the parent node has changed? If
the parent node can retain its identity, why can't the validated node
retain its identity? 

(b) The working group expects to define update operators that can change
the state of a node while preserving its identity. But presumably the
updated node will need to be revalidated for type-safety. If validation
destroys node identity, how can updates preserve node identity? This
seems to violate our XQuery Requirement (3.2.5) that XQuery must be
defined in a way that does not preclude the later introduction of update
operators. 

(c) Requiring validation to generate new node identities also raises
questions about Requirement (3.4.13) that queries must be able to
preserve the identity of items in the Data Model. 

(d) Requiring validation to generate new node identities also may place
an unnecessary burden on implementations that perform incremental
validation on the data model rather than serializing it and revalidating
the whole tree from scratch. 

(e) Suppose $n is bound to an element node. 
Is "$n is validate{$n}" true? 
Is "$n/.. is validate{$n}/.." true? 
If the answers are not the same, why not? 

--Don Chamberlin
Received on Thursday, 12 February 2004 04:19:41 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:45:17 UTC