src-element2-2_0.xsd 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?xml version="1.0" encoding="ISO-8859-1" ?>
  2. <!-- 3.2.3 : 2.2
  3. If ref is present, then all of <complexType>, <simpleType>, <key>, <keyref>, <unique>,
  4. nillable, default, fixed, form, block and type must be absent, i.e. only minOccurs, maxOccurs,
  5. id are allowed in addition to ref, along with <annotation>.
  6. -->
  7. <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://foo" xmlns:foo="http://foo">
  8. <element name="bar" type="string"/>
  9. <element name="foo">
  10. <complexType>
  11. <choice>
  12. <!-- The good ones. -->
  13. <element ref="foo:bar" minOccurs="0"/>
  14. <element ref="foo:bar" maxOccurs="0"/>
  15. <element ref="foo:bar" id="myomy"/>
  16. <!-- The bad ones. -->
  17. <element ref="foo:bar">
  18. <complexType>
  19. <attribute name="bar" type="string"/>
  20. </complexType>
  21. </element>
  22. <element ref="foo:bar">
  23. <simpleType>
  24. <restriction base="string">
  25. <maxLength value="20"/>
  26. </restriction>
  27. </simpleType>
  28. </element>
  29. <element ref="foo:bar" type="string"/>
  30. <element ref="foo:bar" nillable="true"/>
  31. <element ref="foo:bar" default="Joni"/>
  32. <element ref="foo:bar" fixed="Mitchel"/>
  33. <element ref="foo:bar" form="unqualified"/>
  34. <element ref="foo:bar" block="restriction"/>
  35. </choice>
  36. </complexType>
  37. </element>
  38. </schema>