- From: Tom Moog <tmoog@sarvega.com>
- Date: Tue, 11 Jun 2002 14:09:19 -0500
- CC: xmlschema-dev@w3.org
In a recent book on xml schema there is an example that shows a complex type with complex content being coerced to simple content because of an empty restriction plus mixed content. This looks really odd and seems to violate the idea that simple content and element content can't appear in the same derivation hierarchy. Is this valid ? The author appears to know that this is unusual because she adds, "This is the only case where a restriction element may have both a base attribute and a simpleType child". <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" > <xs:complexType name="BaseType" mixed="true"> <xs:sequence minOccurs="0"> <xs:element name="a" type="xs:string" /> </xs:sequence> </xs:complexType> <xs:complexType name="DerivedType" mixed="true"> <xs:complexContent> <xs:restriction base="BaseType"> <xs:simpleType> <xs:restriction base="xs:string" /> </xs:simpleType> </xs:restriction> </xs:complexContent> </xs:complexType> </xs:schema>
Received on Tuesday, 11 June 2002 15:10:24 UTC