[Bug 10207] New: [XPath] Matching abstract schema-element tests

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

           Summary: [XPath] Matching abstract schema-element tests
           Product: XPath / XQuery / XSLT
           Version: 2nd Edition Recommendation
          Platform: PC
        OS/Version: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XQuery
        AssignedTo: jonathan.robie@redhat.com
        ReportedBy: oliver@cbcl.co.uk
         QAContact: public-qt-comments@w3.org


The rules for matching schema element tests referring to abstract elements in
XPath 2.0 are not well defined.

The resolution of bug 10065 changed the text of section 2.5.4.4, but this
problem exists with both versions of the text.

The initial rule states (that a node matches if):

A SchemaElementTest matches a candidate element node if all three of the
following conditions are satisfied:

(old)
1. The name of the candidate node matches the specified ElementName or matches
the name of an element in a substitution group headed by an element named
ElementName.

2. derives-from(AT, ET) is true, where AT is the type annotation of the
candidate node and ET is the schema type declared for element ElementName in
the in-scope element declarations.

3. If the element declaration for ElementName in the in-scope element
declarations is not nillable, then the nilled property of the candidate node is
false.

(from bug 10065 - subject to editorial changes)
1. The name of the candidate node matches the specified ElementName or matches
the name of an element in a substitution group headed by an element named
ElementName.  Call this element the substituted element.

2. derives-from(AT, ET) is true, where AT is the type annotation of the
candidate node and ET is the schema type declared for the substituted element
in the in-scope element declarations.

3. If the substituted element is not nillable, then the nilled property of the
candidate node is false.

In both cases if the name of an abstract element is matched then ET is not
defined.

The rules were changed to ensure that any element that matches a schema-element
tests is valid according to the schema the node resides in.  In order to keep
in the spirit of the changed rules we do not want to match nodes whose names
refer to abstract elements.

I believe we should add another condition between conditions 1 and 2 in the new
text (and replace the word "three" with "four" in the paragraph preceding the
list):


The substituted element is not abstract.


This will have to be modified to match the terminology used by the text to
resolve bug 10065.

If this change were adopted in 2.0 then no change need to be made to Formal
Semantics, as it explicitly states that it does not define the case of abstract
elements (Section D.1.1)

-- 
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 Tuesday, 20 July 2010 12:16:03 UTC