RE: Do skip wildcards block validation? Possible error in Schema -Validity Assessment (Element)

Michael,

This is a bug in XML Schema 1.0 REC, right?

Asir

-----Original Message-----
From: www-xml-schema-comments-request@w3.org
[mailto:www-xml-schema-comments-request@w3.org] On Behalf Of C. M.
Sperberg-McQueen
Sent: Wednesday, October 27, 2004 5:30 PM
To: W3C XML Schema Comments list
Subject: Do skip wildcards block validation? Possible error in
Schema-Validity Assessment (Element)


I believe a careful reading of the spec shows that as currently
defined, schema-validity assessment is not possible for any schema +
element pair in which an element in the subtree dominated by the
validation root matches a 'skip' wildcard in the schema.  If this is
so, I think it's a fairly serious bug.

A brief summary of the problem follows; after that brief summary, I
give a more detailed description of the problem and propose some
sample wording for a fix.  A very detailed account of the problem in
the form of an informal validation trace is appended.


1 BRIEF SUMMARY

Consider a schema with an element declaration for 'sandbox', the type
for which is a single 'skip' wildcard with maxOccurs unbounded.

If in a document we have an element s1 which matches the element
declaration for 'sandbox', and an element p3 which is a child of s1,
then any attempt to validate element s1 leads us through the
validation rule Schema Validity Assessment (Element) of section 3.3.4
in Structures.

When applied to element s1, clause 2 of validation rule Schema
Validity Assessment (Element) requires among other things that the
schema-validity of all children be assessed using the same validation
rule, Schema Validity Assessment (Element).  By our hypothesis, among
those children is element p3.

Rule Schema-Validity Assessment (Element) does not apply to elements
whose context-determined declaration is 'skip' and which lack an
xsi:type attribute.  So we cannot validate p3, and thus cannot satisfy
clause 2 of our attempt to validate s1.

I believe the error here is that the rule Schema-Validity Assessment
(Element) should provide for elements whose context-determined
declaration is 'skip' but does not do so.  (A side issue also arises
when the element has an xsi:type attribute, which relates to the
priority rule following Schema-Validity Assessment (Element), which I
commented on in a separate email today.  When the rule is recast,
I believe the wording also needs to be changed to make clear that if
the context-determined declaration is 'skip', the element must not be
validated even if it has an xsi:type attribute.  The behavior of XSV
and Xerces J suggests that their authors agree.)

[truncated]

Received on Thursday, 16 December 2004 19:20:07 UTC