summaryrefslogtreecommitdiff
path: root/xsd/tests/schema/inheritance
diff options
context:
space:
mode:
Diffstat (limited to 'xsd/tests/schema/inheritance')
-rw-r--r--xsd/tests/schema/inheritance/cycle.xsd34
-rw-r--r--xsd/tests/schema/inheritance/sourced-forward/includee.xsd10
-rw-r--r--xsd/tests/schema/inheritance/sourced-forward/includer.xsd14
3 files changed, 58 insertions, 0 deletions
diff --git a/xsd/tests/schema/inheritance/cycle.xsd b/xsd/tests/schema/inheritance/cycle.xsd
new file mode 100644
index 0000000..c705311
--- /dev/null
+++ b/xsd/tests/schema/inheritance/cycle.xsd
@@ -0,0 +1,34 @@
+<?xml version="1.0" ?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.w3.org/2001/XMLSchema XMLSchema.xsd"
+ xmlns:test="http://www.codesynthesis.com/xmlns/test"
+ targetNamespace="http://www.codesynthesis.com/xmlns/test">
+
+ <xsd:complexType name="Base">
+ <xsd:sequence>
+ <xsd:element name="e1">
+ <xsd:complexType>
+ <xsd:complexContent>
+ <xsd:extension base="test:Derived">
+ <xsd:sequence>
+ <xsd:element name="e2" type="xsd:int"/>
+ </xsd:sequence>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="Derived">
+ <xsd:complexContent>
+ <xsd:extension base="test:Base">
+ <xsd:sequence>
+ <xsd:element name="e3" type="xsd:int"/>
+ </xsd:sequence>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+</xsd:schema>
diff --git a/xsd/tests/schema/inheritance/sourced-forward/includee.xsd b/xsd/tests/schema/inheritance/sourced-forward/includee.xsd
new file mode 100644
index 0000000..531027d
--- /dev/null
+++ b/xsd/tests/schema/inheritance/sourced-forward/includee.xsd
@@ -0,0 +1,10 @@
+<?xml version="1.0" ?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.w3.org/2001/XMLSchema XMLSchema.xsd">
+
+ <xsd:simpleType name="Derived">
+ <xsd:restriction base="Base"/>
+ </xsd:simpleType>
+
+</xsd:schema>
diff --git a/xsd/tests/schema/inheritance/sourced-forward/includer.xsd b/xsd/tests/schema/inheritance/sourced-forward/includer.xsd
new file mode 100644
index 0000000..7d18efc
--- /dev/null
+++ b/xsd/tests/schema/inheritance/sourced-forward/includer.xsd
@@ -0,0 +1,14 @@
+<?xml version="1.0" ?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.w3.org/2001/XMLSchema XMLSchema.xsd"
+ xmlns:test="http://www.codesynthesis.com/xmlns/test"
+ targetNamespace="http://www.codesynthesis.com/xmlns/test">
+
+ <xsd:include schemaLocation="includee.xsd"/>
+
+ <xsd:simpleType name="Base">
+ <xsd:restriction base="xsd:string"/>
+ </xsd:simpleType>
+
+</xsd:schema>