- From: Masayasu Ishikawa <mimasa@w3.org>
- Date: Mon, 26 Aug 2002 14:06:14 +0900 (JST)
- To: xmlschema-dev@w3.org
Hello, Suppose that I have a schema like this: <xs:schema version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://example.com/test" xmlns:test="http://example.com/test"> <xs:attributeGroup name="attrs"> <xs:attribute name="id" type="xs:ID"/> <xs:attribute name="class" type="xs:NMTOKENS"/> </xs:attributeGroup> <xs:complexType name="mixed" mixed="true"> <xs:choice minOccurs="0" maxOccurs="unbounded"> <xs:element ref="test:a"/> <xs:element ref="test:b"/> </xs:choice> </xs:complexType> <xs:element name="root"> <xs:complexType> <xs:complexContent> <xs:extension base="test:mixed"> <xs:attribute name="id" type="xs:ID"/> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> <xs:element name="a"> <xs:complexType> <xs:complexContent> <xs:extension base="test:mixed"> <xs:attributeGroup ref="test:attrs"/> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> <xs:element name="b"> <xs:complexType> <xs:complexContent> <xs:extension base="test:mixed"> <xs:attributeGroup ref="test:attrs"/> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> </xs:schema> And an instance would be something like this: <root xmlns="http://example.com/test"> ccc<a>aaa<b>bbb</b>aaa</a>ccc<b>bbb<a>aaa</a>bbb</b>ccc </root> MSV (20020414), Xerces-J 2.0.2 and XML Spy 4.4 reported no problem, but XSV (online version, 1.203.2.47.2.4.2.11/1.106.2.25.2.3) complained like this: Invalid per cvc-complex-type.1.2.3: text not allowed: | ccc| If I change each element declaration like the following, XSV doesn't complain anymore. <xs:element name="root"> <xs:complexType mixed="true"> <xs:complexContent> <xs:extension base="test:mixed"> <xs:attribute name="id" type="xs:ID"/> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> What's/who's wrong? Thanks, -- Masayasu Ishikawa / mimasa@w3.org W3C - World Wide Web Consortium
Received on Monday, 26 August 2002 01:06:16 UTC