mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2024-12-28 07:21:26 +03:00
added a bunch of tests from Kasimier Buchcik posted on May 11 Daniel
* test/schemas/* result/schemas/*: added a bunch of tests from Kasimier Buchcik posted on May 11 Daniel
This commit is contained in:
parent
8acdfbf53c
commit
8839938822
@ -1,3 +1,8 @@
|
||||
Fri Jun 4 11:27:37 CEST 2004 Daniel Veillard <daniel@veillard.com>
|
||||
|
||||
* test/schemas/* result/schemas/*: added a bunch of tests from
|
||||
Kasimier Buchcik posted on May 11
|
||||
|
||||
Thu Jun 3 17:58:25 CEST 2004 Daniel Veillard <daniel@veillard.com>
|
||||
|
||||
* xmlschemas.c: new patch from Kasimier Buchcik for processContents
|
||||
|
1
result/schemas/bug141312_0_0
Normal file
1
result/schemas/bug141312_0_0
Normal file
@ -0,0 +1 @@
|
||||
./test/schemas/bug141312_0.xml validates
|
0
result/schemas/bug141312_0_0.err
Normal file
0
result/schemas/bug141312_0_0.err
Normal file
0
result/schemas/scc-no-xmlns_0_0
Normal file
0
result/schemas/scc-no-xmlns_0_0
Normal file
1
result/schemas/scc-no-xmlns_0_0.err
Normal file
1
result/schemas/scc-no-xmlns_0_0.err
Normal file
@ -0,0 +1 @@
|
||||
./test/schemas/scc-no-xmlns_0.xsd:7: element attribute: Schemas parser error : The name of an attribute declaration must not match "xmlns".
|
0
result/schemas/scc-no-xsi_0_0
Normal file
0
result/schemas/scc-no-xsi_0_0
Normal file
1
result/schemas/scc-no-xsi_0_0.err
Normal file
1
result/schemas/scc-no-xsi_0_0.err
Normal file
@ -0,0 +1 @@
|
||||
./test/schemas/scc-no-xsi_0.xsd:7: element attribute: Schemas parser error : The target namespace of an attribute declaration, must not match "http://www.w3.org/2001/XMLSchema-instance"
|
0
result/schemas/src-attribute1_0_0
Normal file
0
result/schemas/src-attribute1_0_0
Normal file
1
result/schemas/src-attribute1_0_0.err
Normal file
1
result/schemas/src-attribute1_0_0.err
Normal file
@ -0,0 +1 @@
|
||||
./test/schemas/src-attribute1_0.xsd:9: element attribute: Schemas parser error : Attribute declaration has both, "default" and "fixed"
|
0
result/schemas/src-attribute2_0_0
Normal file
0
result/schemas/src-attribute2_0_0
Normal file
1
result/schemas/src-attribute2_0_0.err
Normal file
1
result/schemas/src-attribute2_0_0.err
Normal file
@ -0,0 +1 @@
|
||||
./test/schemas/src-attribute2_0.xsd:9: element attribute: Schemas parser error : Attribute declaration has "default" but "use" is not "optional"
|
0
result/schemas/src-attribute3-1_0_0
Normal file
0
result/schemas/src-attribute3-1_0_0
Normal file
1
result/schemas/src-attribute3-1_0_0.err
Normal file
1
result/schemas/src-attribute3-1_0_0.err
Normal file
@ -0,0 +1 @@
|
||||
./test/schemas/src-attribute3-1_0.xsd:9: element attribute: Schemas parser error : Attribute declaration "bar" has both, "name" and "ref"
|
0
result/schemas/src-attribute3-2-form_0_0
Normal file
0
result/schemas/src-attribute3-2-form_0_0
Normal file
1
result/schemas/src-attribute3-2-form_0_0.err
Normal file
1
result/schemas/src-attribute3-2-form_0_0.err
Normal file
@ -0,0 +1 @@
|
||||
./test/schemas/src-attribute3-2-form_0.xsd:10: element attribute: Schemas parser error : Attribute declaration anonattr 2 has "ref", thus "form" must be absent
|
0
result/schemas/src-attribute3-2-st_0_0
Normal file
0
result/schemas/src-attribute3-2-st_0_0
Normal file
1
result/schemas/src-attribute3-2-st_0_0.err
Normal file
1
result/schemas/src-attribute3-2-st_0_0.err
Normal file
@ -0,0 +1 @@
|
||||
./test/schemas/src-attribute3-2-st_0.xsd:11: element simpleType: Schemas parser error : Attribute declaration anonattr 2 has both ("ref" or "type") and <simpleType>
|
0
result/schemas/src-attribute3-2-type_0_0
Normal file
0
result/schemas/src-attribute3-2-type_0_0
Normal file
1
result/schemas/src-attribute3-2-type_0_0.err
Normal file
1
result/schemas/src-attribute3-2-type_0_0.err
Normal file
@ -0,0 +1 @@
|
||||
./test/schemas/src-attribute3-2-type_0.xsd:10: element attribute: Schemas parser error : Attribute declaration anonattr 2 has "ref", thus "type" must be absent
|
0
result/schemas/src-attribute4_0_0
Normal file
0
result/schemas/src-attribute4_0_0
Normal file
1
result/schemas/src-attribute4_0_0.err
Normal file
1
result/schemas/src-attribute4_0_0.err
Normal file
@ -0,0 +1 @@
|
||||
./test/schemas/src-attribute4_0.xsd:8: element simpleType: Schemas parser error : Attribute declaration bar has both ("ref" or "type") and <simpleType>
|
0
result/schemas/src-element1_0_0
Normal file
0
result/schemas/src-element1_0_0
Normal file
1
result/schemas/src-element1_0_0.err
Normal file
1
result/schemas/src-element1_0_0.err
Normal file
@ -0,0 +1 @@
|
||||
./test/schemas/src-element1_0.xsd:7: element element: Schemas parser error : Element foo has both default and fixed
|
0
result/schemas/src-element2-1_0_0
Normal file
0
result/schemas/src-element2-1_0_0
Normal file
1
result/schemas/src-element2-1_0_0.err
Normal file
1
result/schemas/src-element2-1_0_0.err
Normal file
@ -0,0 +1 @@
|
||||
./test/schemas/src-element2-1_0.xsd:12: element element: Schemas parser error : Element declaration has both, "name" and "ref"
|
0
result/schemas/src-element2-2_0_0
Normal file
0
result/schemas/src-element2-2_0_0
Normal file
8
result/schemas/src-element2-2_0_0.err
Normal file
8
result/schemas/src-element2-2_0_0.err
Normal file
@ -0,0 +1,8 @@
|
||||
./test/schemas/src-element2-2_0.xsd:23: element complexType: Schemas parser error : Element declaration anonelem 6: only annotation is allowed as content in addition to ref
|
||||
./test/schemas/src-element2-2_0.xsd:29: element simpleType: Schemas parser error : Element declaration anonelem 7: only annotation is allowed as content in addition to ref
|
||||
./test/schemas/src-element2-2_0.xsd:36: element element: Schemas parser error : Element declaration anonelem 8: only minOccurs, maxOccurs and id are allowed in addition to ref
|
||||
./test/schemas/src-element2-2_0.xsd:37: element element: Schemas parser error : Element declaration anonelem 9: only minOccurs, maxOccurs and id are allowed in addition to ref
|
||||
./test/schemas/src-element2-2_0.xsd:38: element element: Schemas parser error : Element declaration anonelem 10: only minOccurs, maxOccurs and id are allowed in addition to ref
|
||||
./test/schemas/src-element2-2_0.xsd:39: element element: Schemas parser error : Element declaration anonelem 11: only minOccurs, maxOccurs and id are allowed in addition to ref
|
||||
./test/schemas/src-element2-2_0.xsd:40: element element: Schemas parser error : Element declaration anonelem 12: only minOccurs, maxOccurs and id are allowed in addition to ref
|
||||
./test/schemas/src-element2-2_0.xsd:41: element element: Schemas parser error : Element declaration anonelem 13: only minOccurs, maxOccurs and id are allowed in addition to ref
|
0
result/schemas/src-element3_0_0
Normal file
0
result/schemas/src-element3_0_0
Normal file
2
result/schemas/src-element3_0_0.err
Normal file
2
result/schemas/src-element3_0_0.err
Normal file
@ -0,0 +1,2 @@
|
||||
./test/schemas/src-element3_0.xsd:8: element complexType: Schemas parser error : Element declaration foo has both "type" and a local complex type
|
||||
./test/schemas/src-element3_0.xsd:16: element simpleType: Schemas parser error : Element declaration bar has both "type" and a local simple type
|
1
result/schemas/xsd-simpleType-varieties_0_0
Normal file
1
result/schemas/xsd-simpleType-varieties_0_0
Normal file
@ -0,0 +1 @@
|
||||
./test/schemas/xsd-simpleType-varieties_0.xml validates
|
0
result/schemas/xsd-simpleType-varieties_0_0.err
Normal file
0
result/schemas/xsd-simpleType-varieties_0_0.err
Normal file
2
test/schemas/bug141312_0.xml
Normal file
2
test/schemas/bug141312_0.xml
Normal file
@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<foo xmlns="http://FOO">lalala</foo>
|
16
test/schemas/bug141312_0.xsd
Normal file
16
test/schemas/bug141312_0.xsd
Normal file
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<schema
|
||||
xmlns="http://www.w3.org/2001/XMLSchema"
|
||||
targetNamespace="http://FOO"
|
||||
xmlns:foo="http://FOO">
|
||||
|
||||
<element name="foo" type="foo:fooType" nillable="false" />
|
||||
|
||||
<complexType name="fooType" mixed="true">
|
||||
<simpleContent>
|
||||
<extension base="string" />
|
||||
</simpleContent>
|
||||
</complexType>
|
||||
|
||||
</schema>
|
||||
|
3
test/schemas/scc-no-xmlns_0.xml
Normal file
3
test/schemas/scc-no-xmlns_0.xml
Normal file
@ -0,0 +1,3 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||
<foo xmlns="http://foo"/>
|
||||
|
11
test/schemas/scc-no-xmlns_0.xsd
Normal file
11
test/schemas/scc-no-xmlns_0.xsd
Normal file
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||
<!-- C.4 Schema Component Constraints: no-xmlns -->
|
||||
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://foo" xmlns:foo="http://foo">
|
||||
|
||||
<element name="foo">
|
||||
<complexType>
|
||||
<attribute name="xmlns" type="string" />
|
||||
</complexType>
|
||||
</element>
|
||||
|
||||
</schema>
|
3
test/schemas/scc-no-xsi_0.xml
Normal file
3
test/schemas/scc-no-xsi_0.xml
Normal file
@ -0,0 +1,3 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||
<foo xmlns="http://foo"/>
|
||||
|
11
test/schemas/scc-no-xsi_0.xsd
Normal file
11
test/schemas/scc-no-xsi_0.xsd
Normal file
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||
<!-- 3.2.6 Schema Component Constraint: xsi: Not Allowed -->
|
||||
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.w3.org/2001/XMLSchema-instance">
|
||||
|
||||
<element name="foo">
|
||||
<complexType>
|
||||
<attribute name="bar" form="qualified" type="string"/>
|
||||
</complexType>
|
||||
</element>
|
||||
|
||||
</schema>
|
2
test/schemas/src-attribute1_0.xml
Normal file
2
test/schemas/src-attribute1_0.xml
Normal file
@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||
<foo xmlns="http://FOO"/>
|
13
test/schemas/src-attribute1_0.xsd
Normal file
13
test/schemas/src-attribute1_0.xsd
Normal file
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||
<!-- 3.2.3 : 1
|
||||
default and fixed must not both be present
|
||||
-->
|
||||
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://foo" xmlns:foo="http://foo">
|
||||
|
||||
<element name="foo">
|
||||
<complexType>
|
||||
<attribute name="bar" type="string" default="moo" fixed="true"/>
|
||||
</complexType>
|
||||
</element>
|
||||
|
||||
</schema>
|
2
test/schemas/src-attribute2_0.xml
Normal file
2
test/schemas/src-attribute2_0.xml
Normal file
@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||
<foo xmlns="http://FOO"/>
|
13
test/schemas/src-attribute2_0.xsd
Normal file
13
test/schemas/src-attribute2_0.xsd
Normal file
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||
<!-- 3.2.3 : 2
|
||||
If default and use are both present, use must have the ·actual value· optional
|
||||
-->
|
||||
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://foo" xmlns:foo="http://foo">
|
||||
|
||||
<element name="foo">
|
||||
<complexType>
|
||||
<attribute name="bar" type="string" use="required" default="moo" />
|
||||
</complexType>
|
||||
</element>
|
||||
|
||||
</schema>
|
2
test/schemas/src-attribute3-1_0.xml
Normal file
2
test/schemas/src-attribute3-1_0.xml
Normal file
@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||
<foo xmlns="http://FOO"/>
|
15
test/schemas/src-attribute3-1_0.xsd
Normal file
15
test/schemas/src-attribute3-1_0.xsd
Normal file
@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||
<!-- 3.2.3 : 3.1
|
||||
One of ref or name must be present, but not both
|
||||
-->
|
||||
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://foo" xmlns:foo="http://foo">
|
||||
|
||||
<element name="foo">
|
||||
<complexType>
|
||||
<attribute name="bar" ref="foo:bar" />
|
||||
</complexType>
|
||||
</element>
|
||||
|
||||
<attribute name="bar" type="string" />
|
||||
|
||||
</schema>
|
2
test/schemas/src-attribute3-2-form_0.xml
Normal file
2
test/schemas/src-attribute3-2-form_0.xml
Normal file
@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||
<foo xmlns="http://FOO"/>
|
16
test/schemas/src-attribute3-2-form_0.xsd
Normal file
16
test/schemas/src-attribute3-2-form_0.xsd
Normal file
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||
<!-- 3.2.3 : 3.2
|
||||
If ref is present, then all of <simpleType>, form and type must be absent
|
||||
This one tests "form"
|
||||
-->
|
||||
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://foo" xmlns:foo="http://foo">
|
||||
|
||||
<element name="foo">
|
||||
<complexType>
|
||||
<attribute ref="foo:bar" form="qualified"/>
|
||||
</complexType>
|
||||
</element>
|
||||
|
||||
<attribute name="bar" type="string"/>
|
||||
|
||||
</schema>
|
2
test/schemas/src-attribute3-2-st_0.xml
Normal file
2
test/schemas/src-attribute3-2-st_0.xml
Normal file
@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||
<foo xmlns="http://FOO"/>
|
22
test/schemas/src-attribute3-2-st_0.xsd
Normal file
22
test/schemas/src-attribute3-2-st_0.xsd
Normal file
@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||
<!-- 3.2.3 : 3.2
|
||||
If ref is present, then all of <simpleType>, form and type must be absent
|
||||
This one tests <simpleType>
|
||||
-->
|
||||
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://foo" xmlns:foo="http://foo">
|
||||
|
||||
<element name="foo">
|
||||
<complexType>
|
||||
<attribute ref="foo:bar">
|
||||
<simpleType>
|
||||
<restriction base="string">
|
||||
<maxLength value="20"/>
|
||||
</restriction>
|
||||
</simpleType>
|
||||
</attribute>
|
||||
</complexType>
|
||||
</element>
|
||||
|
||||
<attribute name="bar" type="string" />
|
||||
|
||||
</schema>
|
2
test/schemas/src-attribute3-2-type_0.xml
Normal file
2
test/schemas/src-attribute3-2-type_0.xml
Normal file
@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||
<foo xmlns="http://FOO"/>
|
16
test/schemas/src-attribute3-2-type_0.xsd
Normal file
16
test/schemas/src-attribute3-2-type_0.xsd
Normal file
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||
<!-- 3.2.3 : 3.2
|
||||
If ref is present, then all of <simpleType>, form and type must be absent
|
||||
This one tests "type"
|
||||
-->
|
||||
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://foo" xmlns:foo="http://foo">
|
||||
|
||||
<element name="foo">
|
||||
<complexType>
|
||||
<attribute ref="foo:bar" type="string"/>
|
||||
</complexType>
|
||||
</element>
|
||||
|
||||
<attribute name="bar" type="string"/>
|
||||
|
||||
</schema>
|
2
test/schemas/src-attribute4_0.xml
Normal file
2
test/schemas/src-attribute4_0.xml
Normal file
@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||
<foo xmlns="http://FOO"/>
|
17
test/schemas/src-attribute4_0.xsd
Normal file
17
test/schemas/src-attribute4_0.xsd
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||
<!-- 3.2.3 : 3.2
|
||||
type and <simpleType> must not both be present
|
||||
-->
|
||||
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://foo" xmlns:foo="http://foo">
|
||||
|
||||
<attribute name="bar" type="string">
|
||||
<simpleType>
|
||||
<restriction base="string">
|
||||
<maxLength value="20"/>
|
||||
</restriction>
|
||||
</simpleType>
|
||||
</attribute>
|
||||
|
||||
<element name="foo"/>
|
||||
|
||||
</schema>
|
2
test/schemas/src-element1_0.xml
Normal file
2
test/schemas/src-element1_0.xml
Normal file
@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||
<foo xmlns="http://FOO"/>
|
9
test/schemas/src-element1_0.xsd
Normal file
9
test/schemas/src-element1_0.xsd
Normal file
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||
<!-- 3.2.3 : 1
|
||||
default and fixed must not both be present
|
||||
-->
|
||||
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://foo" xmlns:foo="http://foo">
|
||||
|
||||
<element name="foo" type="string" default="Joni" fixed="Mitchel"/>
|
||||
|
||||
</schema>
|
2
test/schemas/src-element2-1_0.xml
Normal file
2
test/schemas/src-element2-1_0.xml
Normal file
@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||
<foo xmlns="http://FOO"/>
|
17
test/schemas/src-element2-1_0.xsd
Normal file
17
test/schemas/src-element2-1_0.xsd
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||
<!-- 3.2.3 : 2.1
|
||||
One of ref or name must be present, but not both.
|
||||
-->
|
||||
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://foo" xmlns:foo="http://foo">
|
||||
|
||||
<element name="bar" type="string"/>
|
||||
|
||||
<element name="foo">
|
||||
<complexType>
|
||||
<sequence>
|
||||
<element name="bar" ref="foo:bar"/>
|
||||
</sequence>
|
||||
</complexType>
|
||||
</element>
|
||||
|
||||
</schema>
|
2
test/schemas/src-element2-2_0.xml
Normal file
2
test/schemas/src-element2-2_0.xml
Normal file
@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||
<foo xmlns="http://FOO"/>
|
48
test/schemas/src-element2-2_0.xsd
Normal file
48
test/schemas/src-element2-2_0.xsd
Normal file
@ -0,0 +1,48 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||
<!-- 3.2.3 : 2.2
|
||||
If ref is present, then all of <complexType>, <simpleType>, <key>, <keyref>, <unique>,
|
||||
nillable, default, fixed, form, block and type must be absent, i.e. only minOccurs, maxOccurs,
|
||||
id are allowed in addition to ref, along with <annotation>.
|
||||
|
||||
-->
|
||||
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://foo" xmlns:foo="http://foo">
|
||||
|
||||
<element name="bar" type="string"/>
|
||||
|
||||
<element name="foo">
|
||||
<complexType>
|
||||
<choice>
|
||||
|
||||
<!-- The good ones. -->
|
||||
<element ref="foo:bar" minOccurs="0"/>
|
||||
<element ref="foo:bar" maxOccurs="0"/>
|
||||
<element ref="foo:bar" id="myomy"/>
|
||||
|
||||
<!-- The bad ones. -->
|
||||
<element ref="foo:bar">
|
||||
<complexType>
|
||||
<attribute name="bar" type="string"/>
|
||||
</complexType>
|
||||
</element>
|
||||
|
||||
<element ref="foo:bar">
|
||||
<simpleType>
|
||||
<restriction base="string">
|
||||
<maxLength value="20"/>
|
||||
</restriction>
|
||||
</simpleType>
|
||||
</element>
|
||||
|
||||
<element ref="foo:bar" type="string"/>
|
||||
<element ref="foo:bar" nillable="true"/>
|
||||
<element ref="foo:bar" default="Joni"/>
|
||||
<element ref="foo:bar" fixed="Mitchel"/>
|
||||
<element ref="foo:bar" form="unqualified"/>
|
||||
<element ref="foo:bar" block="restriction"/>
|
||||
|
||||
</choice>
|
||||
</complexType>
|
||||
</element>
|
||||
|
||||
|
||||
</schema>
|
2
test/schemas/src-element3_0.xml
Normal file
2
test/schemas/src-element3_0.xml
Normal file
@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||
<foo xmlns="http://FOO"/>
|
29
test/schemas/src-element3_0.xsd
Normal file
29
test/schemas/src-element3_0.xsd
Normal file
@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||
<!-- 3.2.3 : 3
|
||||
type and either <simpleType> or <complexType> are mutually exclusive
|
||||
-->
|
||||
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://foo" xmlns:foo="http://foo">
|
||||
|
||||
<element name="foo" type="foo:someType">
|
||||
<complexType>
|
||||
<sequence>
|
||||
<element name="bar" type="string"/>
|
||||
</sequence>
|
||||
</complexType>
|
||||
</element>
|
||||
|
||||
<element name="bar" type="foo:someType">
|
||||
<simpleType>
|
||||
<restriction base="string">
|
||||
<maxLength value="20"/>
|
||||
</restriction>
|
||||
</simpleType>
|
||||
</element>
|
||||
|
||||
<complexType name="someType">
|
||||
<sequence>
|
||||
<element name="bar" type="string"/>
|
||||
</sequence>
|
||||
</complexType>
|
||||
|
||||
</schema>
|
8
test/schemas/xsd-simpleType-varieties_0.xml
Normal file
8
test/schemas/xsd-simpleType-varieties_0.xml
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||
<!-- This is the test data for the check of the implementation of varieties of xsd:simpleType element. -->
|
||||
<foo xmlns="http://FOO">
|
||||
<barA>fajita</barA>
|
||||
<barB>pub pub</barB>
|
||||
<barC><![CDATA[tequilla]]></barC>
|
||||
</foo>
|
||||
|
43
test/schemas/xsd-simpleType-varieties_0.xsd
Normal file
43
test/schemas/xsd-simpleType-varieties_0.xsd
Normal file
@ -0,0 +1,43 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||
|
||||
<!-- This test checks the implementation of the varieties of the xsd:simpleType element. -->
|
||||
|
||||
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://FOO" xmlns:foo="http://FOO">
|
||||
|
||||
<element name="foo">
|
||||
<complexType>
|
||||
<sequence maxOccurs="unbounded">
|
||||
<element name="barA">
|
||||
<simpleType>
|
||||
<union memberTypes="foo:typeA foo:typeB"/>
|
||||
</simpleType>
|
||||
</element>
|
||||
<element name="barB">
|
||||
<simpleType>
|
||||
<list itemType="foo:typeA"/>
|
||||
</simpleType>
|
||||
</element>
|
||||
<element name="barC">
|
||||
<simpleType>
|
||||
<restriction base="string">
|
||||
<enumeration value="tequilla"/>
|
||||
</restriction>
|
||||
</simpleType>
|
||||
</element>
|
||||
</sequence>
|
||||
</complexType>
|
||||
</element>
|
||||
|
||||
<simpleType name="typeA">
|
||||
<restriction base="string">
|
||||
<enumeration value="pub"/>
|
||||
</restriction>
|
||||
</simpleType>
|
||||
|
||||
<simpleType name="typeB">
|
||||
<restriction base="string">
|
||||
<enumeration value="fajita"/>
|
||||
</restriction>
|
||||
</simpleType>
|
||||
|
||||
</schema>
|
Loading…
Reference in New Issue
Block a user