1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2024-10-26 20:25:14 +03:00
libxml2/test/schemas/bug303566_1.xsd
Kasimier T. Buchcik 3eec790cdc 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.
2005-05-10 09:16:19 +00:00

63 lines
1.7 KiB
XML

<?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>