Advertisement
Guest User

Untitled

a guest
Dec 18th, 2014
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.45 KB | None | 0 0
  1. <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  2.  
  3. <xsd:annotation>
  4. <xsd:documentation xml:lang="pl">
  5. XML Schema do pliku baza_danych.
  6. </xsd:documentation>
  7. </xsd:annotation>
  8.  
  9. <xsd:element name="baza_danych" type="baza_typ"/>
  10.  
  11. <xsd:complexType name="baza_typ">
  12. <xsd:sequence>
  13. <xsd:element ref="pilkarz"/>
  14. <xsd:element ref="klub"/>
  15. <xsd:element ref="stadion"/>
  16. </xsd:sequence>
  17. </xsd:complexType>
  18.  
  19. <xsd:complexType name="klub_typ">
  20. <xsd:sequence>
  21. <xsd:element name="klub" type="klub_typ" minOccurs="1" maxOccurs="unbounded"/>
  22. </xsd:sequence>
  23. </xsd:complexType>
  24.  
  25. <xsd:complexType name="pilkarze_typ">
  26. <xsd:sequence>
  27. <xsd:element name="pilkarz" type="pilkarze_typ" minOccurs="1" maxOccurs="unbounded"/>
  28. </xsd:sequence>
  29. </xsd:complexType>
  30.  
  31. <xsd:complexType name="stadiony_typ">
  32. <xsd:sequence>
  33. <xsd:element name="nazwa" type="nazwa_typ"/>
  34. <xsd:element name="adres" type="xsd:string"/>
  35. <xsd:element name="pojemnosc" type="xsd:int"/>
  36. <xsd:element name="wymiary" type="xsd:string"/>
  37. <xsd:element name="data_otwarcia" type="xsd:date"/>
  38. </xsd:sequence>
  39. <xsd:attribute ref="kraj" use="required"/>
  40. </xsd:complexType>
  41.  
  42. <xsd:complexType name="kluby_pilkarskie_typ">
  43. <xsd:sequence>
  44. <xsd:element name="nazwa" type="nazwa_typ"/>
  45. <xsd:element name="data_zalozenia" type="xsd:date"/>
  46. <xsd:element name="stadion" type="xsd:string"/>
  47. <xsd:element name="barwy" type="xsd:string"/>
  48. <xsd:element name="prezes" type="xsd:string"/>
  49. <xsd:element name="trener" type="xsd:string"/>
  50. <xsd:element name="przydomek" type="xsd:string"/>
  51. </xsd:sequence>
  52. <xsd:attribute ref="kraj" use="required"/>
  53. </xsd:complexType>
  54.  
  55. <xsd:simpleType name="nazwa_typ">
  56. <xsd:restriction base="xsd:string">
  57. <xsd:minLength value="3"/>
  58. </xsd:restriction>
  59. </xsd:simpleType>
  60.  
  61. <xsd:complexType name="pilkarz">
  62. <xsd:sequence>
  63. <xsd:element name="imie" type="xsd:string"/>
  64. <xsd:element name="nazwisko" type="nazwisko_typ"/>
  65. <xsd:element name="przydomek" type="xsd:string"/>
  66. <xsd:element name="data_urodzenia" type="xsd:date"/>
  67. <xsd:element name="wzrost" type="xsd:decimal"/>
  68. <xsd:element name="waga" type="xsd:decimal"/>
  69. <xsd:element name="klub" type="xsd:string"/>
  70. <xsd:element name="numer" type="xsd:int"/>
  71. <xsd:element name="pozycja" type="pozycja_typ"/>
  72. <xsd:element name="ostatnia_nagroda">
  73. <xsd:complexType>
  74. <xsd:sequence>
  75. <xsd:element name="nazwa" type="xsd:string" minOccurs="0" maxOccurs="1"/>
  76. <xsd:element name="rok_przyznania" type="xsd:decimal"/>
  77. </xsd:sequence>
  78. </xsd:complexType>
  79. </xsd:element>
  80. </xsd:sequence>
  81. <xsd:attribute ref="kraj" use="required"/>
  82. <xsd:attribute name="plec" use="required" type="plec_typ"/>
  83. </xsd:complexType>
  84.  
  85. <xsd:simpleType name="plec_typ">
  86. <xsd:restriction base="xsd:string">
  87. <xsd:enumeration value="k"/>
  88. <xsd:enumeration value="m"/>
  89. </xsd:restriction>
  90. </xsd:simpleType>
  91.  
  92. <xsd:simpleType name="kraj_typ">
  93. <xsd:restriction base="xsd:string">
  94. <xsd:pattern value="[A-Z]{2}"/>
  95. </xsd:restriction>
  96. </xsd:simpleType>
  97.  
  98. <xsd:simpleType name="nazwisko_typ">
  99. <xsd:restriction base="xsd:string">
  100. <xsd:maxLength value="20"/>
  101. </xsd:restriction>
  102. </xsd:simpleType>
  103.  
  104. <xsd:simpleType name="pozycja_typ">
  105. <xsd:restriction base="xsd:string">
  106. <xsd:enumeration value="Bramkarz"/>
  107. <xsd:enumeration value="Obrońca"/>
  108. <xsd:enumeration value="Pomocnik"/>
  109. <xsd:enumeration value="Napastnik"/>
  110. </xsd:restriction>
  111. </xsd:simpleType>
  112.  
  113. <xsd:simpleType name="wzrost">
  114. <xsd:restriction base="xsd:int">
  115. <xsd:minInclusive value="0"/>
  116. <xsd:maxInclusive value="250"/>
  117. </xsd:restriction>
  118. </xsd:simpleType>
  119.  
  120. <xsd:simpleType name="waga">
  121. <xsd:restriction base="xsd:int">
  122. <xsd:minInclusive value="0"/>
  123. <xsd:maxInclusive value="200"/>
  124. </xsd:restriction>
  125. </xsd:simpleType>
  126.  
  127. <xsd:attribute name="kraj">
  128. <xsd:simpleType>
  129. <xsd:restriction base="xsd:string">
  130. <xsd:pattern value="[A-Z]{2}"/>
  131. </xsd:restriction>
  132. </xsd:simpleType>
  133. </xsd:attribute>
  134.  
  135. <xsd:element name="pilkarze" type="pilkarze_typ"/>
  136. <xsd:element name="kluby_pilkarskie" type="kluby_pilkarskie_typ"/>
  137. <xsd:element name="stadiony" type="stadiony_typ"/>
  138.  
  139. </xsd:schema>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement