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

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Bugzilla from bugzilla@jessica.w3.org
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: [hidden email]
          Reporter: [hidden email]
        QA Contact: [hidden email]

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.

Reply | Threaded
Open this post in threaded view
|

[Bug 26938] [XDM31] Constraints on elements

Bugzilla from bugzilla@jessica.w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=26938

Jonathan Robie <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--- Comment #1 from Jonathan Robie <[hidden email]> ---
(In reply to Tim Mills from comment #0)
> 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 do believe that these statements give you what you need.

> 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!

XQuery and XPath each have their own sections on consistency constraints, which
add further requirements. I don't think we should move these to XDM, that would
be a drastic restructuring of our work at this late stage.

> 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

That's well specified in the XQuery Update Facility, using the current XDM.

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

Reply | Threaded
Open this post in threaded view
|

[Bug 26938] [XDM31] Constraints on elements

Bugzilla from bugzilla@jessica.w3.org
In reply to this post by Bugzilla from bugzilla@jessica.w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=26938

--- Comment #2 from Tim Mills <[hidden email]> ---
> That's well specified in the XQuery Update Facility, using the current XDM.

Agreed.  I hadn't spotted that this expression causes the inserted nodes to be
copied.

However, I believe that the document would be improved by stating explicitly in
"6.2 Element Nodes" that the data model constrains the parent-child
relationship to a tree.

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

Reply | Threaded
Open this post in threaded view
|

[Bug 26938] [XDM31] Constraints on elements

Bugzilla from bugzilla@jessica.w3.org
In reply to this post by Bugzilla from bugzilla@jessica.w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=26938

Tim Mills <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #3 from Tim Mills <[hidden email]> ---
The WG discussed this in the teleconference on 2014-10-14 and agreed to add
such a constraint.

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