odML.xsd 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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="reference" type="xs:string" minOccurs="0" maxOccurs="1"/>
  16. <xs:element name="definition" minOccurs="0" maxOccurs="1"/>
  17. <xs:element name="filename" minOccurs="0" maxOccurs="1"/>
  18. <xs:element name="encoder" minOccurs="0" maxOccurs="1"/>
  19. <xs:element name="checksum" minOccurs="0" maxOccurs="1"/>
  20. </xs:choice>
  21. </xs:complexType>
  22. </xs:element>
  23. <!-- B: Property -->
  24. <xs:element name ="property">
  25. <xs:complexType>
  26. <xs:choice minOccurs="0" maxOccurs="unbounded">
  27. <!-- if there is a NAME there must also be a VALUE -->
  28. <xs:element name="name" type="xs:string" minOccurs="1" maxOccurs="1"/>
  29. <xs:element ref="value" minOccurs="1" maxOccurs="unbounded"/>
  30. <!-- all other elements are optional -->
  31. <xs:element name="definition" type="xs:string" minOccurs="0" maxOccurs="1"/>
  32. <xs:element name="mapping" type="xs:string" minOccurs="0" maxOccurs="1"/>
  33. <xs:element name="dependency" type="xs:string" minOccurs="0" maxOccurs="1"/>
  34. <xs:element name="dependencyValue" type="xs:string" minOccurs="0" maxOccurs="1"/>
  35. </xs:choice>
  36. </xs:complexType>
  37. </xs:element>
  38. <!-- 2 -->
  39. <!-- SECTIONS ARE MEANT TO CONTAIN PROPERTIES THAT BELONG -->
  40. <!-- LOGICALLY TOGETHER THESE MAY HAVE SUBSECTIONS -->
  41. <xs:element name="section">
  42. <xs:complexType mixed="true">
  43. <xs:choice minOccurs="0" maxOccurs="unbounded">
  44. <xs:element name="name" type="xs:string" minOccurs="1" maxOccurs="1"/>
  45. <xs:element name="type" type="xs:string" minOccurs="1" maxOccurs="1"/>
  46. <xs:element name="reference" type="xs:string" minOccurs="0" maxOccurs="1"/>
  47. <xs:element name="definition" type="xs:string" minOccurs="0" maxOccurs="1"/>
  48. <xs:element name="link" type="xs:string" minOccurs="0" maxOccurs="1"/>
  49. <xs:element name="include" type="xs:string" minOccurs="0" maxOccurs="1"/>
  50. <xs:element name="repository" type="xs:string" minOccurs="0" maxOccurs="1"/>
  51. <xs:element name="mapping" type="xs:string" minOccurs="0" maxOccurs="1"/>
  52. <xs:element ref="property" minOccurs="0" maxOccurs="unbounded"/>
  53. <xs:element ref="section" minOccurs="0" maxOccurs="unbounded"/>
  54. </xs:choice>
  55. </xs:complexType>
  56. </xs:element>
  57. <!-- 3 -->
  58. <!-- THE ROOT ELEMENT THAT CAN CONTAIN ALL THE INFORMATION THE USER WANTS TO PROVIDE -->
  59. <!-- THE ROOT ELEMENT ITSELF CAN ONLY CONTAIN SECTIONS BUT NO PROPERTIES -->
  60. <xs:element name="odML">
  61. <xs:complexType mixed="true">
  62. <xs:choice minOccurs="0" maxOccurs="unbounded">
  63. <xs:element name="author" type="xs:string" minOccurs="0" maxOccurs="1"/>
  64. <xs:element name="date" type="xs:date" minOccurs="0" maxOccurs="1"/>
  65. <xs:element name="version" type="xs:string" minOccurs="0" maxOccurs="1"/>
  66. <xs:element name="repository" type="xs:string" minOccurs="0" maxOccurs="1"/>
  67. <xs:element ref="section" minOccurs="1" maxOccurs="unbounded"/>
  68. </xs:choice>
  69. <xs:attribute name="version" type="xs:string"/>
  70. </xs:complexType>
  71. </xs:element>
  72. </xs:schema>