aboutsummaryrefslogtreecommitdiffstats
path: root/lib/xmerl/test/xmerl_xsd_SUITE_data/report2.xsd
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2010-09-02 15:44:33 +0200
committerLars Thorsen <[email protected]>2011-05-10 09:13:23 +0200
commit824a6db3ff111f8d2427ac5adad0362bf078630a (patch)
treef146685c27e4c8f91b07f76d3e1e3510553e2e88 /lib/xmerl/test/xmerl_xsd_SUITE_data/report2.xsd
parent1a5796cd12061ebb21e7e51a0b7bdf05ed4786a7 (diff)
downloadotp-824a6db3ff111f8d2427ac5adad0362bf078630a.tar.gz
otp-824a6db3ff111f8d2427ac5adad0362bf078630a.tar.bz2
otp-824a6db3ff111f8d2427ac5adad0362bf078630a.zip
Add test suite for xmerl
Diffstat (limited to 'lib/xmerl/test/xmerl_xsd_SUITE_data/report2.xsd')
-rw-r--r--lib/xmerl/test/xmerl_xsd_SUITE_data/report2.xsd82
1 files changed, 82 insertions, 0 deletions
diff --git a/lib/xmerl/test/xmerl_xsd_SUITE_data/report2.xsd b/lib/xmerl/test/xmerl_xsd_SUITE_data/report2.xsd
new file mode 100644
index 0000000000..a114cad4f2
--- /dev/null
+++ b/lib/xmerl/test/xmerl_xsd_SUITE_data/report2.xsd
@@ -0,0 +1,82 @@
+<schema targetNamespace="http://www.example.com/Report"
+ xmlns="http://www.w3.org/2001/XMLSchema"
+ xmlns:r="http://www.example.com/Report"
+ xmlns:xipo="http://www.example.com/IPO"
+ elementFormDefault="qualified">
+
+ <!-- for SKU -->
+ <import namespace="http://www.example.com/IPO" schemaLocation="ipo.xsd"/>
+
+ <annotation>
+ <documentation xml:lang="en">
+ Report schema for Example.com
+ Copyright 2000 Example.com. All rights reserved.
+ </documentation>
+ </annotation>
+
+ <element name="purchaseReport">
+ <complexType>
+ <sequence>
+ <element name="regions" type="r:RegionsType"/>
+
+ <element name="parts" type="r:PartsType"/>
+ </sequence>
+ <attribute name="period" type="duration"/>
+ <attribute name="periodEnding" type="date"/>
+ </complexType>
+
+ <unique name="dummy1">
+ <selector xpath="r:regions/r:zip"/>
+ <field xpath="@code"/>
+ </unique>
+
+ <key name="pNumKey">
+ <selector xpath="r:parts/r:part"/>
+ <field xpath="@number"/>
+ </key>
+
+ <keyref name="dummy2" refer="r:pNumKey">
+ <selector xpath="r:regions/r:zip/r:part"/>
+ <field xpath="@number"/>
+ </keyref>
+
+ </element>
+
+ <complexType name="RegionsType">
+ <sequence>
+ <element name="zip" maxOccurs="unbounded">
+ <complexType>
+ <sequence>
+ <element name="part" maxOccurs="unbounded">
+ <complexType>
+ <complexContent>
+ <restriction base="anyType">
+ <attribute name="number" type="xipo:SKU"/>
+ <attribute name="quantity" type="positiveInteger"/>
+ </restriction>
+ </complexContent>
+ </complexType>
+ </element>
+ </sequence>
+ <attribute name="code" type="positiveInteger"/>
+ </complexType>
+ </element>
+ </sequence>
+ </complexType>
+
+ <complexType name="PartsType">
+ <sequence>
+ <element name="part" maxOccurs="unbounded">
+ <complexType>
+ <simpleContent>
+ <extension base="string">
+ <attribute name="number" type="xipo:SKU"/>
+ </extension>
+ </simpleContent>
+ </complexType>
+ </element>
+ </sequence>
+ </complexType>
+
+</schema>
+