vdv-first5_0.xsd 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!-- $Header: /home/cvsroot/w3c-xml-schema/user/examples/first-building-blocks.xsd,v 1.1 2001/11/26 13:27:07 vdv Exp $ -->
  3. <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
  4. <xs:include schemaLocation="vdv-simpleTypes.xsd"/>
  5. <xs:include schemaLocation="vdv-complexTypes.xsd"/>
  6. <xs:element name="name" type="string32"/>
  7. <xs:element name="qualification" type="string255"/>
  8. <xs:element name="born" type="date"/>
  9. <xs:element name="dead" type="date"/>
  10. <xs:element name="isbn" type="isbn"/>
  11. <xs:attribute name="id" type="xs:ID"/>
  12. <xs:attribute name="available" type="xs:boolean"/>
  13. <xs:attribute name="lang" type="supportedLanguages"/>
  14. <xs:element name="title">
  15. <xs:complexType>
  16. <xs:simpleContent>
  17. <xs:extension base="string255">
  18. <xs:attribute ref="lang"/>
  19. </xs:extension>
  20. </xs:simpleContent>
  21. </xs:complexType>
  22. </xs:element>
  23. <xs:element name="library">
  24. <xs:complexType>
  25. <xs:sequence>
  26. <xs:element ref="book" maxOccurs="unbounded"/>
  27. </xs:sequence>
  28. </xs:complexType>
  29. </xs:element>
  30. <xs:element name="book">
  31. <xs:complexType>
  32. <xs:complexContent>
  33. <xs:restriction base="bookTmp">
  34. <xs:sequence>
  35. <xs:element ref="isbn"/>
  36. <xs:element ref="title"/>
  37. <xs:element ref="author" minOccurs="0" maxOccurs="unbounded"/>
  38. <xs:element ref="character" minOccurs="0" maxOccurs="unbounded"/>
  39. </xs:sequence>
  40. <xs:attribute name="id" type="bookID"/>
  41. <xs:attribute ref="available"/>
  42. </xs:restriction>
  43. </xs:complexContent>
  44. </xs:complexType>
  45. </xs:element>
  46. <xs:element name="author">
  47. <xs:complexType>
  48. <xs:complexContent>
  49. <xs:restriction base="personType">
  50. <xs:sequence>
  51. <xs:element ref="name"/>
  52. <xs:element ref="born"/>
  53. <xs:element ref="dead" minOccurs="0"/>
  54. </xs:sequence>
  55. <xs:attribute ref="id"/>
  56. </xs:restriction>
  57. </xs:complexContent>
  58. </xs:complexType>
  59. </xs:element>
  60. <xs:element name="character">
  61. <xs:complexType>
  62. <xs:complexContent>
  63. <xs:restriction base="personType">
  64. <xs:sequence>
  65. <xs:element ref="name"/>
  66. <xs:element ref="born"/>
  67. <xs:element ref="qualification"/>
  68. </xs:sequence>
  69. <xs:attribute ref="id"/>
  70. </xs:restriction>
  71. </xs:complexContent>
  72. </xs:complexType>
  73. </xs:element>
  74. </xs:schema>