W3C home > Mailing lists > Public > xmlschema-dev@w3.org > May 2010

RE: Implementing the DOM3 Val Spec in Javascript, problem with UPA and creating PSVI.

From: Michael Kay <mike@saxonica.com>
Date: Sat, 1 May 2010 11:45:44 +0100
To: "'Casey Jordan'" <casey.jordan@jorsek.com>, <xmlschema-dev@w3.org>
Message-ID: <FF56C381C4A74F6B956748DB403F9AFD@Sealion>

 > Suppose I have a schema with a type like this:

<xs:complexType name="my.type" mixed="false">
            <xs:element ref="h"/>
                <xs:element ref="h-sub" maxOccurs="unbounded" />
                <xs:element ref="section" />
            <xs:element ref="section" minOccurs="0" maxOccurs="unbounded" />
 > When using finite automata, and the above pattern, while you can
determine if a document is valid, it would be impossible to determine if a
"section" element belonged to the xs:choice or the xs:sequence making it
also impossible to provide a complete PSVI.  
I'm having difficulty seeing the problem. A <section> that immediately
follows the <h> can only satisfy the choice. A <section> that immediately
follows an <h-sub> or another <section> can only satisfy the final particle.

If the choice were optional or repeatable, this content model would violate
UPA. (Though Saxon would actually allow it through, since Saxon only
attributes element instances to declarations, not to particles, and in this
case the two particles refer to the same element declaration.) 

Michael Kay
Received on Saturday, 1 May 2010 10:46:13 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:56:17 UTC