- From: Jeni Tennison <jeni@jenitennison.com>
- Date: Fri, 7 Jun 2002 11:38:46 +0100
- To: "Norman E. Carpenter II" <theacademe@yahoo.com>
- CC: xmlschema-dev@w3.org
Hi Norman, I've lost the thread, but... > So if you did > > <xs:element name="foo" type="xs:decimal" final="restriction" /> > > then > > <xs:element name="bar" type="xs:integer" substitutionGroup="foo" /> > > would be invalid Yes, because clause 2.1 of Schema Component Constraint: Type Derivation OK (Simple) (http://www.w3.org/TR/xmlschema-1/#cos-st-derived-ok) is false since 'restriction' is in the {substitution group exclusions} of the 'foo' element declaration. > but if you did: > > <xs:element name="foo" type="xs:string" final="restriction" /> > > then > > <xs:element name="bar" type="xs:integer" substitutionGroup="foo" /> > > would be valid? No, because xs:integer is not the same as nor derived from xs:string, and both xs:integer and xs:string are atomic (rather than list or union) types, and therefore clause 2.2 of Schema Component Constraint: Type Derivation OK (Simple) (as above) is false. Cheers, Jeni --- Jeni Tennison http://www.jenitennison.com/
Received on Friday, 7 June 2002 06:38:48 UTC