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 Wednesday, 11 February 2004 20:00:42 UTC