W3C home > Mailing lists > Public > public-qt-comments@w3.org > August 2005

[Bug 1861] New: [Xquery] Text node constructors: parent property

From: <bugzilla@wiggum.w3.org>
Date: Fri, 19 Aug 2005 15:58:15 +0000
To: public-qt-comments@w3.org
Cc:
Message-Id: <E1E69G3-0004IL-Gf@wiggum.w3.org>

http://www.w3.org/Bugs/Public/show_bug.cgi?id=1861

           Summary: [Xquery] Text node constructors: parent property
           Product: XPath / XQuery / XSLT
           Version: Last Call drafts
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XQuery
        AssignedTo: chamberl@almaden.ibm.com
        ReportedBy: mike@saxonica.com
         QAContact: public-qt-comments@w3.org


Section 3.7.3.4 says

The parent property of the text node is the node constructed by the nearest
containing element or document node constructor, either direct or computed, if
such a constructor exists; otherwise parent is empty.

This seems quite wrong. Consider

document{
  let $x := text{"fred"}
  return count($x/..)
}

The "nearest containing document constructor" is irrelevant here. This returns zero.

As with other constructors, the new node initially has no parent; evaluating the
document{} constructor makes a copy of the text node that does have a parent.

Michael Kay
Received on Friday, 19 August 2005 15:58:22 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:57:07 UTC