- From: Biron,Paul V <Paul.V.Biron@kp.org>
- Date: Mon, 22 Sep 2003 11:08:55 -0700
- To: www-xml-schema-comments@w3.org
- Cc: david.bau@bea.com
- Message-Id: <8904C60CACA7D51191BC00805FEAAF4301A126CD@crdc-exch-7.crdc.kp.org>
This came to xmlschema-dev...I'm forwarding it to www-xml-schema-comments so that it gets properly tracked. pvb -----Original Message----- From: David Bau [mailto:david.bau@bea.com] Sent: Mon, Sep 22, 2003 10:54 To: xmlschema-dev@w3.org Hi all, In working on xmlbeans (http://xml.apache.org/xmlbeans), we found a few things that looked like errors in the current schema-for-schema posted on http://www.w3.org/2001/XMLSchema.xsd Some of them have been discussed here in the past or even mentioned in the errata, but don't seem to be reflected in the posted xsd.... They are all minor things, but they all do get in the way of actually using the schema-for-schema to validate schemas. Here is my list of things: (1) finalDefault needs to permit "list" and "union" (2) the type of the <element> element in an <all> group needs to be given a name so that it is legal to use the type in both a base type and a restriction when using the allModel (otherwise it breaks one of the particle-valid (restriction) rules). (3) The regular expressions that describe integrity constraint xpaths need to be modified to permit whitespaces in certain places, as discussed in one of the errata. Below is my diff -b -u (XMLSchema.xsd.1 is the original)... How should I go about making a request for the schema-for-schema to be updated? Cheers and thanks for any info, David --- XMLSchema.xsd.1 Sat Apr 05 06:14:21 2003 +++ XMLSchema.xsd Mon Sep 22 13:26:44 2003 @@ -174,6 +174,38 @@ </xs:restriction> </xs:simpleType> + <xs:simpleType name="defaultDerivationControl"> <xs:annotation> + <xs:documentation> + A utility type, not for public use</xs:documentation> + </xs:annotation> <xs:restriction base="xs:derivationControl"> + <xs:enumeration value="extension"/> + <xs:enumeration value="restriction"/> + <xs:enumeration value="list"/> + <xs:enumeration value="union"/> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="defaultDerivationSet"> <xs:annotation> + <xs:documentation> + A utility type, not for public use</xs:documentation> + <xs:documentation> + #all or (possibly empty) subset of {extension, restriction, list, union}</xs:documentation> + </xs:annotation> + <xs:union> + <xs:simpleType> + <xs:restriction base="xs:token"> + <xs:enumeration value="#all"/> + </xs:restriction> + </xs:simpleType> + <xs:simpleType> + <xs:list itemType="xs:defaultDerivationControl"/> + </xs:simpleType> + </xs:union> + </xs:simpleType> + <xs:simpleType name="reducedDerivationControl"> <xs:annotation> <xs:documentation> @@ -225,7 +257,7 @@ </xs:sequence> <xs:attribute name="targetNamespace" type="xs:anyURI"/> <xs:attribute name="version" type="xs:normalizedString"/> - <xs:attribute name="finalDefault" type="xs:derivationSet" use="optional" default=""/> + <xs:attribute name="finalDefault" type="xs:defaultDerivationSet" use="optional" default=""/> <xs:attribute name="blockDefault" type="xs:blockSet" use="optional" default=""/> <xs:attribute name="attributeFormDefault" type="xs:formChoice" use="optional" default="unqualified"/> <xs:attribute name="elementFormDefault" type="xs:formChoice" use="optional" default="unqualified"/> @@ -813,8 +845,12 @@ avoid a pblm with the Elt:All/Choice/Seq Particle derivation constraint</xs:documentation> </xs:annotation> - <xs:element name="element"> - <xs:complexType> + <xs:element name="element" type="xs:elementInAll"/> + </xs:choice> + </xs:sequence> + </xs:group> + + <xs:complexType name="elementInAll"> <xs:annotation> <xs:documentation>restricted max/min</xs:documentation> </xs:annotation> @@ -848,10 +884,6 @@ </xs:restriction> </xs:complexContent> </xs:complexType> - </xs:element> - </xs:choice> - </xs:sequence> - </xs:group> <xs:complexType name="all"> <xs:annotation> @@ -1108,7 +1140,9 @@ child:: is also allowed </xs:documentation> </xs:annotation> - <xs:pattern value="(\.//)?(((child::)?((\i\c*:)?(\i\c*|\*)))|\.)(/(((child::)?((\i\c*:)? (\i\c*|\*)))|\.))*(\|(\.//)?(((child::)?((\i\c*:)?(\i\c*|\*)))|\.)(/(((child ::)?((\i\c*:)?(\i\c*|\*)))|\.))*)*"> + <!-- TSH modified to allow white space --> + <xs:pattern + value="(\.\s*//\s*)?(((child\s*::\s*)?((\i\c*:)?(\i\c*|\*)))|\.)(\s*/\s*(((c hild\s*::\s*)?((\i\c*:)?(\i\c*|\*)))|\.))*(\s*\|\s*(\.\s*//\s*)?(((child\s*: :\s*)?((\i\c*:)?(\i\c*|\*)))|\.)(\s*/\s*(((child\s*::\s*)?((\i\c*:)?(\i\c*|\ *)))|\.))*)*"> </xs:pattern> </xs:restriction> </xs:simpleType> @@ -1141,7 +1175,8 @@ Path ::= ('.//')? ( Step '/' )* ( Step | '@' NameTest ) </xs:documentation> </xs:annotation> - <xs:pattern value="(\.//)?((((child::)?((\i\c*:)?(\i\c*|\*)))|\.)/)*((((child::)?((\i\c* :)?(\i\c*|\*)))|\.)|((attribute::|@)((\i\c*:)?(\i\c*|\*))))(\|(\.//)?((((chi ld::)?((\i\c*:)?(\i\c*|\*)))|\.)/)*((((child::)?((\i\c*:)?(\i\c*|\*)))|\.)|( (attribute::|@)((\i\c*:)?(\i\c*|\*)))))*"> + <!-- TSH modified to allow white space --> + <xs:pattern value="(\.\s*//\s*)?((((child\s*::\s*)?((\i\c*:)?(\i\c*|\*)))|\.)\s*/\s*)*(( ((child\s*::\s*)?((\i\c*:)?(\i\c*|\*)))|\.)|((attribute\s*::\s*|@\s*)((\i\c* :)?(\i\c*|\*))))(\s*\|\s*(\s*\.//\s*)?((((child\s*::\s*)?((\i\c*:)?(\i\c*|\* )))|\.)/)*((((child\s*::\s*)?((\i\c*:)?(\i\c*|\*)))|\.)|((attribute\s*::\s*| @\s*)((\i\c*:)?(\i\c*|\*)))))*"> </xs:pattern> </xs:restriction> </xs:simpleType>
Received on Monday, 22 September 2003 14:31:16 UTC