odML.xsd 3.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <?xml version="1.0" encoding="ISO-8859-1" ?>
  2. <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
  3. targetNamespace="http://www.g-node.org/odml">
  4. <!-- 1 -->
  5. <!-- THE PROPERTY TYPE IS THE BUILDING BLOCK OF ALL odML METADATA. -->
  6. <!-- PROPERTIES BASICALLY CONSIST OF name/value PAIRS. -->
  7. <!-- -->
  8. <!-- A: Value Subtype -->
  9. <xs:element name ="value" type="xs:string">
  10. <xs:complexType>
  11. <xs:choice minOccurs="0" maxOccurs="unbounded">
  12. <xs:element name="type" type="xs:string" minOccurs="0" maxOccurs="1"/>
  13. <xs:element name="uncertainty" type="xs:string" minOccurs="0" maxOccurs="1"/>
  14. <xs:element name="unit" type="xs:string" minOccurs="0" maxOccurs="1"/>
  15. <xs:element name="id" type="xs:string" minOccurs="0" maxOccurs="1"/>
  16. <xs:element name="definition" minOccurs="0" maxOccurs="1"/>
  17. <xs:element name="defaultFileName" minOccurs="0" maxOccurs="1"/>
  18. </xs:choice>
  19. </xs:complexType>
  20. </xs:element>
  21. <!-- B: Property -->
  22. <xs:element name ="property">
  23. <xs:complexType>
  24. <xs:choice minOccurs="0" maxOccurs="unbounded">
  25. <!-- if there is a NAME there must also be a VALUE -->
  26. <xs:element name="name" type="xs:string" minOccurs="1" maxOccurs="1"/>
  27. <xs:element ref="value" minOccurs="1" maxOccurs="unbounded"/>
  28. <!-- all other elements are optional -->
  29. <xs:element name="synonym" minOccurs="0" maxOccurs="unbounded"/>
  30. <xs:element name="definition" type="xs:string" minOccurs="0" maxOccurs="1"/>
  31. <xs:element name="mapping" type="xs:string" minOccurs="0" maxOccurs="1"/>
  32. <xs:element name="dependency" type="xs:string" minOccurs="0" maxOccurs="1"/>
  33. <xs:element name="dependencyValue" type="xs:string" minOccurs="0" maxOccurs="1"/>
  34. </xs:choice>
  35. </xs:complexType>
  36. </xs:element>
  37. <!-- 2 -->
  38. <!-- SECTIONS ARE MEANT TO CONTAIN PROPERTIES THAT BELONG -->
  39. <!-- LOGICALLY TOGETHER THESE MAY HAVE SUBSECTIONS -->
  40. <xs:element name="section">
  41. <xs:complexType mixed="true">
  42. <xs:choice minOccurs="0" maxOccurs="unbounded">
  43. <xs:element name="name" type="xs:string" minOccurs="1" maxOccurs="1"/>
  44. <xs:element name="type" type="xs:string" minOccurs="1" maxOccurs="1"/>
  45. <xs:element name="id" type="xs:string" minOccurs="0" maxOccurs="1"/>
  46. <xs:element name="definition" type="xs:string" minOccurs="0" maxOccurs="1"/>
  47. <xs:element name="link" type="xs:string" minOccurs="0" maxOccurs="1"/>
  48. <xs:element name="include" type="xs:string" minOccurs="0" maxOccurs="1"/>
  49. <xs:element name="repository" type="xs:string" minOccurs="0" maxOccurs="1"/>
  50. <xs:element name="mapping" type="xs:string" minOccurs="0" maxOccurs="1"/>
  51. <xs:element ref="property" minOccurs="0" maxOccurs="unbounded"/>
  52. <xs:element ref="section" minOccurs="0" maxOccurs="unbounded"/>
  53. </xs:choice>
  54. </xs:complexType>
  55. </xs:element>
  56. <!-- 3 -->
  57. <!-- THE ROOT ELEMENT THAT CAN CONTAIN ALL THE INFORMATION THE USER WANTS TO PROVIDE -->
  58. <!-- THE ROOT ELEMENT ITSELF CAN ONLY CONTAIN SECTIONS BUT NO PROPERTIES -->
  59. <xs:element name="odML">
  60. <xs:complexType mixed="true">
  61. <xs:choice minOccurs="0" maxOccurs="unbounded">
  62. <xs:element name="author" type="xs:string" minOccurs="0" maxOccurs="1"/>
  63. <xs:element name="date" type="xs:date" minOccurs="0" maxOccurs="1"/>
  64. <xs:element name="version" type="xs:string" minOccurs="0" maxOccurs="1"/>
  65. <xs:element name="repository" type="xs:string" minOccurs="0" maxOccurs="1"/>
  66. <xs:element ref="section" minOccurs="1" maxOccurs="unbounded"/>
  67. </xs:choice>
  68. <xs:attribute name="version" type="xs:string"/>
  69. </xs:complexType>
  70. </xs:element>
  71. </xs:schema>