"cvc-complex-type.2.4.b" error
Posted: Mon May 21, 2007 10:08 am
a.xsd:
<xs:schema xmlns:a="http://a" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://a" elementFormDefault="qualified">
<xs:element name="root_a">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" ref="a:a"/>
<xs:choice>
<xs:element ref="a:b"/>
<xs:any namespace="http://b" processContents="lax"></xs:any>
</xs:choice>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="a"/>
<xs:element name="b"/>
</xs:schema>
b.xsd:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://b" elementFormDefault="qualified">
<xs:element name="root_b">
<xs:complexType>
<xs:sequence>
<xs:element name="b1"/>
<xs:element name="b2"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
a.nvdl:
<rules xmlns="http://purl.oclc.org/dsdl/nvdl/ns/structure/1.0" xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">
<namespace ns="http://a">
<validate schema="a.xsd"/>
</namespace>
<namespace ns="http://b">
<validate schema="b.xsd"/>
</namespace>
</rules>
a.xml:
<?oxygen NVDLSchema="a.nvdl"?>
<root_a xmlns="http://a">
<a>123</a>
<root_b xmlns="http://b">
<b1>1234</b1>
<b2>1234</b2>
</root_b>
</root_a>
there is a error:
cvc-complex-type.2.4.b: The content of element 'root_a' is not complete. One of '{"http://a":b, WC["http://b"]}' is expected.
is this a bug?
<xs:schema xmlns:a="http://a" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://a" elementFormDefault="qualified">
<xs:element name="root_a">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" ref="a:a"/>
<xs:choice>
<xs:element ref="a:b"/>
<xs:any namespace="http://b" processContents="lax"></xs:any>
</xs:choice>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="a"/>
<xs:element name="b"/>
</xs:schema>
b.xsd:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://b" elementFormDefault="qualified">
<xs:element name="root_b">
<xs:complexType>
<xs:sequence>
<xs:element name="b1"/>
<xs:element name="b2"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
a.nvdl:
<rules xmlns="http://purl.oclc.org/dsdl/nvdl/ns/structure/1.0" xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">
<namespace ns="http://a">
<validate schema="a.xsd"/>
</namespace>
<namespace ns="http://b">
<validate schema="b.xsd"/>
</namespace>
</rules>
a.xml:
<?oxygen NVDLSchema="a.nvdl"?>
<root_a xmlns="http://a">
<a>123</a>
<root_b xmlns="http://b">
<b1>1234</b1>
<b2>1234</b2>
</root_b>
</root_a>
there is a error:
cvc-complex-type.2.4.b: The content of element 'root_a' is not complete. One of '{"http://a":b, WC["http://b"]}' is expected.
is this a bug?