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

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

From: Jeni Tennison <jeni@jenitennison.com>
Date: Fri, 7 Jun 2002 11:38:46 +0100
Message-ID: <521625969420.20020607113846@jenitennison.com>
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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:31 GMT