- From: Stanley Guan <stanley.guan@oracle.com>
- Date: Thu, 13 Mar 2003 19:03:36 -0800
- To: <xmlschema-dev@w3.org>
- Cc: "Henry S. Thompson" <ht@cogsci.ed.ac.uk>
Based on "new versions of XML Schema REC documents with errata folded in", it seems to me the following schema document should be invalid because the {content type} of derived type (i.e., base2) is mixed while the {content type} of the {base type definition} is not. However, XSV didn't detect such violation. Is it because this new constraint was not implemented yet or my interpretation is wrong? Thx, -Stanley ============================================== Schema Component Constraint: Derivation Valid (Restriction, Complex) 5.4 All of the following must be true: 5.4.1 One of the following must be true: 5.4.1.1 The {content type} of the complex type definition itself must be element-only 5.4.1.2 The {content type} of the complex type definition itself and of the {base type definition} must be mixed =============================================== <?xml version="1.0"?> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <xsd:element name="root"> <xsd:complexType> <xsd:sequence> <xsd:element ref="test" minOccurs="0"/> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:element name="test" type="base1"/> <xsd:complexType name="base1" > <xsd:simpleContent> <xsd:extension base="xsd:integer"> <xsd:attribute name="any"/> </xsd:extension> </xsd:simpleContent> </xsd:complexType> <xsd:complexType name="base2" mixed="true" > <xsd:complexContent> <xsd:restriction base="base1"> <xsd:attribute name="any" use="optional" /> </xsd:restriction> </xsd:complexContent> </xsd:complexType> </xsd:schema>
Received on Thursday, 13 March 2003 22:05:28 UTC