Re: Question about Final Attributes on Elements&In-Reply-To=<1861559007.20020104115946@jenitennison.com>&References=<1861559007.20020104115946@jenitennison.com>

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