diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/HTML/53867.html | 69 | ||||
-rw-r--r-- | test/XPath/docs/nodes | 2 | ||||
-rw-r--r-- | test/XPath/tests/nodespat | 5 | ||||
-rw-r--r-- | test/c14n/exc-without-comments/test-2.xml | 20 | ||||
-rw-r--r-- | test/c14n/exc-without-comments/test-2.xpath | 6 | ||||
-rw-r--r-- | test/ns7 | 1 | ||||
-rw-r--r-- | test/regexp/hard | 5 | ||||
-rw-r--r-- | test/schemas/bug321475_0.xml | 10 | ||||
-rw-r--r-- | test/schemas/bug321475_1.xsd | 48 | ||||
-rw-r--r-- | test/schemas/bug322411_0.xml | 93 | ||||
-rw-r--r-- | test/schemas/bug322411_1.xsd | 35 | ||||
-rw-r--r-- | test/schemas/bug323510_0.xml | 3 | ||||
-rw-r--r-- | test/schemas/bug323510_1.xsd | 12 | ||||
-rw-r--r-- | test/schemas/decimal-1.xml | 37 | ||||
-rw-r--r-- | test/schemas/decimal-1.xsd | 29 | ||||
-rw-r--r-- | test/schemas/decimal-1_0.xml | 24 | ||||
-rw-r--r-- | test/schemas/decimal-1_1.xsd | 19 | ||||
-rw-r--r-- | test/schemas/decimal-2_0.xml | 14 | ||||
-rw-r--r-- | test/schemas/decimal-2_1.xsd | 18 | ||||
-rw-r--r-- | test/schemas/decimal-3_0.xml | 17 | ||||
-rw-r--r-- | test/schemas/decimal-3_1.xsd | 18 | ||||
-rw-r--r-- | test/schemas/idc-keyref-err1_0.xml | 14 | ||||
-rw-r--r-- | test/schemas/idc-keyref-err1_1.xsd | 53 |
23 files changed, 552 insertions, 0 deletions
diff --git a/test/HTML/53867.html b/test/HTML/53867.html new file mode 100644 index 0000000..ac27999 --- /dev/null +++ b/test/HTML/53867.html @@ -0,0 +1,69 @@ +<html> +<head> +<style> +....... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +............................................................... +</style> +</head> +</html> diff --git a/test/XPath/docs/nodes b/test/XPath/docs/nodes new file mode 100644 index 0000000..a863df0 --- /dev/null +++ b/test/XPath/docs/nodes @@ -0,0 +1,2 @@ +<?xml version="1.0"?> +<root><foo>txt<!--hello--><![CDATA[data]]><?target data?><bar>txt<!--hello--><![CDATA[data]]><?target data?></bar></foo></root>
\ No newline at end of file diff --git a/test/XPath/tests/nodespat b/test/XPath/tests/nodespat new file mode 100644 index 0000000..c157a3e --- /dev/null +++ b/test/XPath/tests/nodespat @@ -0,0 +1,5 @@ +/. +//. +/root//. +//.//./././/. +/root//././/bar//.
\ No newline at end of file diff --git a/test/c14n/exc-without-comments/test-2.xml b/test/c14n/exc-without-comments/test-2.xml new file mode 100644 index 0000000..83d15a7 --- /dev/null +++ b/test/c14n/exc-without-comments/test-2.xml @@ -0,0 +1,20 @@ +<?xml version="1.0"?> +<Signature xmlns="http://www.w3.org/2000/09/xmldsig#"> + <SignedInfo> + <ds:CanonicalizationMethod xmlns:ds="http://www.w3.org/2000/09/xmldsig#" Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/> + <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/> + <Reference URI="#ndid:1234-5678-0987"> + <Transforms> + <Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/> + </Transforms> + <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/> + <DigestValue>sj1VXDB2VMCU5qmva2OtDw3kKOs=</DigestValue> + </Reference> + </SignedInfo> + <SignatureValue>...</SignatureValue> + <KeyInfo> + <X509Data> + <X509Certificate>...</X509Certificate> + </X509Data> + </KeyInfo> +</Signature> diff --git a/test/c14n/exc-without-comments/test-2.xpath b/test/c14n/exc-without-comments/test-2.xpath new file mode 100644 index 0000000..e57652f --- /dev/null +++ b/test/c14n/exc-without-comments/test-2.xpath @@ -0,0 +1,6 @@ +<XPath xmlns:ds="http://www.w3.org/2000/09/xmldsig#"> +(//. | //@* | //namespace::*) +[ + ancestor-or-self::ds:SignedInfo +] +</XPath>
\ No newline at end of file diff --git a/test/ns7 b/test/ns7 new file mode 100644 index 0000000..d32b3b4 --- /dev/null +++ b/test/ns7 @@ -0,0 +1 @@ +<xml:test/> diff --git a/test/regexp/hard b/test/regexp/hard index 40c6d2d..ddb4cfd 100644 --- a/test/regexp/hard +++ b/test/regexp/hard @@ -5,3 +5,8 @@ aaabbbb a0b aa0aaa b0aaa +=>(\d{1,3}\.){3}\d{1,3} +1.2.3.4 +1.22.333.44 +1.2.3 +1..2.3 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 |