- From: <bugzilla@jessica.w3.org>
- Date: Thu, 11 Aug 2011 16:00:55 +0000
- To: public-xml-schema-testsuite@w3.org
http://www.w3.org/Bugs/Public/show_bug.cgi?id=13760
Summary: Handling of open contents in complex type extension
Product: XML Schema Test Suite
Version: 2006-11-06
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: normal
Priority: P2
Component: Saxon tests
AssignedTo: cmsmcq@blackmesatech.com
ReportedBy: sandygao@ca.ibm.com
QAContact: public-xml-schema-testsuite@w3.org
Schema "saxonData/Open/open031.xsd" in test "open031" (expected to be valid)
has:
<xs:defaultOpenContent mode="suffix" appliesToEmpty="false">
<xs:annotation/>
<xs:any namespace="http://nonempty.com/" processContents="lax"/>
</xs:defaultOpenContent>
<xs:complexType name="B">
<xs:openContent mode="interleave">
<xs:any namespace="http://open.com/" processContents="lax"/>
</xs:openContent>
<xs:sequence>
<xs:element name="a" maxOccurs="unbounded"/>
<xs:element name="b" minOccurs="0"/>
<xs:element name="c" minOccurs="0"/>
<xs:element name="d" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="R">
<xs:complexContent>
<xs:extension base="B">
<xs:sequence/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
Note that type "R" gets both the default open content and the inherited open
content from the base type. The 2 open contents are merged where "mode" comes
from the default open content "suffix". Now "R" has "suffix" open content but
"B" has "interleave", causing the schema to be invalid.
Either changing "suffix" to "interleave" on the default open content, or adding
an explicit "mode=none" open content to "R", will make the schema valid, and
will work with the accompanying instance tests.
It may be useful to add a negative test using the current form of this schema.
--
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
Received on Thursday, 11 August 2011 16:00:56 UTC