[Bug 12127] New: "Root element" in assertion testing

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

           Summary: "Root element" in assertion testing
           Product: XML Schema
           Version: 1.1 only
          Platform: PC
        OS/Version: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Structures: XSD Part 1
        AssignedTo: David_E3@VERIFONE.com
        ReportedBy: mike@saxonica.com
         QAContact: www-xml-schema-comments@w3.org
                CC: cmsmcq@blackmesatech.com


The specification states in part 1, 3.1.31, "To check an assertion, an instance
of the XPath 2.0 data model ([XDM]) is constructed, in which the element
information item being ·assessed· is the root element..."

The term "root element" here is unfortunate. XML 1.0 uses the term for the
outermost element of a document. XDM does not use the term. Saxon's reading of
the spec is that the element becomes the root node of a tree (and is therefore
parentless). Judging from test d4_3_14v14, IBM's interpretation is that the
element becomes the outermost element in a tree whose root is a document node,
the document node being the parent of this element. In consequence, the test 

count(//ele1) eq 1

raises a dynamic error (and hence returns false) in Saxon, because an
expression beginning "/" or "//" cannot be used when the context item is in a
tree whose root is not a document node.

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Friday, 18 February 2011 20:41:22 UTC