[xml] Schema validation bug



I am getting error validating this xml file:

===== a.xml =================================
<?xml version="1.0"?>
<a>
  <b/>
</a>
=============================================

against this schema:

===== a.xsd =================================
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";>
  <xs:complexType name="A">
    <xs:all>
      <xs:element name="b" type="xs:string" minOccurs="0"/>
    </xs:all>
  </xs:complexType>

  <xs:element name="a" type="A"/>
</xs:schema>
=============================================

If there is at least one element an the 'all' group with minOccurs="1",
then everything is OK.

I tried to debug it, but can't undestend whether it is a problem with regular expression engine or just wrong regular expression got constructed from the schema.

Regards,
Alexey Sarytchev.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]