[Bug 26938] New: [XDM31] Constraints on elements

https://www.w3.org/Bugs/Public/show_bug.cgi?id=26938

            Bug ID: 26938
           Summary: [XDM31] Constraints on elements
           Product: XPath / XQuery / XSLT
           Version: Working drafts
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Data Model 3.1
          Assignee: ndw@nwalsh.com
          Reporter: tim@cbcl.co.uk
        QA Contact: public-qt-comments@w3.org

Unless I'm missing something, the data model doesn't seem to constrain an
element not to be a parent of itself explicitly.

There are some hints that this is the case, such as "Nodes form a tree." in
section 2.1 Terminology.  It can be inferred from "2.4 Document Order" where a
total order cannot be defined if a node can be its own parent.

I'd have hoped for a specific constraint in "3 Data Model Construction" but
find:

"There are no constraints on how an instance of the data model may be
constructed directly, save that the resulting instance must satisfy all of the
constraints described in this document."

which seems a little recursive!

Another possible location for making this explicit would be in under "Element
Nodes" in "6.2 Element Nodes" which currently reads:

* If a node N is among the children of an element E, then the parent of N must
be E.
* ... if a node N has a parent element E, then N must be among the children of
E.

but this doesn't prevent a node being its own parent.

This has a bearing on the result of the XQuery Update expression

copy $node := <node />
modify insert node $node into $node
return $node

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Tuesday, 30 September 2014 09:18:31 UTC