subst-group-1_0.xsd 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!-- Test for bug #341150 -->
  3. <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" >
  4. <!-- This is the head of our substitution group for events that have only
  5. simple content. -->
  6. <xs:element name="SimpleEvent" type="SimpleEventType"/>
  7. <!-- All SimpleEvent elements have the required set of attributes -->
  8. <xs:complexType name="SimpleEventType">
  9. <xs:simpleContent>
  10. <xs:extension base="xs:anySimpleType">
  11. </xs:extension>
  12. </xs:simpleContent>
  13. </xs:complexType>
  14. <!-- Common members of the SimpleEvent substitution group -->
  15. <xs:element name="TestEvent" substitutionGroup="SimpleEvent">
  16. <xs:complexType>
  17. <xs:simpleContent>
  18. <xs:restriction base="SimpleEventType">
  19. <xs:simpleType>
  20. <xs:restriction base="xs:string"/>
  21. </xs:simpleType>
  22. </xs:restriction>
  23. </xs:simpleContent>
  24. </xs:complexType>
  25. </xs:element>
  26. <!-- Root element -->
  27. <xs:element name="TestRoot" type="TestRootType"/>
  28. <!-- Core data type of an audit trail -->
  29. <xs:complexType name="TestRootType">
  30. <xs:sequence>
  31. <xs:element name="Events">
  32. <xs:complexType>
  33. <xs:choice minOccurs="0" maxOccurs="unbounded">
  34. <xs:element ref="SimpleEvent"/>
  35. </xs:choice>
  36. </xs:complexType>
  37. </xs:element>
  38. </xs:sequence>
  39. </xs:complexType>
  40. </xs:schema>