DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17304>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17304 Constraints on XML Rep. of Complex Type Summary: Constraints on XML Rep. of Complex Type Product: Xerces2-J Version: 2.3.0 Platform: PC OS/Version: Windows NT/2K Status: NEW Severity: Normal Priority: Other Component: XML Schema Structures AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] CC: [EMAIL PROTECTED] According to section 3.4.3 of the schema-structures specs: "In addition to the conditions imposed on <complexType> element information items by the schema for schemas, all of the following must be true: 1 If the <complexContent> alternative is chosen, the type definition �resolved� to by the �actual value� of the base [attribute] must be a complex type definition; 2 If the <simpleContent> alternative is chosen, all of the following must be true: 2.1 The type definition �resolved� to by the �actual value� of the base [attribute] must be one of the following: 2.1.1 a complex type definition whose {content type} is a simple type definition; 2.1.2 ↑only if the <restriction> alternative is also chosen, a complex type definition whose {content type} is mixed and a particle which is �emptiable�, as defined in Particle Emptiable(�3.9.6);↑ 2.1.3 only if the <extension> alternative is also chosen, a simple type definition." Now cosider the following schema code: <?xml version="1.0"?> <schema xmlns ="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.schemaTest.org/IBM3_4v34" xmlns:v34 ="http://www.schemaTest.org/IBM3_4v34"> <complexType name="base" mixed="true"> <sequence> <element name="bbb" minOccurs="0" maxOccurs="0"> <simpleType> <restriction base="float"/> </simpleType> </element> </sequence> </complexType> <complexType name="derived"> <simpleContent> <restriction base="v34:base"> <simpleType> <restriction base="float"/> </simpleType> </restriction> </simpleContent> </complexType> <element name="root" type="anyType"/> </schema> This is a valid schema file, but the parser generates the following error: "[Error] ibm3_4v33.xsd:25:30: src-ct.2: Complex Type Definition Representation Error for type 'derived'. When simpleContent is used, the base type must be a complexType whose content type is simple, or, only if extension is specified, a simple type." Clause (2.1.2) applies to this test case where the element declared in the base type is emptiable, and hence the schema is valid. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
