- From: Eddie Robertsson <erobertsson@allette.com.au>
- Date: Fri, 02 Aug 2002 11:59:12 +1000
- To: zze-MARCHEGAY Michael stagiaire FTRD/DTL/LAN <michael.marchegay@rd.francetelecom.com>
- CC: xmlschema-dev@w3.org
Hi Michael, >I have a question concerning restriction facets. >When a derivation by restriction of a simpleType is performed, are >the facets of the base type inherited by the deriving type? > Yes, the facets on the base type are still enforced for the derived types which makes your example below invalid. >For example, which content do the following schema allow for bar element? > - A, AA and AAA? > - AA and AAA? > - ...? > It will never come to this since the schema below is invalid and hence can't be used to validate a document. ><schema> > <simpleType name="foo"> > <restriction base="string"> > <minLength value="2"/> > </restriction> > </simpleType> > > <element name="bar"> > <simpleType> > <restriction base="foo"> > <enumeration value="A"/> > This is the enumeration value that is invalid. If you remove "A" your schema is fine. > <enumeration value="AA"/> > <enumeration value="AAA"/> > </restriction> > </simpleType> > </element> ></schema> > >Thanks. > Cheers, /Eddie
Received on Thursday, 1 August 2002 21:44:02 UTC