summaryrefslogtreecommitdiffstats
path: root/libxml2/test/schemas/subst-group-1_0.xsd
diff options
context:
space:
mode:
Diffstat (limited to 'libxml2/test/schemas/subst-group-1_0.xsd')
-rw-r--r--libxml2/test/schemas/subst-group-1_0.xsd45
1 files changed, 45 insertions, 0 deletions
diff --git a/libxml2/test/schemas/subst-group-1_0.xsd b/libxml2/test/schemas/subst-group-1_0.xsd
new file mode 100644
index 0000000..af21eeb
--- /dev/null
+++ b/libxml2/test/schemas/subst-group-1_0.xsd
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Test for bug #341150 -->
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" >
+
+ <!-- This is the head of our substitution group for events that have only
+ simple content. -->
+ <xs:element name="SimpleEvent" type="SimpleEventType"/>
+
+ <!-- All SimpleEvent elements have the required set of attributes -->
+ <xs:complexType name="SimpleEventType">
+ <xs:simpleContent>
+ <xs:extension base="xs:anySimpleType">
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <!-- Common members of the SimpleEvent substitution group -->
+ <xs:element name="TestEvent" substitutionGroup="SimpleEvent">
+ <xs:complexType>
+ <xs:simpleContent>
+ <xs:restriction base="SimpleEventType">
+ <xs:simpleType>
+ <xs:restriction base="xs:string"/>
+ </xs:simpleType>
+ </xs:restriction>
+ </xs:simpleContent>
+ </xs:complexType>
+ </xs:element>
+
+ <!-- Root element -->
+ <xs:element name="TestRoot" type="TestRootType"/>
+
+ <!-- Core data type of an audit trail -->
+ <xs:complexType name="TestRootType">
+ <xs:sequence>
+ <xs:element name="Events">
+ <xs:complexType>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element ref="SimpleEvent"/>
+ </xs:choice>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema> \ No newline at end of file