W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > October to December 2004

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

From: Asir Vedamuthu <asirv@webmethods.com>
Date: Thu, 16 Dec 2004 11:18:55 -0800
Message-ID: <5B10E50E14A4594EB1B5566B69AD9407068E6941@maileast>
To: "'C. M. Sperberg-McQueen'" <cmsmcq@acm.org>, W3C XML Schema Comments list <www-xml-schema-comments@w3.org>

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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 6 December 2009 18:13:07 GMT