W3C home > Mailing lists > Public > xmlschema-dev@w3.org > July 2002

Validation rules for a complexType

From: John Verhaeg <jverhaeg@metamatrix.com>
Date: Tue, 2 Jul 2002 10:54:44 -0500
Message-ID: <C7CDD3E67B05D411A45800E018C1614EE6D9BA@mail>
To: "XML Schema Mailing List (E-mail)" <xmlschema-dev@w3.org>

It appears to me from looking at the spec that whenever you derive a
complexType from another complexType as a restriction, you have to
re-declare any attributes or children from the supertype in the subtype if
you want them to be available in the subtype.  Is this true?  If so, it
seems like when validating an instance of the subtype, I need look no
farther than the subtype itself (i.e., I don't need to traverse the type
hierarchy to see what's valid).

Also, what's the difference in this scenario between not re-declaring a
child or attribute and declaring a child with maxOccurs=0 or an attribute
with use="prohibited", respectively?

Finally, where in the spec, if anywhere, are these questions answered?

John P. A. Verhaeg
JVerhaeg@MetaMatrix.Com <mailto:JVerhaeg@MetaMatrix.Com>

 <<...OLE_Obj...>> 
11477 Olde Cabin Road Suite 400
Creve Coeur, MO 63141
(314) 739-3190 x150
Received on Tuesday, 2 July 2002 11:54:49 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:55:57 UTC