Commit 3eec790c authored by Kasimier T. Buchcik's avatar Kasimier T. Buchcik

Added regression a test provided by Heiko Oberdiek (bug #303566).

* test/schemas/bug303566_1* result/schemas/bug303566_1_1*:
  Added regression a test provided by Heiko Oberdiek (bug #303566).

  level for XML Schema IDCs (bug #303566 reported by Heiko Oberdiek).
  This should not affect pattern-like resolution on every level.
parent 22678566
Tue May 10 11:11:26 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
* test/schemas/bug303566_1* result/schemas/bug303566_1_1*:
Added regression a test provided by Heiko Oberdiek (bug #303566).
Mon May 9 17:56:58 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
* pattern.c: Changed the XPath "." to resolve only on the first
level for XML Schema IDCs. This should not affect pattern-like
resolution on every level.
level for XML Schema IDCs (bug #303566 reported by Heiko Oberdiek).
This should not affect pattern-like resolution on every level.
Sun May 8 13:35:39 CEST 2005 Daniel Veillard <daniel@veillard.com>
......
./test/schemas/bug303566_1.xml fails to validate
./test/schemas/bug303566_1.xml:9: element Part: Schemas validity error : Element 'Part' [keyRef 'PartRefCountryDummy']: No match found for key reference ['B'].
<?xml version="1.0"?>
<Test
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="bug303566_1.xsd">
<Country code="D">
<City name="Berlin"
code="B">
<Part country="D"/>
<Part country="B"/>
</City>
</Country>
<Country code="F">
<City name="Paris" code="P">
<Part country="F"/>
<Part country="F"/>
</City>
</Country>
</Test>
<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:simpleType name="codeType">
<xsd:restriction base="xsd:string">
<xsd:pattern value="[A-Z]+"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:element name="Test">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="Country"
maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="Country">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="City"
maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="code"
type="codeType"
use="required"/>
</xsd:complexType>
<xsd:key name="CountryDummyKey">
<xsd:selector xpath="."/>
<xsd:field xpath="@code"/>
</xsd:key>
<xsd:keyref name="PartRefCountryDummy"
refer="CountryDummyKey">
<xsd:selector xpath=".//Part"/>
<xsd:field xpath="@country"/>
</xsd:keyref>
</xsd:element>
<xsd:element name="City">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="Part"
minOccurs="2"
maxOccurs="2"/>
</xsd:sequence>
<xsd:attribute name="name"
type="xsd:string"
use="required"/>
<xsd:attribute name="code"
type="xsd:string"
use="required"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="Part">
<xsd:complexType>
<xsd:attribute name="country"
type="codeType"
use="required"/>
</xsd:complexType>
</xsd:element>
</xsd:schema>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment