summaryrefslogtreecommitdiff
path: root/test/schemas
diff options
context:
space:
mode:
authorMike Hommey <glandium@debian.org>2006-01-06 18:28:17 +0100
committerMike Hommey <glandium@debian.org>2006-01-06 18:28:17 +0100
commit0fd83af441e251fc23fc1af7959fd6ecfa105fe1 (patch)
treea2b35749a66abce02e6f07983ef50618d93bef58 /test/schemas
parent17049f05f9ef09b3dc2a9c5d1de3f21de7c03193 (diff)
downloadlibxml2-0fd83af441e251fc23fc1af7959fd6ecfa105fe1.tar.gz
Load /tmp/tmp.U9vXwU/libxml2-2.6.23 intoupstream/2.6.23
local/libxml2/branches/upstream/current.
Diffstat (limited to 'test/schemas')
-rw-r--r--test/schemas/bug321475_0.xml10
-rw-r--r--test/schemas/bug321475_1.xsd48
-rw-r--r--test/schemas/bug322411_0.xml93
-rw-r--r--test/schemas/bug322411_1.xsd35
-rw-r--r--test/schemas/bug323510_0.xml3
-rw-r--r--test/schemas/bug323510_1.xsd12
-rw-r--r--test/schemas/decimal-1.xml37
-rw-r--r--test/schemas/decimal-1.xsd29
-rw-r--r--test/schemas/decimal-1_0.xml24
-rw-r--r--test/schemas/decimal-1_1.xsd19
-rw-r--r--test/schemas/decimal-2_0.xml14
-rw-r--r--test/schemas/decimal-2_1.xsd18
-rw-r--r--test/schemas/decimal-3_0.xml17
-rw-r--r--test/schemas/decimal-3_1.xsd18
-rw-r--r--test/schemas/idc-keyref-err1_0.xml14
-rw-r--r--test/schemas/idc-keyref-err1_1.xsd53
16 files changed, 444 insertions, 0 deletions
diff --git a/test/schemas/bug321475_0.xml b/test/schemas/bug321475_0.xml
new file mode 100644
index 0000000..6190231
--- /dev/null
+++ b/test/schemas/bug321475_0.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<animation xmlns="http://www.collada.org/2005/11/COLLADASchema"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.collada.org/2005/11/COLLADASchema bug321475.xsd">
+ <asset/>
+ <source/>
+ <sampler/>
+ <channel/>
+</animation>
+
diff --git a/test/schemas/bug321475_1.xsd b/test/schemas/bug321475_1.xsd
new file mode 100644
index 0000000..b714a0d
--- /dev/null
+++ b/test/schemas/bug321475_1.xsd
@@ -0,0 +1,48 @@
+<?xml version="1.0"?>
+<xs:schema targetNamespace="http://www.collada.org/2005/11/COLLADASchema"
+ xmlns="http://www.collada.org/2005/11/COLLADASchema"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ elementFormDefault="qualified" version="1.4.0" xml:lang="EN">
+ <xs:element name="animation">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="asset" minOccurs="0"/>
+ <xs:choice>
+ <xs:sequence>
+ <xs:element ref="source" maxOccurs="unbounded"/>
+ <xs:choice>
+ <xs:sequence>
+ <xs:element ref="sampler" maxOccurs="unbounded"/>
+ <xs:element ref="channel" maxOccurs="unbounded"/>
+ <xs:element ref="animation" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:element ref="animation" maxOccurs="unbounded"/>
+ </xs:choice>
+ </xs:sequence>
+ <xs:sequence>
+ <xs:element ref="sampler" maxOccurs="unbounded"/>
+ <xs:element ref="channel" maxOccurs="unbounded"/>
+ <xs:element ref="animation" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:element ref="animation" maxOccurs="unbounded"/>
+ </xs:choice>
+ <xs:element ref="extra" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:attribute name="id" type="xs:ID"/>
+ <xs:attribute name="name" type="xs:NCName"/>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="extra"/>
+ <xs:element name="asset"/>
+ <xs:element name="channel"/>
+ <xs:element name="sampler"/>
+ <xs:element name="source"/>
+ <xs:element name="technique"/>
+</xs:schema>
+
+
+
+
+ \ No newline at end of file
diff --git a/test/schemas/bug322411_0.xml b/test/schemas/bug322411_0.xml
new file mode 100644
index 0000000..f883648
--- /dev/null
+++ b/test/schemas/bug322411_0.xml
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
+<ELEMENTS>
+ <ELEMENT>
+ <items>
+ <item>1</item>
+ <item>2</item>
+ <item>3</item>
+ <item>4</item>
+ <item>5</item>
+ <!-- Some dupls. -->
+ <item>dupl1</item>
+ <item>dupl2</item>
+ <item>dupl3</item>
+ <item>dupl4</item>
+ <item>dupl5</item>
+ <item>dupl6</item>
+ <item>dupl7</item>
+ <item>dupl8</item>
+ <item>dupl9</item>
+ <item>dupl10</item>
+ <item>dupl11</item>
+
+ <item>6</item>
+ <item>7</item>
+ <item>8</item>
+ <item>9</item>
+ <item>10</item>
+ <item>11</item>
+ <items>
+ <item>12</item>
+ <item>13</item>
+ <item>14</item>
+ <item>15</item>
+ <!-- Some dupls. -->
+ <item>dupl1</item>
+ <item>dupl2</item>
+ <item>dupl3</item>
+ <item>dupl4</item>
+ <item>dupl5</item>
+ <item>dupl6</item>
+ <item>dupl7</item>
+ <item>dupl8</item>
+ <item>dupl9</item>
+ <item>dupl10</item>
+ <item>dupl11</item>
+
+ <item>16</item>
+ <item>17</item>
+ <item>18</item>
+ <item>19</item>
+ <item>20</item>
+ <item>21</item>
+ </items>
+ <items>
+ <item>22</item>
+ <item>23</item>
+ <item>24</item>
+ <item>25</item>
+ <item>26</item>
+ <item>27</item>
+ <item>28</item>
+ <item>29</item>
+ <item>30</item>
+ <item>31</item>
+ <item>32</item>
+ <item>33</item>
+ <item>34</item>
+ <item>35</item>
+ <item>36</item>
+ <item>37</item>
+ <item>38</item>
+ <item>39</item>
+ <item>40</item>
+ <item>41</item>
+ <!-- Some dupls. -->
+ <item>dupl1</item>
+ <item>dupl2</item>
+ <item>dupl3</item>
+ <item>dupl4</item>
+ <item>dupl5</item>
+ <item>dupl6</item>
+ <item>dupl7</item>
+ <item>dupl8</item>
+ <item>dupl9</item>
+ <item>dupl10</item>
+ <item>dupl11</item>
+ </items>
+ </items>
+ <!-- Keyrefs. -->
+ <ref>41</ref>
+ </ELEMENT>
+</ELEMENTS>
+
diff --git a/test/schemas/bug322411_1.xsd b/test/schemas/bug322411_1.xsd
new file mode 100644
index 0000000..383dee6
--- /dev/null
+++ b/test/schemas/bug322411_1.xsd
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+ <xsd:element name="items">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="item" maxOccurs="unbounded" type="xsd:string"/>
+ <xsd:element ref="items" minOccurs="0" maxOccurs="2"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:unique name="ItemUnique">
+ <xsd:selector xpath="item"/>
+ <xsd:field xpath="."/>
+ </xsd:unique>
+ </xsd:element>
+
+ <xsd:element name="ELEMENTS">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="ELEMENT">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="items"/>
+ <xsd:element name="ref" type="xsd:string" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:keyref name="ItemRef" refer="ItemUnique">
+ <xsd:selector xpath="ref"/>
+ <xsd:field xpath="."/>
+ </xsd:keyref>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+</xsd:schema>
diff --git a/test/schemas/bug323510_0.xml b/test/schemas/bug323510_0.xml
new file mode 100644
index 0000000..ce7647d
--- /dev/null
+++ b/test/schemas/bug323510_0.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<foo/>
+
diff --git a/test/schemas/bug323510_1.xsd b/test/schemas/bug323510_1.xsd
new file mode 100644
index 0000000..8b047ce
--- /dev/null
+++ b/test/schemas/bug323510_1.xsd
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+ <xs:element name="foo">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="bar" minOccurs="1" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+
+</xs:schema> \ No newline at end of file
diff --git a/test/schemas/decimal-1.xml b/test/schemas/decimal-1.xml
new file mode 100644
index 0000000..4568ff1
--- /dev/null
+++ b/test/schemas/decimal-1.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<!-- test the values:
+ - BAD
+ + BAD
+ 1.
+ .1
+ 0.
+ .0
+ - 1 BAD
+ + 1 BAD
+ . BAD
+ 000 !
+ -->
+<foo
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="decimal-1.xsd">
+ <!-- The good ones. -->
+ <val> 0. </val>
+ <val> .0 </val>
+ <val> .10 </val>
+ <val> 01. </val>
+ <val> 000 </val>
+ <val>123456789012345678</val>
+ <val>-123456789012345678</val>
+ <val>0.123456789012345678</val>
+ <val>-0.123456789012345678</val>
+ <!-- The bad ones. -->
+ <val>.</val>
+ <val>-</val>
+ <val>+</val>
+ <val>*</val>
+ <val>- 1</val>
+ <val>+ 1</val>
+ <val>+ 0</val>
+ <val>- 0</val>
+ <!--ref>0.0</ref-->
+</foo>
diff --git a/test/schemas/decimal-1.xsd b/test/schemas/decimal-1.xsd
new file mode 100644
index 0000000..830ca3e
--- /dev/null
+++ b/test/schemas/decimal-1.xsd
@@ -0,0 +1,29 @@
+<?xml version="1.0"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+ <xsd:simpleType name="myDecimal">
+ <xsd:restriction base="xsd:decimal">
+ <xsd:totalDigits value="18"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:element name="foo">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="val" type="myDecimal" maxOccurs="unbounded"/>
+ <xsd:element name="ref" type="myDecimal" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <!--xsd:key name="myKey">
+ <xsd:selector xpath="val"/>
+ <xsd:field xpath="."/>
+ </xsd:key>
+
+ <xsd:keyref name="myKeyRef" refer="myKey">
+ <xsd:selector xpath="ref"/>
+ <xsd:field xpath="."/>
+ </xsd:keyref-->
+ </xsd:element>
+
+</xsd:schema>
diff --git a/test/schemas/decimal-1_0.xml b/test/schemas/decimal-1_0.xml
new file mode 100644
index 0000000..7bf3719
--- /dev/null
+++ b/test/schemas/decimal-1_0.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<foo
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="decimal-1.xsd">
+ <!-- The good ones. -->
+ <val> 0. </val>
+ <val> .0 </val>
+ <val> .10 </val>
+ <val> 01. </val>
+ <val> 000 </val>
+ <val>123456789012345678</val>
+ <val>-123456789012345678</val>
+ <val>0.123456789012345678</val>
+ <val>-0.123456789012345678</val>
+ <!-- The bad ones. -->
+ <val>.</val>
+ <val>-</val>
+ <val>+</val>
+ <val>*</val>
+ <val>- 1</val>
+ <val>+ 1</val>
+ <val>+ 0</val>
+ <val>- 0</val>
+</foo>
diff --git a/test/schemas/decimal-1_1.xsd b/test/schemas/decimal-1_1.xsd
new file mode 100644
index 0000000..f598c86
--- /dev/null
+++ b/test/schemas/decimal-1_1.xsd
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+ <xsd:simpleType name="myDecimal">
+ <xsd:restriction base="xsd:decimal">
+ <xsd:totalDigits value="18"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:element name="foo">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="val" type="myDecimal" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ </xsd:element>
+
+</xsd:schema>
diff --git a/test/schemas/decimal-2_0.xml b/test/schemas/decimal-2_0.xml
new file mode 100644
index 0000000..166f781
--- /dev/null
+++ b/test/schemas/decimal-2_0.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0"?>
+<foo
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="decimal-2.xsd">
+ <!-- The good ones. -->
+ <val>0.1</val>
+ <val>0.001</val>
+ <val>0.0</val>
+ <val>-0.0</val>
+ <val>1</val>
+ <!-- The bad ones. -->
+ <val>-0.1</val>
+ <val>-1</val>
+</foo>
diff --git a/test/schemas/decimal-2_1.xsd b/test/schemas/decimal-2_1.xsd
new file mode 100644
index 0000000..cc71670
--- /dev/null
+++ b/test/schemas/decimal-2_1.xsd
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+ <xsd:simpleType name="myDecimal">
+ <xsd:restriction base="xsd:decimal">
+ <xsd:minInclusive value="0"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:element name="foo">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="val" type="myDecimal" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+</xsd:schema>
diff --git a/test/schemas/decimal-3_0.xml b/test/schemas/decimal-3_0.xml
new file mode 100644
index 0000000..fec1ed3
--- /dev/null
+++ b/test/schemas/decimal-3_0.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<foo
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="decimal-3.xsd">
+ <!-- The good ones. -->
+ <val>0.12</val>
+ <val>0.0</val>
+ <val>0.02</val>
+ <val>12</val>
+ <val>1.2</val>
+ <!-- The bad ones. -->
+ <val>0.123</val>
+ <val>0.023</val>
+ <val>123</val>
+ <val>12.3</val>
+</foo>
+
diff --git a/test/schemas/decimal-3_1.xsd b/test/schemas/decimal-3_1.xsd
new file mode 100644
index 0000000..23ae8f7
--- /dev/null
+++ b/test/schemas/decimal-3_1.xsd
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+ <xsd:simpleType name="myDecimal">
+ <xsd:restriction base="xsd:decimal">
+ <xsd:totalDigits value="2"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:element name="foo">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="val" type="myDecimal" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+</xsd:schema>
diff --git a/test/schemas/idc-keyref-err1_0.xml b/test/schemas/idc-keyref-err1_0.xml
new file mode 100644
index 0000000..64a1d0b
--- /dev/null
+++ b/test/schemas/idc-keyref-err1_0.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0"?>
+<Foo
+ xmlns="urn:test:foo"
+ xmlns:foo="urn:test:foo"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:test:foo idc-keyref_1.xsd">
+
+ <Def>
+ <Link foo:linkKey="L4"/>
+ </Def>
+
+ <Ref foo:linkRef="L4"/>
+
+</Foo> \ No newline at end of file
diff --git a/test/schemas/idc-keyref-err1_1.xsd b/test/schemas/idc-keyref-err1_1.xsd
new file mode 100644
index 0000000..43c769f
--- /dev/null
+++ b/test/schemas/idc-keyref-err1_1.xsd
@@ -0,0 +1,53 @@
+<?xml version="1.0"?>
+<xs:schema
+ targetNamespace="urn:test:foo"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:foo="urn:test:foo"
+ elementFormDefault="qualified"
+ attributeFormDefault="qualified">
+
+ <xs:element name="Link">
+ <xs:complexType>
+ <xs:simpleContent>
+ <xs:extension base="xs:string">
+ <xs:attribute name="linkKey" type="xs:string" use="required"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+ </xs:element>
+
+
+ <!-- -->
+ <xs:element name="Foo">
+ <xs:complexType>
+ <xs:sequence>
+
+ <xs:element name="Def">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="foo:Link"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="Ref">
+ <xs:complexType>
+ <xs:attribute name="linkRef" use="required"/>
+ </xs:complexType>
+ </xs:element>
+
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:key name="LinkKey">
+ <xs:selector xpath=".//foo:Link | .//foo:Link"/>
+ <xs:field xpath="@foo:linkKey"/>
+ </xs:key>
+
+ <xs:keyref name="LinkKeyRef" refer="foo:LinkKey">
+ <xs:selector xpath=".//foo:Ref"/>
+ <xs:field xpath="@foo:linkRef"/>
+ </xs:keyref>
+ </xs:element>
+
+</xs:schema> \ No newline at end of file