dcc 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (336) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +16 -0
  3. data/.rspec +3 -0
  4. data/.rubocop.yml +16 -0
  5. data/.rubocop_todo.yml +10 -0
  6. data/CHANGELOG.adoc +54 -0
  7. data/CONTRIBUTING.adoc +64 -0
  8. data/Gemfile +25 -0
  9. data/LICENSE +21 -0
  10. data/README.adoc +69 -0
  11. data/Rakefile +13 -0
  12. data/dcc.gemspec +41 -0
  13. data/docs/cli-reference.adoc +67 -0
  14. data/docs/getting-started.adoc +117 -0
  15. data/docs/schema-versions.adoc +65 -0
  16. data/examples/build_minimal_dcc.rb +23 -0
  17. data/examples/convert_all_formats.rb +19 -0
  18. data/examples/parse_and_inspect.rb +19 -0
  19. data/examples/quantity_math_demo.rb +32 -0
  20. data/examples/validate_full.rb +27 -0
  21. data/exe/dcc +7 -0
  22. data/lib/dcc/base/administrative_data.rb +43 -0
  23. data/lib/dcc/base/byte_data.rb +36 -0
  24. data/lib/dcc/base/calibration_laboratory.rb +29 -0
  25. data/lib/dcc/base/comment.rb +23 -0
  26. data/lib/dcc/base/condition.rb +34 -0
  27. data/lib/dcc/base/contact.rb +38 -0
  28. data/lib/dcc/base/contact_not_strict.rb +38 -0
  29. data/lib/dcc/base/core_data.rb +44 -0
  30. data/lib/dcc/base/data.rb +42 -0
  31. data/lib/dcc/base/digital_calibration_certificate.rb +32 -0
  32. data/lib/dcc/base/equipment_class.rb +24 -0
  33. data/lib/dcc/base/formula.rb +33 -0
  34. data/lib/dcc/base/hash_type.rb +34 -0
  35. data/lib/dcc/base/identification.rb +27 -0
  36. data/lib/dcc/base/identifications.rb +27 -0
  37. data/lib/dcc/base/influence_condition.rb +16 -0
  38. data/lib/dcc/base/influence_condition_list.rb +40 -0
  39. data/lib/dcc/base/item.rb +38 -0
  40. data/lib/dcc/base/item_list.rb +38 -0
  41. data/lib/dcc/base/list.rb +44 -0
  42. data/lib/dcc/base/location.rb +36 -0
  43. data/lib/dcc/base/measurement_meta_data.rb +15 -0
  44. data/lib/dcc/base/measurement_meta_data_list.rb +27 -0
  45. data/lib/dcc/base/measurement_result.rb +41 -0
  46. data/lib/dcc/base/measurement_result_list.rb +28 -0
  47. data/lib/dcc/base/measuring_equipment.rb +41 -0
  48. data/lib/dcc/base/measuring_equipment_list.rb +38 -0
  49. data/lib/dcc/base/quantity.rb +61 -0
  50. data/lib/dcc/base/ref_type_definition.rb +36 -0
  51. data/lib/dcc/base/ref_type_definition_list.rb +21 -0
  52. data/lib/dcc/base/resp_person.rb +38 -0
  53. data/lib/dcc/base/resp_person_list.rb +27 -0
  54. data/lib/dcc/base/result.rb +31 -0
  55. data/lib/dcc/base/result_list.rb +27 -0
  56. data/lib/dcc/base/rich_content.rb +34 -0
  57. data/lib/dcc/base/software.rb +35 -0
  58. data/lib/dcc/base/software_list.rb +27 -0
  59. data/lib/dcc/base/statement.rb +50 -0
  60. data/lib/dcc/base/statement_list.rb +27 -0
  61. data/lib/dcc/base/string_with_lang.rb +24 -0
  62. data/lib/dcc/base/text.rb +33 -0
  63. data/lib/dcc/base/used_method.rb +31 -0
  64. data/lib/dcc/base/used_method_list.rb +27 -0
  65. data/lib/dcc/base/xml_blob.rb +20 -0
  66. data/lib/dcc/base.rb +58 -0
  67. data/lib/dcc/builder/dsl.rb +10 -0
  68. data/lib/dcc/builder/session.rb +170 -0
  69. data/lib/dcc/builder.rb +34 -0
  70. data/lib/dcc/cli/cli.rb +149 -0
  71. data/lib/dcc/cli/formatters.rb +77 -0
  72. data/lib/dcc/cli.rb +7 -0
  73. data/lib/dcc/common_elements.rb +20 -0
  74. data/lib/dcc/context_configuration.rb +167 -0
  75. data/lib/dcc/context_options.rb +47 -0
  76. data/lib/dcc/convert/csv.rb +129 -0
  77. data/lib/dcc/convert/html.rb +127 -0
  78. data/lib/dcc/convert/json.rb +62 -0
  79. data/lib/dcc/convert/result.rb +51 -0
  80. data/lib/dcc/convert/yaml.rb +21 -0
  81. data/lib/dcc/convert.rb +14 -0
  82. data/lib/dcc/diff/change.rb +21 -0
  83. data/lib/dcc/diff/result.rb +58 -0
  84. data/lib/dcc/diff.rb +83 -0
  85. data/lib/dcc/error.rb +54 -0
  86. data/lib/dcc/extract/file.rb +143 -0
  87. data/lib/dcc/extract/ring.rb +28 -0
  88. data/lib/dcc/extract.rb +9 -0
  89. data/lib/dcc/i18n/text_lookup.rb +67 -0
  90. data/lib/dcc/i18n.rb +12 -0
  91. data/lib/dcc/inspect/report.rb +139 -0
  92. data/lib/dcc/inspect.rb +9 -0
  93. data/lib/dcc/migrate.rb +41 -0
  94. data/lib/dcc/namespace/dcc.rb +30 -0
  95. data/lib/dcc/namespace/dsig.rb +15 -0
  96. data/lib/dcc/namespace/math_ml.rb +14 -0
  97. data/lib/dcc/namespace/qudt.rb +15 -0
  98. data/lib/dcc/namespace/si.rb +26 -0
  99. data/lib/dcc/namespace.rb +18 -0
  100. data/lib/dcc/plugin/registry.rb +45 -0
  101. data/lib/dcc/plugin.rb +42 -0
  102. data/lib/dcc/quantity_format/formatter.rb +90 -0
  103. data/lib/dcc/quantity_format.rb +10 -0
  104. data/lib/dcc/quantity_math/quantity.rb +46 -0
  105. data/lib/dcc/quantity_math/real.rb +116 -0
  106. data/lib/dcc/quantity_math.rb +14 -0
  107. data/lib/dcc/schema/resources/dcc/dsi/v1.0.1.xsd +415 -0
  108. data/lib/dcc/schema/resources/dcc/dsi/v1.3.0.xsd +814 -0
  109. data/lib/dcc/schema/resources/dcc/dsi/v1.3.1.xsd +814 -0
  110. data/lib/dcc/schema/resources/dcc/dsi/v2.0.0.xsd +869 -0
  111. data/lib/dcc/schema/resources/dcc/dsi/v2.1.0.xsd +1031 -0
  112. data/lib/dcc/schema/resources/dcc/dsi/v2.2.1.xsd +1574 -0
  113. data/lib/dcc/schema/resources/dcc/qudt/v2.2.1.xsd +44 -0
  114. data/lib/dcc/schema/resources/dcc/v2.1.0/dcc.xsd +650 -0
  115. data/lib/dcc/schema/resources/dcc/v2.1.1/dcc.xsd +669 -0
  116. data/lib/dcc/schema/resources/dcc/v2.2.0/dcc.xsd +730 -0
  117. data/lib/dcc/schema/resources/dcc/v2.3.0/dcc.xsd +708 -0
  118. data/lib/dcc/schema/resources/dcc/v2.4.0/dcc.xsd +725 -0
  119. data/lib/dcc/schema/resources/dcc/v3.0.0/dcc.xsd +749 -0
  120. data/lib/dcc/schema/resources/dcc/v3.1.0/dcc.xsd +843 -0
  121. data/lib/dcc/schema/resources/dcc/v3.1.1/dcc.xsd +843 -0
  122. data/lib/dcc/schema/resources/dcc/v3.1.2/dcc.xsd +844 -0
  123. data/lib/dcc/schema/resources/dcc/v3.2.0/dcc.xsd +940 -0
  124. data/lib/dcc/schema/resources/dcc/v3.2.1/dcc.xsd +963 -0
  125. data/lib/dcc/schema/resources/dcc/v3.3.0/dcc.xsd +1008 -0
  126. data/lib/dcc/schema/resources/dcc/xmldsig-core-schema.xsd +312 -0
  127. data/lib/dcc/schema/resources/dsi/qudt/v2.2.1.xsd +44 -0
  128. data/lib/dcc/schema/resources/dsi/v1.0.1/SI_Format.xsd +415 -0
  129. data/lib/dcc/schema/resources/dsi/v1.3.0/SI_Format.xsd +814 -0
  130. data/lib/dcc/schema/resources/dsi/v1.3.1/SI_Format.xsd +814 -0
  131. data/lib/dcc/schema/resources/dsi/v2.0.0/SI_Format.xsd +869 -0
  132. data/lib/dcc/schema/resources/dsi/v2.1.0/SI_Format.xsd +1031 -0
  133. data/lib/dcc/schema/resources/dsi/v2.2.1/SI_Format.xsd +1574 -0
  134. data/lib/dcc/schema/resources/qudt/qudt.xsd +44 -0
  135. data/lib/dcc/schema/resources/schematron/dcc.sch +523 -0
  136. data/lib/dcc/schema/resources/schematron/dcc.svrl +2302 -0
  137. data/lib/dcc/schema/resources/xmldsig/xmldsig-core-schema.xsd +312 -0
  138. data/lib/dcc/schema/version.rb +94 -0
  139. data/lib/dcc/schema.rb +35 -0
  140. data/lib/dcc/server/app.rb +133 -0
  141. data/lib/dcc/server/storage/entry.rb +15 -0
  142. data/lib/dcc/server/storage/memory.rb +57 -0
  143. data/lib/dcc/server/storage.rb +13 -0
  144. data/lib/dcc/server.rb +33 -0
  145. data/lib/dcc/si/base/complex.rb +43 -0
  146. data/lib/dcc/si/base/complex_list_xml_list.rb +39 -0
  147. data/lib/dcc/si/base/constant.rb +39 -0
  148. data/lib/dcc/si/base/coverage_interval_mu.rb +31 -0
  149. data/lib/dcc/si/base/expanded_mu.rb +29 -0
  150. data/lib/dcc/si/base/expanded_unc_xml_list.rb +30 -0
  151. data/lib/dcc/si/base/hybrid.rb +42 -0
  152. data/lib/dcc/si/base/measurement_uncertainty_univariate.rb +28 -0
  153. data/lib/dcc/si/base/real.rb +48 -0
  154. data/lib/dcc/si/base/real_list_xml_list.rb +45 -0
  155. data/lib/dcc/si/base/si_list.rb +37 -0
  156. data/lib/dcc/si/base/standard_mu.rb +25 -0
  157. data/lib/dcc/si/base.rb +24 -0
  158. data/lib/dcc/si/common_elements.rb +13 -0
  159. data/lib/dcc/si/namespace.rb +7 -0
  160. data/lib/dcc/si/v1/common_elements.rb +13 -0
  161. data/lib/dcc/si/v1/complex.rb +8 -0
  162. data/lib/dcc/si/v1/complex_list_xml_list.rb +8 -0
  163. data/lib/dcc/si/v1/configuration.rb +13 -0
  164. data/lib/dcc/si/v1/constant.rb +8 -0
  165. data/lib/dcc/si/v1/coverage_interval_mu.rb +8 -0
  166. data/lib/dcc/si/v1/expanded_mu.rb +8 -0
  167. data/lib/dcc/si/v1/expanded_unc.rb +23 -0
  168. data/lib/dcc/si/v1/expanded_unc_xml_list.rb +8 -0
  169. data/lib/dcc/si/v1/hybrid.rb +8 -0
  170. data/lib/dcc/si/v1/measurement_uncertainty_univariate.rb +8 -0
  171. data/lib/dcc/si/v1/namespace.rb +9 -0
  172. data/lib/dcc/si/v1/real.rb +8 -0
  173. data/lib/dcc/si/v1/real_list_xml_list.rb +8 -0
  174. data/lib/dcc/si/v1/si_list.rb +8 -0
  175. data/lib/dcc/si/v1/standard_mu.rb +8 -0
  176. data/lib/dcc/si/v1.rb +46 -0
  177. data/lib/dcc/si/v2/common_elements.rb +13 -0
  178. data/lib/dcc/si/v2/complex.rb +8 -0
  179. data/lib/dcc/si/v2/complex_list_xml_list.rb +8 -0
  180. data/lib/dcc/si/v2/configuration.rb +13 -0
  181. data/lib/dcc/si/v2/constant.rb +8 -0
  182. data/lib/dcc/si/v2/coverage_interval_mu.rb +8 -0
  183. data/lib/dcc/si/v2/coverage_interval_mu_xml_list.rb +24 -0
  184. data/lib/dcc/si/v2/expanded_mu.rb +8 -0
  185. data/lib/dcc/si/v2/expanded_mu_xml_list.rb +22 -0
  186. data/lib/dcc/si/v2/expanded_unc_xml_list.rb +8 -0
  187. data/lib/dcc/si/v2/hybrid.rb +8 -0
  188. data/lib/dcc/si/v2/measurement_uncertainty_univariate.rb +8 -0
  189. data/lib/dcc/si/v2/namespace.rb +9 -0
  190. data/lib/dcc/si/v2/real.rb +8 -0
  191. data/lib/dcc/si/v2/real_list_xml_list.rb +8 -0
  192. data/lib/dcc/si/v2/si_list.rb +8 -0
  193. data/lib/dcc/si/v2/standard_mu.rb +8 -0
  194. data/lib/dcc/si/v2/standard_mu_xml_list.rb +18 -0
  195. data/lib/dcc/si/v2.rb +49 -0
  196. data/lib/dcc/si.rb +34 -0
  197. data/lib/dcc/signature/result.rb +43 -0
  198. data/lib/dcc/signature/signer.rb +36 -0
  199. data/lib/dcc/signature/verifier.rb +41 -0
  200. data/lib/dcc/signature.rb +13 -0
  201. data/lib/dcc/transform/result.rb +24 -0
  202. data/lib/dcc/transform/xslt.rb +72 -0
  203. data/lib/dcc/transform.rb +12 -0
  204. data/lib/dcc/type/base64_binary.rb +55 -0
  205. data/lib/dcc/type/decimal_xml_list.rb +47 -0
  206. data/lib/dcc/type/iso_country_code.rb +23 -0
  207. data/lib/dcc/type/iso_language_code.rb +23 -0
  208. data/lib/dcc/type/schema_version.rb +37 -0
  209. data/lib/dcc/type/si_unit.rb +26 -0
  210. data/lib/dcc/type.rb +16 -0
  211. data/lib/dcc/type_guards.rb +140 -0
  212. data/lib/dcc/v2/administrative_data.rb +8 -0
  213. data/lib/dcc/v2/byte_data.rb +8 -0
  214. data/lib/dcc/v2/calibration_laboratory.rb +8 -0
  215. data/lib/dcc/v2/comment.rb +8 -0
  216. data/lib/dcc/v2/common_elements.rb +13 -0
  217. data/lib/dcc/v2/condition.rb +8 -0
  218. data/lib/dcc/v2/configuration.rb +17 -0
  219. data/lib/dcc/v2/contact.rb +8 -0
  220. data/lib/dcc/v2/contact_not_strict.rb +8 -0
  221. data/lib/dcc/v2/core_data.rb +8 -0
  222. data/lib/dcc/v2/data.rb +8 -0
  223. data/lib/dcc/v2/digital_calibration_certificate.rb +8 -0
  224. data/lib/dcc/v2/equipment_class.rb +8 -0
  225. data/lib/dcc/v2/formula.rb +8 -0
  226. data/lib/dcc/v2/hash_type.rb +8 -0
  227. data/lib/dcc/v2/identification.rb +8 -0
  228. data/lib/dcc/v2/identifications.rb +8 -0
  229. data/lib/dcc/v2/influence_condition.rb +7 -0
  230. data/lib/dcc/v2/influence_condition_list.rb +8 -0
  231. data/lib/dcc/v2/item.rb +8 -0
  232. data/lib/dcc/v2/item_list.rb +8 -0
  233. data/lib/dcc/v2/list.rb +8 -0
  234. data/lib/dcc/v2/location.rb +8 -0
  235. data/lib/dcc/v2/measurement_meta_data.rb +8 -0
  236. data/lib/dcc/v2/measurement_meta_data_list.rb +8 -0
  237. data/lib/dcc/v2/measurement_result.rb +8 -0
  238. data/lib/dcc/v2/measurement_result_list.rb +8 -0
  239. data/lib/dcc/v2/measuring_equipment.rb +8 -0
  240. data/lib/dcc/v2/measuring_equipment_list.rb +8 -0
  241. data/lib/dcc/v2/namespace.rb +8 -0
  242. data/lib/dcc/v2/quantity.rb +49 -0
  243. data/lib/dcc/v2/ref_type_definition.rb +11 -0
  244. data/lib/dcc/v2/ref_type_definition_list.rb +15 -0
  245. data/lib/dcc/v2/resp_person.rb +8 -0
  246. data/lib/dcc/v2/resp_person_list.rb +8 -0
  247. data/lib/dcc/v2/result.rb +8 -0
  248. data/lib/dcc/v2/result_list.rb +8 -0
  249. data/lib/dcc/v2/rich_content.rb +12 -0
  250. data/lib/dcc/v2/software.rb +8 -0
  251. data/lib/dcc/v2/software_list.rb +8 -0
  252. data/lib/dcc/v2/statement.rb +8 -0
  253. data/lib/dcc/v2/statement_list.rb +8 -0
  254. data/lib/dcc/v2/string_with_lang.rb +8 -0
  255. data/lib/dcc/v2/text.rb +8 -0
  256. data/lib/dcc/v2/used_method.rb +8 -0
  257. data/lib/dcc/v2/used_method_list.rb +8 -0
  258. data/lib/dcc/v2/xml_blob.rb +8 -0
  259. data/lib/dcc/v2.rb +84 -0
  260. data/lib/dcc/v3/administrative_data.rb +8 -0
  261. data/lib/dcc/v3/byte_data.rb +8 -0
  262. data/lib/dcc/v3/calibration_laboratory.rb +8 -0
  263. data/lib/dcc/v3/comment.rb +8 -0
  264. data/lib/dcc/v3/common_elements.rb +11 -0
  265. data/lib/dcc/v3/condition.rb +8 -0
  266. data/lib/dcc/v3/configuration.rb +17 -0
  267. data/lib/dcc/v3/contact.rb +8 -0
  268. data/lib/dcc/v3/contact_not_strict.rb +8 -0
  269. data/lib/dcc/v3/core_data.rb +8 -0
  270. data/lib/dcc/v3/data.rb +8 -0
  271. data/lib/dcc/v3/digital_calibration_certificate.rb +8 -0
  272. data/lib/dcc/v3/equipment_class.rb +8 -0
  273. data/lib/dcc/v3/formula.rb +8 -0
  274. data/lib/dcc/v3/hash_type.rb +8 -0
  275. data/lib/dcc/v3/identification.rb +8 -0
  276. data/lib/dcc/v3/identifications.rb +8 -0
  277. data/lib/dcc/v3/influence_condition.rb +7 -0
  278. data/lib/dcc/v3/influence_condition_list.rb +8 -0
  279. data/lib/dcc/v3/item.rb +8 -0
  280. data/lib/dcc/v3/item_list.rb +8 -0
  281. data/lib/dcc/v3/list.rb +8 -0
  282. data/lib/dcc/v3/location.rb +8 -0
  283. data/lib/dcc/v3/measurement_meta_data.rb +8 -0
  284. data/lib/dcc/v3/measurement_meta_data_list.rb +8 -0
  285. data/lib/dcc/v3/measurement_result.rb +8 -0
  286. data/lib/dcc/v3/measurement_result_list.rb +8 -0
  287. data/lib/dcc/v3/measuring_equipment.rb +8 -0
  288. data/lib/dcc/v3/measuring_equipment_list.rb +8 -0
  289. data/lib/dcc/v3/namespace.rb +7 -0
  290. data/lib/dcc/v3/quantity.rb +49 -0
  291. data/lib/dcc/v3/ref_type_definition.rb +8 -0
  292. data/lib/dcc/v3/ref_type_definition_list.rb +8 -0
  293. data/lib/dcc/v3/resp_person.rb +8 -0
  294. data/lib/dcc/v3/resp_person_list.rb +8 -0
  295. data/lib/dcc/v3/result.rb +8 -0
  296. data/lib/dcc/v3/result_list.rb +8 -0
  297. data/lib/dcc/v3/rich_content.rb +8 -0
  298. data/lib/dcc/v3/software.rb +8 -0
  299. data/lib/dcc/v3/software_list.rb +8 -0
  300. data/lib/dcc/v3/statement.rb +8 -0
  301. data/lib/dcc/v3/statement_list.rb +8 -0
  302. data/lib/dcc/v3/string_with_lang.rb +8 -0
  303. data/lib/dcc/v3/text.rb +8 -0
  304. data/lib/dcc/v3/used_method.rb +8 -0
  305. data/lib/dcc/v3/used_method_list.rb +8 -0
  306. data/lib/dcc/v3/xml_blob.rb +8 -0
  307. data/lib/dcc/v3.rb +111 -0
  308. data/lib/dcc/validate/business_rules.rb +121 -0
  309. data/lib/dcc/validate/issue.rb +56 -0
  310. data/lib/dcc/validate/result.rb +105 -0
  311. data/lib/dcc/validate/schematron/profile.rb +64 -0
  312. data/lib/dcc/validate/schematron/rule.rb +49 -0
  313. data/lib/dcc/validate/schematron/rules/administrative_data_completeness.rb +42 -0
  314. data/lib/dcc/validate/schematron/rules/base.rb +15 -0
  315. data/lib/dcc/validate/schematron/rules/date_range_check.rb +41 -0
  316. data/lib/dcc/validate/schematron/rules/id_refid_linking.rb +61 -0
  317. data/lib/dcc/validate/schematron/rules/influence_conditions_placement.rb +58 -0
  318. data/lib/dcc/validate/schematron/rules/iso_code_validation.rb +53 -0
  319. data/lib/dcc/validate/schematron/rules/language_code_dedup.rb +39 -0
  320. data/lib/dcc/validate/schematron/rules/non_si_declaration.rb +82 -0
  321. data/lib/dcc/validate/schematron/rules/release_format_check.rb +44 -0
  322. data/lib/dcc/validate/schematron/rules/schema_version_check.rb +31 -0
  323. data/lib/dcc/validate/schematron/rules/uncertainty_consistency.rb +58 -0
  324. data/lib/dcc/validate/schematron/rules/unit_format_check.rb +74 -0
  325. data/lib/dcc/validate/schematron/rules/used_methods_placement.rb +65 -0
  326. data/lib/dcc/validate/schematron/rules/used_software_placement.rb +43 -0
  327. data/lib/dcc/validate/schematron/rules/xml_list_spacing.rb +42 -0
  328. data/lib/dcc/validate/schematron/rules.rb +30 -0
  329. data/lib/dcc/validate/schematron.rb +22 -0
  330. data/lib/dcc/validate/severity.rb +39 -0
  331. data/lib/dcc/validate/xsd.rb +97 -0
  332. data/lib/dcc/validate.rb +15 -0
  333. data/lib/dcc/version.rb +5 -0
  334. data/lib/dcc/versioned_parser.rb +48 -0
  335. data/lib/dcc.rb +141 -0
  336. metadata +425 -0
@@ -0,0 +1,1031 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <xs:schema version="2.1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema"
3
+ targetNamespace="https://ptb.de/si"
4
+ xmlns:si="https://ptb.de/si"
5
+ elementFormDefault="qualified">
6
+
7
+ <xs:annotation>
8
+ <xs:documentation xml:lang="en">
9
+ D-SI - Digital System of Units
10
+ Copyright (c) 2019 - 2021 Physikalisch-Technische Bundesanstalt (PTB), all rights reserved.
11
+
12
+ This XML Scheme Definition (XSD) is free software: you can redistribute it and/or modify
13
+ it under the terms of the GNU Lesser General Public License as published by
14
+ the Free Software Foundation, version 3 of the License.
15
+
16
+ This XSD is distributed in the hope that it will be useful,
17
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
18
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
+ GNU Lesser General Public License for more details.
20
+
21
+ You should have received a copy of the GNU Lesser General Public License
22
+ along with this XSD. If not, see http://www.gnu.org/licenses.
23
+
24
+ CONTACT: smartcom@ptb.de
25
+ DEVELOPMENT: https://gitlab1.ptb.de/d-ptb/d-si/xsd-d-si
26
+ D-SI XSD VERSION: 2.1.0
27
+ RELEASE DATA: 2022-01-21
28
+ DOI: 10.5281/zenodo.3366901
29
+ </xs:documentation>
30
+ <xs:documentation xml:lang="en">
31
+ ACKNOWLEDGEMENT:
32
+ The development of early versions of the XML scheme was part of the research project EMPIR 17IND02 (title: SmartCom).
33
+ This project (17IND02) has received funding from the EMPIR programme, co-financed by the Participating States and
34
+ from the European Union's Horizon 2020 research and innovation programme.
35
+ The extension to version 2.1.0 received great support from PTB members B. Gloger and J. Jagieniak.
36
+ </xs:documentation>
37
+ </xs:annotation>
38
+
39
+
40
+
41
+
42
+
43
+ <!-- ############## D-SI XML ELEMENT DEFINITIONS FOR MEASUREMETN DATA EXCHANGE #################### -->
44
+
45
+ <xs:element name="real" type="si:realQuantityType">
46
+ <xs:annotation>
47
+ <xs:documentation xml:lang="en">
48
+ Metadata element definition for a real measurement quantity.
49
+ </xs:documentation>
50
+ <xs:documentation xml:lang="en">
51
+ <![CDATA[
52
+ The following statements of a real quantity are possible.
53
+ [(m)-mandatory, (o)-optional]
54
+
55
+ 1. Basic measured quantity
56
+ (o) - element label (string)
57
+ (m) - element value (decimal value type)
58
+ (m) - element unit (string - SI format)
59
+ (o) - element dateTime (xs:dateTime)
60
+
61
+ 2. Measured quantity with univariate measurement uncertainty
62
+ (o) - element label (string)
63
+ (m) - element value (decimal value type)
64
+ (m) - element unit (string - SI format)
65
+ (o) - element dateTime (xs:dateTime)
66
+ (m) - choice si:expandedUnc or si:coverageInterval for the univaraite uncertainty
67
+ ]]>
68
+ </xs:documentation>
69
+ <xs:documentation xml:lang="en">
70
+ <![CDATA[
71
+ Integration into external XML:
72
+ <myXML xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:si="https://ptb.de/si">
73
+ <xs:element name="individualElement">
74
+ <xs:complexType>
75
+ <xs:sequence>
76
+ <xs:element ref="si:real"/>
77
+ </xs:sequence>
78
+ </xs:complexType>
79
+ </xs:element>
80
+ </mxXML>
81
+ ]]>
82
+ </xs:documentation>
83
+ </xs:annotation>
84
+ </xs:element>
85
+
86
+
87
+ <xs:element name="constant" type="si:constantQuantityType">
88
+ <xs:annotation>
89
+ <xs:documentation xml:lang="en">
90
+ Definition of a structure for real numbers, that represent for fundamental
91
+ physical constants and mathematical constants.
92
+ </xs:documentation>
93
+ <xs:documentation xml:lang="en">
94
+ <![CDATA[
95
+ The element has the following components [(m)-mandatory, (o)-optional]:
96
+
97
+ (o) - element label (string)
98
+ (m) - element value (decimal value type)
99
+ (m) - element unit (string - SI unit)
100
+ (o) - element dateTime (xs:dateTime)
101
+ (o) - element uncertainty (decimal value >= 0)
102
+ (o) - element distribution (string)
103
+
104
+ The value and the uncertainty have the unit specified by the element unit.
105
+ For fundamental physical constants, that are defined experimentally, the
106
+ uncertainty is the standard deviation.
107
+
108
+ For rounded mathematical constants, the uncertainty is the standard deviation
109
+ of a rectangular distribution (element value defines center point), that
110
+ contains the exact value of the constant with 100 percent probability.
111
+ ]]>
112
+ </xs:documentation>
113
+ </xs:annotation>
114
+ </xs:element>
115
+
116
+
117
+ <xs:element name="complex" type="si:complexQuantityType">
118
+ <xs:annotation>
119
+ <xs:documentation xml:lang="en">
120
+ The definition of complex quantities in the D-SI metadata model.
121
+ Complex quantities allow two representations of complex numerical values:
122
+ One is the Cartesian coordinate form, the other representation is the
123
+ polar coordinate form.
124
+ </xs:documentation>
125
+ <xs:documentation xml:lang="en">
126
+ <![CDATA[
127
+ The following statements of a complex quantity are possible.
128
+ [(m)-mandatory, (o)-optional]
129
+
130
+ 1. Basic measured quantity in Cartesian form
131
+ (o) - element label (string)
132
+ (m) - element valueReal (decimal value type)
133
+ (m) - element valueImag (decimal value type)
134
+ (m) - element unit (string - SI unit)
135
+ (o) - element dateTime (xs:dateTime)
136
+
137
+
138
+ 2. Basic measured quantity in polar form
139
+ (o) - element label (string)
140
+ (m) - element valueMagnitude (decimal value type)
141
+ (m) - element valuePhase (decimal value type)
142
+ (m) - element unit (string - SI unit)
143
+ (m) - element unitPhase (string - SI unit for an angular quantity)
144
+ (o) - element dateTime (xs:dateTime)
145
+
146
+
147
+ 3. Basic measured quantity in Cartesian form with bivariate uncertainty
148
+ (o) - element label (string)
149
+ (m) - element valueReal (decimal value type)
150
+ (m) - element valueImag (decimal value type)
151
+ (m) - element unit (string - SI unit)
152
+ (o) - element dateTime (xs:dateTime)
153
+ (m) - choice si:ellipsoidalRegion or si:rectangularRegion for the bivariate uncertainty
154
+
155
+
156
+ 4. Basic measured quantity in polar form with bivariate uncertainty
157
+ (o) - element label (string)
158
+ (m) - element valueMagnitude (decimal value type)
159
+ (m) - element valuePhase (decimal value type)
160
+ (m) - element unit (string - SI unit)
161
+ (m) - element unitPhase (string - SI unit for an angular quantity)
162
+ (o) - element dateTime (xs:dateTime)
163
+ (m) - choice si:ellipsoidalRegion or si:rectangularRegion for the bivariate uncertainty
164
+ ]]>
165
+ </xs:documentation>
166
+ </xs:annotation>
167
+ </xs:element>
168
+
169
+
170
+ <xs:element name="realList" type="si:realListType">
171
+ <xs:annotation>
172
+ <xs:documentation xml:lang="en">
173
+ Meta data element definition for a list of real measurement quantities.
174
+ The list can represent independent measurement or multivariate vector quantities.
175
+ </xs:documentation>
176
+ <xs:documentation xml:lang="en">
177
+ <![CDATA[
178
+ A list can provide the following structures:
179
+ - list of one ore more si:real elements
180
+ - optional list timestamp, list label, and/or list unit
181
+ - optional list univariate uncertainty statement with list unit
182
+ - optional multivariate hyper-elliptical or hyper-rectangular coverage region
183
+ ]]>
184
+ </xs:documentation>
185
+ </xs:annotation>
186
+ </xs:element>
187
+
188
+ <xs:element name="realListXMLList" type="si:realListXMLListType">
189
+ <xs:annotation>
190
+ <xs:documentation xml:lang="en">
191
+ Meta data element definition for a list of real measurement quantities based on
192
+ the XML type xsd:list. The list can represent independent measurement or multivariate
193
+ vector quantities. The listed data is separated by blank spaces allowing a memory
194
+ saving implementation of large data sets.
195
+ </xs:documentation>
196
+ <xs:documentation xml:lang="en">
197
+ <![CDATA[
198
+ A list can provide the following structures:
199
+ - list of one ore more si:value elements separated by blank spaces
200
+ - optional list timestamp, list label, and/or list unit
201
+ - optional list univariate uncertainty statement with list unit
202
+ - optional multivariate hyper-elliptical or hyper-rectangular coverage region
203
+ ]]>
204
+ </xs:documentation>
205
+ </xs:annotation>
206
+ </xs:element>
207
+
208
+ <xs:element name="complexList" type="si:complexListType">
209
+ <xs:annotation>
210
+ <xs:documentation xml:lang="en">
211
+ Meta data element definition for a list of complex measurement quantities.
212
+ The list can represent independent measurement or multivariate vector quantities.
213
+ </xs:documentation>
214
+ <xs:documentation xml:lang="en">
215
+ <![CDATA[
216
+ This list can provide the following structures:
217
+ - list of one ore more si:complex elements
218
+ - optional list timestamp, list label, and/or list unit(s)
219
+ - optional list bivariate uncertainty statement with list unit(s)
220
+ - optional multivariate hyper-elliptical or hyper-rectangular coverage region
221
+ ]]>
222
+ </xs:documentation>
223
+ </xs:annotation>
224
+ </xs:element>
225
+
226
+ <xs:element name="list" type="si:listType">
227
+ <xs:annotation>
228
+ <xs:documentation xml:lang="en">
229
+ Meta data element definition for a list of basic measurement quantities.
230
+ The list can represent independent measurement or multivariate vector quantities.
231
+ </xs:documentation>
232
+ <xs:documentation xml:lang="en">
233
+ <![CDATA[
234
+ This list can provide the following nested structures:
235
+ - si:list elements and
236
+ - si:realList elements and
237
+ - si:complexList elements
238
+ ]]>
239
+ </xs:documentation>
240
+ </xs:annotation>
241
+ </xs:element>
242
+
243
+
244
+
245
+ <!-- -->
246
+ <xs:element name="hybrid" type="si:hybridType">
247
+ <xs:annotation>
248
+ <xs:documentation xml:lang="en">
249
+ The hybrid elements allows to add quantities to the
250
+ machine readable D-SI format, with other units, than those allowed
251
+ to be used with the SI by means of the BIPM SI brochure.
252
+ </xs:documentation>
253
+ <xs:documentation xml:lang="en">
254
+ <![CDATA[
255
+ The hybrid element can contain the following information
256
+
257
+ 1. A set of real quantities
258
+ - all real elements provide a quantity value for one and the same measured quantity
259
+ - each real element provides this quantity with a different unit
260
+ - at least one real element provides the quantity with a machine readable SI unit
261
+ - the other real quantities can use any SI or non-SI unit
262
+
263
+ 2. A set of complex quantities
264
+ - all complex elements provide a quantity value for one and the same measured quantity
265
+ - each complex element provides this quantity with a different unit(s)
266
+ - at least one complex element provides the quantity with a machine readable SI unit(s)
267
+ - the other complex quantities can use any SI or non-SI unit
268
+
269
+ 3. A set of list elements
270
+ - all list elements must provide the same quantity information and hence, must have
271
+ an identical structure.
272
+ - the lists do only differ by using different units for each of the quantities
273
+ - at least one list provides all quantities only with machine readable SI units
274
+ - the other lists can use any other units for the quantities
275
+ - Applicable list types are si:list, si:realList, si:complexList and si:realListXMLList.
276
+
277
+ 4. A set of constant quantities
278
+ - all constant elements provide a quantity value for one and the same quantity
279
+ - each constant element provides this quantity with a different unit
280
+ - at least one constant element provides the quantity with a machine readable SI unit
281
+ - the other constant quantities can use any SI or non-SI unit
282
+ ]]>
283
+ </xs:documentation>
284
+ </xs:annotation>
285
+ </xs:element>
286
+
287
+
288
+
289
+ <!-- ############## D-SI SUPPLEMENTAL XML ELEMENT DEFINITIONS #################### -->
290
+
291
+ <xs:element name="expandedUnc" type="si:expandedUncType">
292
+ <xs:annotation>
293
+ <xs:documentation xml:lang="en">
294
+ Definition of the structure, that gives the necessary components for stating
295
+ an expanded measurement uncertainty. This element must always be used in the
296
+ context of a real quantity, which is an application within si:real and/or
297
+ si:globalUnivariateUnc.
298
+ </xs:documentation>
299
+ <xs:documentation xml:lang="en">
300
+ <![CDATA[
301
+ The element has the following components [(m)-mandatory, (o)-optional]:
302
+
303
+ (m) - element uncertainty (decimal value >= 0, THE EXPANDED UNCERTAINTY VALUE!)
304
+ (m) - element coverageFactor (decimal value >= 1)
305
+ (m) - element coverageProbability (decimal value in [0,1])
306
+ (o) - element distribution (string)
307
+
308
+ The unit of component uncertainty is the unit used in the context of
309
+ si:real and/or si:globalUnivariateUnc.
310
+ ]]>
311
+ </xs:documentation>
312
+ </xs:annotation>
313
+ </xs:element>
314
+
315
+
316
+ <xs:element name="coverageInterval" type="si:coverageIntervalType">
317
+ <xs:annotation>
318
+ <xs:documentation xml:lang="en">
319
+ Definition of the structure, that gives the necessary components for stating
320
+ a probabilistic-symmetric coverage interval for a real uncertainty. This element
321
+ must always be used in the context of a real quantity, which is an application
322
+ within si:real and/or si:globalUnivariateUnc.
323
+ </xs:documentation>
324
+ <xs:documentation xml:lang="en">
325
+ <![CDATA[
326
+ The element has the following components [(m)-mandatory, (o)-optional]:
327
+
328
+ (m) - element stdUncertainty (decimal value >= 0)
329
+ (m) - element intervalMin (decimal value type)
330
+ (m) - element intervalMax (decimal value type)
331
+ (m) - element coverageProbability (decimal value in [0,1])
332
+ (o) - element distribution (string)
333
+
334
+ The unit of components stdUncertainty, intervalMin and intervalMax is the unit
335
+ used in the context of si:real and/or si:globalUnivaraiteUnc.
336
+ ]]>
337
+ </xs:documentation>
338
+ </xs:annotation>
339
+ </xs:element>
340
+
341
+
342
+ <!-- -->
343
+ <xs:element name="covarianceMatrix" type="si:covarianceMatrixType">
344
+ <xs:annotation>
345
+ <xs:documentation xml:lang="en">
346
+ Definition of a covariance matrix element that is used for
347
+ multidimensional uncertainty statements in the D-SI format.
348
+ </xs:documentation>
349
+ <xs:documentation xml:lang="en">
350
+ <![CDATA[
351
+ A covariance matrix has n column elements.
352
+ The dimension of the covariance matrix is the amount of columns.
353
+ Each column contains the covariance values of one column of the
354
+ covariance matrix.
355
+ The order of the columns is from left to right column in the
356
+ covariance matrix.
357
+ ]]>
358
+ </xs:documentation>
359
+ </xs:annotation>
360
+ </xs:element>
361
+
362
+
363
+ <xs:element name="ellipsoidalRegion" type="si:ellipsoidalRegionType">
364
+ <xs:annotation>
365
+ <xs:documentation xml:lang="en">
366
+ Definition of the structure, that provides a hyper-ellipsoidal coverage
367
+ region for stating the uncertainty of multivariate quantities. It is
368
+ used in the context of uncertainty for complex quantities and
369
+ lists of real or complex quantities.
370
+ </xs:documentation>
371
+ <xs:documentation xml:lang="en">
372
+ <![CDATA[
373
+ The element has the following components [(m)-mandatory, (o)-optional]:
374
+
375
+ (m) - element covarianceMatrix (sub structure covarianceMatrix)
376
+ (m) - element coverageFactor (decimal value >= 1)
377
+ (m) - element coverageProbability (decimal value in [0,1])
378
+ (o) - element distribution (string)
379
+ ]]>
380
+ </xs:documentation>
381
+ </xs:annotation>
382
+ </xs:element>
383
+
384
+
385
+ <xs:element name="rectangularRegion" type="si:rectangularRegionType">
386
+ <xs:annotation>
387
+ <xs:documentation xml:lang="en">
388
+ Definition of the structure that provides a hyper-rectangular coverage
389
+ region for stating the uncertainty of multivariate quantities. It is
390
+ used in the context of uncertainty for complex quantities and
391
+ lists of real or complex quantities.
392
+ </xs:documentation>
393
+ <xs:documentation xml:lang="en">
394
+ <![CDATA[
395
+ The element has the following components [(m)-mandatory, (o)-optional]:
396
+
397
+ (m) - element covarianceMatrix (sub structure covarianceMatrix)
398
+ (m) - element coverageFactor (decimal value >= 1)
399
+ (m) - element coverageProbability (decimal value in [0,1])
400
+ (o) - element distribution (string)
401
+ ]]>
402
+ </xs:documentation>
403
+ </xs:annotation>
404
+ </xs:element>
405
+
406
+
407
+
408
+ <!-- ############## D-SI XML TYPE DEFINITIONS #################### -->
409
+
410
+ <xs:complexType name="realQuantityType">
411
+ <xs:sequence>
412
+ <!-- optional label and quantity type-->
413
+ <xs:element name="label" type="xs:string" minOccurs="0"/>
414
+
415
+ <!-- mandatory information -->
416
+ <xs:element name="value" type="si:decimalType"/>
417
+ <xs:element name="unit" type="si:unitType"/>
418
+
419
+ <!-- optional time stamp -->
420
+ <xs:element name="dateTime" type="xs:dateTime" minOccurs="0"/>
421
+
422
+ <!-- optional choice of uncertainty statements -->
423
+ <xs:choice minOccurs="0">
424
+ <xs:annotation>
425
+ <xs:documentation xml:lang="en">
426
+ univariate measurement uncertainty
427
+ </xs:documentation>
428
+ </xs:annotation>
429
+ <xs:element name="expandedUnc" type="si:expandedUncType"/>
430
+ <xs:element name="coverageInterval" type="si:coverageIntervalType"/>
431
+ </xs:choice>
432
+
433
+ </xs:sequence>
434
+ </xs:complexType>
435
+
436
+
437
+ <xs:complexType name="constantQuantityType">
438
+ <xs:sequence>
439
+ <!-- optional label and quantity type-->
440
+ <xs:element name="label" type="xs:string" minOccurs="0"/>
441
+
442
+ <!-- mandatory information -->
443
+ <xs:element name="value" type="si:decimalType"/>
444
+ <xs:element name="unit" type="si:unitType"/>
445
+
446
+ <!-- optional time stamp -->
447
+ <xs:element name="dateTime" type="xs:dateTime" minOccurs="0"/>
448
+
449
+ <!-- optional uncertainty -->
450
+ <xs:element name="uncertainty" type="si:uncertaintyValueType" minOccurs="0"/>
451
+
452
+ <!-- optional distribution -->
453
+ <xs:element name="distribution" type="xs:string" minOccurs="0"/>
454
+ </xs:sequence>
455
+ </xs:complexType>
456
+
457
+
458
+ <xs:complexType name="complexQuantityType">
459
+ <xs:sequence>
460
+ <!-- optional label and quantity type-->
461
+ <xs:element name="label" type="xs:string" minOccurs="0"/>
462
+
463
+ <!-- choice of Cartesian coordinate form or polar coordinate form -->
464
+ <xs:choice>
465
+ <xs:sequence>
466
+ <!-- mandatory components of Cartesian coordinate form -->
467
+ <xs:element name="valueReal" type="si:decimalType"/>
468
+ <xs:element name="valueImag" type="si:decimalType"/>
469
+ <xs:element name="unit" type="si:unitType"/>
470
+ </xs:sequence>
471
+ <xs:sequence>
472
+ <!-- mandatory components of polar coordinate form -->
473
+ <xs:element name="valueMagnitude" type="si:decimalType"/>
474
+ <xs:element name="valuePhase" type="si:decimalType"/>
475
+ <xs:element name="unit" type="si:unitType"/>
476
+ <xs:element name="unitPhase" type="si:unitPhaseType"/>
477
+ </xs:sequence>
478
+ </xs:choice>
479
+ <!-- optional time stamp -->
480
+ <xs:element name="dateTime" type="xs:dateTime" minOccurs="0"/>
481
+
482
+ <!-- optional uncertainty statement: either ellipsoidal or rectangular coverage region -->
483
+ <xs:choice minOccurs="0">
484
+ <xs:annotation>
485
+ <xs:documentation xml:lang="en">
486
+ bivariate measurement uncertainty
487
+ </xs:documentation>
488
+ </xs:annotation>
489
+ <xs:element name="ellipsoidalRegion" type="si:ellipsoidalRegionType"/>
490
+ <xs:element name="rectangularRegion" type="si:rectangularRegionType"/>
491
+ </xs:choice>
492
+
493
+ </xs:sequence>
494
+ </xs:complexType>
495
+
496
+
497
+ <xs:complexType name="realInListType">
498
+ <xs:sequence>
499
+ <!-- optional local label and local quantity type-->
500
+ <xs:element name="label" type="xs:string" minOccurs="0"/>
501
+
502
+ <!-- mandatory information -->
503
+ <xs:element name="value" type="si:decimalType"/>
504
+ <!-- if list unit, then do not write this local unit -->
505
+ <xs:element name="unit" type="si:unitType" minOccurs="0"/>
506
+ <!-- optional local time stamp -->
507
+ <xs:element name="dateTime" type="xs:dateTime" minOccurs="0"/>
508
+ <!-- optional choice of local uncertainty statements -->
509
+ <xs:choice minOccurs="0">
510
+ <xs:annotation>
511
+ <xs:documentation xml:lang="en">
512
+ univariate measurement uncertainty
513
+ </xs:documentation>
514
+ </xs:annotation>
515
+ <xs:element name="expandedUnc" type="si:expandedUncType"/>
516
+ <xs:element name="coverageInterval" type="si:coverageIntervalType"/>
517
+ </xs:choice>
518
+ </xs:sequence>
519
+ </xs:complexType>
520
+
521
+
522
+ <xs:complexType name="complexInListType">
523
+ <xs:sequence>
524
+ <!-- optional local label and local quantity type-->
525
+ <xs:element name="label" type="xs:string" minOccurs="0"/>
526
+
527
+ <!-- choice of Cartesian coordinate form or polar coordinate form -->
528
+ <xs:choice>
529
+ <xs:sequence>
530
+ <!-- mandatory components of Cartesian coordinate form -->
531
+ <xs:element name="valueReal" type="si:decimalType"/>
532
+ <xs:element name="valueImag" type="si:decimalType"/>
533
+ <!-- if list unit, then do not write this local unit -->
534
+ <xs:element name="unit" type="si:unitType" minOccurs="0"/>
535
+ </xs:sequence>
536
+ <xs:sequence>
537
+ <!-- mandatory components of polar coordinate form -->
538
+ <xs:element name="valueMagnitude" type="si:decimalType"/>
539
+ <xs:element name="valuePhase" type="si:decimalType"/>
540
+ <!-- if list unit, then do not write this local unit -->
541
+ <xs:element name="unit" type="si:unitType" minOccurs="0"/>
542
+ <!-- if list unit, then do not write this local unit -->
543
+ <xs:element name="unitPhase" type="si:unitPhaseType" minOccurs="0"/>
544
+ </xs:sequence>
545
+ </xs:choice>
546
+ <!-- optional local time stamp -->
547
+ <xs:element name="dateTime" type="xs:dateTime" minOccurs="0"/>
548
+
549
+ <!-- optional local uncertainty statement: either ellipsoidal or rectangular coverage region -->
550
+ <xs:choice minOccurs="0">
551
+ <xs:annotation>
552
+ <xs:documentation xml:lang="en">
553
+ bivariate measurement uncertainty
554
+ </xs:documentation>
555
+ </xs:annotation>
556
+ <xs:element name="ellipsoidalRegion" type="si:ellipsoidalRegionType"/>
557
+ <xs:element name="rectangularRegion" type="si:rectangularRegionType"/>
558
+ </xs:choice>
559
+ </xs:sequence>
560
+ </xs:complexType>
561
+
562
+
563
+ <xs:complexType name="realListType">
564
+ <xs:sequence>
565
+ <!-- optional label of the list-->
566
+ <xs:element name="label" type="xs:string" minOccurs="0"/>
567
+ <!-- optional list time stamp -->
568
+ <xs:element name="dateTime" type="xs:dateTime" minOccurs="0"/>
569
+ <!-- optional list unit -->
570
+ <xs:element name="listUnit" type="si:unitType" minOccurs="0"/>
571
+ <!-- optional list uncertainty -->
572
+
573
+ <xs:element name="listUnivariateUnc" type="si:listUnivariateUncType" minOccurs="0">
574
+ <xs:annotation>
575
+ <xs:documentation xml:lang="en">
576
+ Definition of a structure, for a global univariate uncertainty, that
577
+ is used within the list structure with a list of real quantities.
578
+ The global univariate uncertainty can either be given as an expanded
579
+ measurement uncertainty or as a coverage interval.
580
+ </xs:documentation>
581
+ </xs:annotation>
582
+ </xs:element>
583
+
584
+ <!-- mandatory list of real elements -->
585
+ <xs:element name="real" type="si:realInListType" maxOccurs="unbounded">
586
+ <xs:annotation>
587
+ <xs:documentation xml:lang="en">
588
+ Meta data element definition for a real measurement quantity in list.
589
+ This implementation differs from the pure real quantity in the way that
590
+ the unit component is optional in order to allow a combination with
591
+ a global unit in the list of real quantities.
592
+ </xs:documentation>
593
+ </xs:annotation>
594
+ </xs:element>
595
+ <!-- optional multivariate uncertainty statement -->
596
+ <xs:choice minOccurs="0">
597
+ <xs:annotation>
598
+ <xs:documentation xml:lang="en">
599
+ multivariate measurement uncertainty
600
+ </xs:documentation>
601
+ </xs:annotation>
602
+ <xs:element name="ellipsoidalRegion" type="si:ellipsoidalRegionType"/>
603
+ <xs:element name="rectangularRegion" type="si:rectangularRegionType"/>
604
+ </xs:choice>
605
+ </xs:sequence>
606
+ </xs:complexType>
607
+
608
+
609
+ <xs:complexType name="realListXMLListType">
610
+ <xs:sequence>
611
+ <!-- optional label and quantity type-->
612
+ <xs:element name="labelXMLList" type="si:stringXMLListType" minOccurs="0"/>
613
+
614
+ <!-- mandatory information -->
615
+ <xs:element name="valueXMLList" type="si:decimalXMLListType"/>
616
+ <xs:element name="unitXMLList" type="si:unitXMLListType"/>
617
+
618
+ <!-- optional time stamp -->
619
+ <xs:element name="dateTimeXMLList" type="si:dateTimeXMLListType" minOccurs="0"/>
620
+
621
+ <!-- optional choice of uncertainty statements -->
622
+ <xs:choice minOccurs="0">
623
+ <xs:annotation>
624
+ <xs:documentation xml:lang="en">
625
+ univariate measurement uncertainty
626
+ </xs:documentation>
627
+ </xs:annotation>
628
+ <xs:element name="expandedUncXMLList" type="si:expandedUncXMLListType"/>
629
+ <xs:element name="coverageIntervalXMLList" type="si:coverageIntervalXMLListType"/>
630
+ </xs:choice>
631
+
632
+ <xs:choice minOccurs="0">
633
+ <xs:annotation>
634
+ <xs:documentation xml:lang="en">
635
+ multivariate measurement uncertainty
636
+ </xs:documentation>
637
+ </xs:annotation>
638
+ <xs:element name="ellipsoidalRegionXMLList" type="si:ellipsoidalRegionType"/>
639
+ <xs:element name="rectangularRegionXMLList" type="si:rectangularRegionType"/>
640
+ </xs:choice>
641
+ </xs:sequence>
642
+ </xs:complexType>
643
+
644
+
645
+ <xs:complexType name="complexListType">
646
+ <xs:sequence>
647
+ <!-- optional label of the list -->
648
+ <xs:element name="label" type="xs:string" minOccurs="0"/>
649
+ <!-- optional list time stamp -->
650
+ <xs:element name="dateTime" type="xs:dateTime" minOccurs="0"/>
651
+ <!-- optional list unit -->
652
+ <xs:element name="listUnit" type="si:unitType" minOccurs="0"/>
653
+ <xs:element name="listUnitPhase" type="xs:string" minOccurs="0"/>
654
+ <!-- optional list bivariate uncertainty -->
655
+
656
+ <xs:element name="listBivariateUnc" type="si:listBivariateUncType" minOccurs="0">
657
+ <xs:annotation>
658
+ <xs:documentation xml:lang="en">
659
+ Definition of a structure, for a global bivariate uncertainty, that
660
+ is used within the list structure with a list of complex quantities.
661
+ The global bivariate uncertainty can either be given as a hyper-ellipsoidal
662
+ coverage region or a hyper-rectangular coverage region. Both
663
+ coverage regions must provide a covariance matrix of dimension 2.
664
+ </xs:documentation>
665
+ </xs:annotation>
666
+ </xs:element>
667
+ <!-- mandatory list of complex elements -->
668
+ <xs:element name="complex" type="si:complexInListType" maxOccurs="unbounded">
669
+ <xs:annotation>
670
+ <xs:documentation xml:lang="en">
671
+ Meta data element definition for a complex measurement quantity in list.
672
+ This implementation differs from the pure complex quantity, in the way that
673
+ the unit components are optional in order to allow a combination with
674
+ a global unit in the list of complex quantities.
675
+ </xs:documentation>
676
+ </xs:annotation>
677
+ </xs:element>
678
+ <!-- optional multivariate uncertainty statement -->
679
+ <xs:choice minOccurs="0">
680
+ <xs:annotation>
681
+ <xs:documentation xml:lang="en">
682
+ multivariate measurement uncertainty
683
+ </xs:documentation>
684
+ </xs:annotation>
685
+ <xs:element name="ellipsoidalRegion" type="si:ellipsoidalRegionType"/>
686
+ <xs:element name="rectangularRegion" type="si:rectangularRegionType"/>
687
+ </xs:choice>
688
+ </xs:sequence>
689
+ </xs:complexType>
690
+
691
+
692
+ <xs:complexType name="listType">
693
+ <xs:sequence>
694
+ <!-- optional label of the list -->
695
+ <xs:element name="label" type="xs:string" minOccurs="0"/>
696
+ <!-- optional list time stamp -->
697
+ <xs:element name="dateTime" type="xs:dateTime" minOccurs="0"/>
698
+
699
+ <!-- selection between list of lists and list of real or complex -->
700
+ <xs:choice maxOccurs="unbounded">
701
+ <!-- either list of real -->
702
+ <xs:element name="realList" type="si:realListType"/>
703
+ <!-- or list of complex -->
704
+ <xs:element name="complexList" type="si:complexListType"/>
705
+ <!-- or list of lists -->
706
+ <xs:element name="list" type="si:listType"/>
707
+ </xs:choice>
708
+ </xs:sequence>
709
+ </xs:complexType>
710
+
711
+
712
+ <xs:complexType name="hybridType">
713
+ <xs:sequence>
714
+ <!-- mandatory adapter for at least one SI quantity and additional (non-) SI quantities -->
715
+ <xs:choice>
716
+ <xs:element name="real" type="si:realQuantityType" minOccurs="1" maxOccurs="unbounded"/>
717
+ <xs:element name="complex" type="si:complexQuantityType" minOccurs="1" maxOccurs="unbounded"/>
718
+ <xs:element name="list" type="si:listType" minOccurs="1" maxOccurs="unbounded"/>
719
+ <xs:element name="realList" type="si:realListType" minOccurs="1" maxOccurs="unbounded"/>
720
+ <xs:element name="realListXMLList" type="si:realListXMLListType" minOccurs="1" maxOccurs="unbounded"/>
721
+ <xs:element name="complexList" type="si:complexListType" minOccurs="1" maxOccurs="unbounded"/>
722
+ <xs:element name="constant" type="si:constantQuantityType" minOccurs="1" maxOccurs="unbounded"/>
723
+ </xs:choice>
724
+ </xs:sequence>
725
+ </xs:complexType>
726
+
727
+
728
+ <xs:complexType name="expandedUncType">
729
+ <xs:sequence>
730
+ <xs:element name="uncertainty" type="si:uncertaintyValueType"/>
731
+ <xs:element name="coverageFactor" type="si:kValueType"/>
732
+ <xs:element name="coverageProbability" type="si:probabilityValueType"/>
733
+ <xs:element name="distribution" type="xs:string" minOccurs="0"/>
734
+ </xs:sequence>
735
+ </xs:complexType>
736
+
737
+
738
+ <xs:complexType name="expandedUncXMLListType">
739
+ <xs:sequence>
740
+ <xs:element name="uncertaintyXMLList" type="si:uncertaintyValueXMLListType"/>
741
+ <xs:element name="coverageFactorXMLList" type="si:kValueXMLListType"/>
742
+ <xs:element name="coverageProbabilityXMLList" type="si:probabilityValueXMLListType"/>
743
+ <xs:element name="distributionXMLList" type="si:stringXMLListType" minOccurs="0"/>
744
+ </xs:sequence>
745
+ </xs:complexType>
746
+
747
+
748
+ <xs:complexType name="coverageIntervalType">
749
+ <xs:sequence>
750
+ <xs:element name="standardUnc" type="si:uncertaintyValueType"/>
751
+ <xs:element name="intervalMin" type="si:decimalType"/>
752
+ <xs:element name="intervalMax" type="si:decimalType"/>
753
+ <xs:element name="coverageProbability" type="si:probabilityValueType"/>
754
+ <xs:element name="distribution" type="xs:string" minOccurs="0"/>
755
+ </xs:sequence>
756
+ </xs:complexType>
757
+
758
+
759
+ <xs:complexType name="coverageIntervalXMLListType">
760
+ <xs:sequence>
761
+ <xs:element name="standardUncXMLList" type="si:uncertaintyValueXMLListType"/>
762
+ <xs:element name="intervalMinXMLList" type="si:decimalXMLListType"/>
763
+ <xs:element name="intervalMaxXMLList" type="si:decimalXMLListType"/>
764
+ <xs:element name="coverageProbabilityXMLList" type="si:probabilityValueXMLListType"/>
765
+ <xs:element name="distributionXMLList" type="si:stringXMLListType" minOccurs="0"/>
766
+ </xs:sequence>
767
+ </xs:complexType>
768
+
769
+
770
+ <xs:complexType name="covarianceMatrixType">
771
+ <xs:sequence>
772
+ <xs:element name="column" minOccurs="1" maxOccurs="unbounded">
773
+ <xs:annotation>
774
+ <xs:documentation xml:lang="en">
775
+ Definition of a column in the covariance matrix.
776
+ </xs:documentation>
777
+ <xs:documentation xml:lang="en">
778
+ <![CDATA[
779
+ The column has n covariance elements, where
780
+ n is the amount of columns in the covariance matrix.
781
+
782
+ The covariance elements are ordered as in the covariance matrix, started
783
+ at the element in the first row of the matrix and going to the
784
+ last row of the matrix.
785
+ ]]>
786
+ </xs:documentation>
787
+ </xs:annotation>
788
+ <xs:complexType>
789
+ <xs:sequence>
790
+ <xs:element name="covariance" minOccurs="1" maxOccurs="unbounded">
791
+ <xs:annotation>
792
+ <xs:documentation xml:lang="en">
793
+ Each covariance component is defined by
794
+ - element value (decimal value type)
795
+ - element unit (string - SI format)
796
+ </xs:documentation>
797
+ </xs:annotation>
798
+ <xs:complexType>
799
+ <xs:sequence>
800
+ <xs:element name="value" type="si:decimalType"/>
801
+ <xs:element name="unit" type="si:unitType"/>
802
+ </xs:sequence>
803
+ </xs:complexType>
804
+ </xs:element>
805
+ </xs:sequence>
806
+ </xs:complexType>
807
+ </xs:element>
808
+ </xs:sequence>
809
+ </xs:complexType>
810
+
811
+
812
+ <xs:complexType name="ellipsoidalRegionType">
813
+ <xs:sequence>
814
+ <!-- covariance matrix data -->
815
+ <xs:element name="covarianceMatrix" type="si:covarianceMatrixType"/>
816
+ <!-- coverage properties of region -->
817
+ <xs:element name="coverageFactor" type="si:kValueType"/>
818
+ <xs:element name="coverageProbability" type="si:probabilityValueType"/>
819
+ <!-- optional information about distribution -->
820
+ <xs:element name="distribution" type="xs:string" minOccurs="0"/>
821
+ </xs:sequence>
822
+ </xs:complexType>
823
+
824
+
825
+ <xs:complexType name="rectangularRegionType">
826
+ <xs:sequence>
827
+ <!-- covariance matrix data -->
828
+ <xs:element name="covarianceMatrix" type="si:covarianceMatrixType"/>
829
+ <!-- coverage properties of region -->
830
+ <xs:element name="coverageFactor" type="si:kValueType"/>
831
+ <xs:element name="coverageProbability" type="si:probabilityValueType"/>
832
+ <!-- optional information about distribution -->
833
+ <xs:element name="distribution" type="xs:string" minOccurs="0"/>
834
+ </xs:sequence>
835
+ </xs:complexType>
836
+
837
+
838
+ <xs:complexType name="listUnivariateUncType">
839
+ <xs:choice>
840
+ <xs:annotation>
841
+ <xs:documentation xml:lang="en">
842
+ univariate measurement uncertainty
843
+ </xs:documentation>
844
+ </xs:annotation>
845
+ <xs:element name="expandedUnc" type="si:expandedUncType"/>
846
+ <xs:element name="coverageInterval" type="si:coverageIntervalType"/>
847
+ </xs:choice>
848
+ </xs:complexType>
849
+
850
+ <xs:complexType name="listBivariateUncType">
851
+ <xs:choice minOccurs="0">
852
+ <xs:annotation>
853
+ <xs:documentation xml:lang="en">
854
+ bivariate measurement uncertainty
855
+ </xs:documentation>
856
+ </xs:annotation>
857
+ <xs:element name="ellipsoidalRegion" type="si:ellipsoidalRegionType"/>
858
+ <xs:element name="rectangularRegion" type="si:rectangularRegionType"/>
859
+ </xs:choice>
860
+ </xs:complexType>
861
+
862
+
863
+
864
+
865
+
866
+
867
+
868
+ <!-- ############## D-SI XML INTERNALLY USED SIMPLE TYPE DEFINITIONS #################### -->
869
+
870
+ <xs:simpleType name="unitType">
871
+ <xs:annotation>
872
+ <xs:documentation xml:lang="en">
873
+ BIPM SI brochure unit (9th edition).
874
+ Based on xs:string.
875
+ </xs:documentation>
876
+ </xs:annotation>
877
+ <xs:restriction base="xs:string">
878
+ </xs:restriction>
879
+ </xs:simpleType>
880
+
881
+
882
+ <xs:simpleType name="unitPhaseType">
883
+ <xs:annotation>
884
+ <xs:documentation xml:lang="en">
885
+ Unit of angular quantity in SI.
886
+ Based on xs:string.
887
+ </xs:documentation>
888
+ </xs:annotation>
889
+ <xs:restriction base="xs:string">
890
+ </xs:restriction>
891
+ </xs:simpleType>
892
+
893
+
894
+ <xs:simpleType name="decimalType">
895
+ <xs:annotation>
896
+ <xs:documentation xml:lang="en">
897
+ Scientific decimal format for numerical values.
898
+ Based on type xs:double.
899
+ </xs:documentation>
900
+ </xs:annotation>
901
+ <xs:restriction base="xs:double">
902
+ <xs:pattern value="[-+]?((\d*\.\d+)|(\d+\.\d*)|(\d+\.?))([Ee][-+]?\d+)?"/>
903
+ </xs:restriction>
904
+ </xs:simpleType>
905
+
906
+
907
+ <xs:simpleType name="uncertaintyValueType">
908
+ <xs:annotation>
909
+ <xs:documentation xml:lang="en">
910
+ Scientific decimal format for numerical values of uncertainties
911
+ that must be positive (greater than zero or equal to zero).
912
+ Based on type xs:double.
913
+ </xs:documentation>
914
+ </xs:annotation>
915
+
916
+ <xs:restriction base="xs:double">
917
+ <xs:pattern value="\+?((\d*\.\d+)|(\d+\.\d*)|(\d+\.?))([Ee][-+]?\d+)?"/>
918
+ </xs:restriction>
919
+ </xs:simpleType>
920
+
921
+ <xs:simpleType name="kValueType">
922
+ <xs:annotation>
923
+ <xs:documentation xml:lang="en">
924
+ Scientific decimal format for coverage factor values for uncertainties
925
+ that must be greater than one or equal to one.
926
+ Based on type xs:double.
927
+ </xs:documentation>
928
+ </xs:annotation>
929
+ <xs:restriction base="xs:double">
930
+ <xs:pattern value="\+?(([1-9]\d*\.\d*)|([1-9]\d*))"/>
931
+ </xs:restriction>
932
+ </xs:simpleType>
933
+
934
+
935
+ <xs:simpleType name="probabilityValueType">
936
+ <xs:annotation>
937
+ <xs:documentation xml:lang="en">
938
+ Decimal format for coverage probability values for uncertainties.
939
+ The value must be within the interval [0,1]. The scientific exponent
940
+ "e" (or "E") is not allowed.
941
+ Based on type xs:double.
942
+ </xs:documentation>
943
+ </xs:annotation>
944
+ <xs:restriction base="xs:double">
945
+ <xs:pattern value="\+?((0(\.\d*)?)|(1(\.0*)?))"/>
946
+ </xs:restriction>
947
+ </xs:simpleType>
948
+
949
+
950
+ <!-- ############## D-SI XML-Lists for D-SI SimpleTypes #################### -->
951
+ <xs:simpleType name="unitXMLListType">
952
+ <xs:annotation>
953
+ <xs:documentation xml:lang="en">
954
+ Type providing listing of units (si:unitType)
955
+ with separation by blank spaces.
956
+ </xs:documentation>
957
+ </xs:annotation>
958
+ <xs:list itemType="si:unitType" />
959
+ </xs:simpleType>
960
+
961
+ <xs:simpleType name="unitPhaseXMLListType">
962
+ <xs:annotation>
963
+ <xs:documentation xml:lang="en">
964
+ Type providing listing of phase angle units (si:unitPhase Type)
965
+ with separation by blank spaces.
966
+ </xs:documentation>
967
+ </xs:annotation>
968
+ <xs:list itemType="si:unitPhaseType" />
969
+ </xs:simpleType>
970
+
971
+ <xs:simpleType name="decimalXMLListType">
972
+ <xs:annotation>
973
+ <xs:documentation xml:lang="en">
974
+ Type providing listing of values (si:decimalType)
975
+ with separation by blank spaces.
976
+ </xs:documentation>
977
+ </xs:annotation>
978
+ <xs:list itemType="si:decimalType" />
979
+ </xs:simpleType>
980
+
981
+ <xs:simpleType name="uncertaintyValueXMLListType">
982
+ <xs:annotation>
983
+ <xs:documentation xml:lang="en">
984
+ Type providing listing of uncertainty values (si:uncertaintyValueType)
985
+ with separation by blank spaces.
986
+ </xs:documentation>
987
+ </xs:annotation>
988
+ <xs:list itemType="si:uncertaintyValueType"/>
989
+ </xs:simpleType>
990
+
991
+ <xs:simpleType name="kValueXMLListType">
992
+ <xs:annotation>
993
+ <xs:documentation xml:lang="en">
994
+ Type providing listing of coverage factor values (si:kValueType)
995
+ with separation by blank spaces.
996
+ </xs:documentation>
997
+ </xs:annotation>
998
+ <xs:list itemType="si:kValueType" />
999
+ </xs:simpleType>
1000
+
1001
+ <xs:simpleType name="probabilityValueXMLListType">
1002
+ <xs:annotation>
1003
+ <xs:documentation xml:lang="en">
1004
+ Type providing listing of coverage probability values (si:probabilityValueType)
1005
+ with separation by blank spaces.
1006
+ </xs:documentation>
1007
+ </xs:annotation>
1008
+ <xs:list itemType="si:probabilityValueType" />
1009
+ </xs:simpleType>
1010
+
1011
+ <xs:simpleType name="dateTimeXMLListType">
1012
+ <xs:annotation>
1013
+ <xs:documentation xml:lang="en">
1014
+ Type providing listing of time values (xs:dateTime)
1015
+ with separation by blank spaces.
1016
+ </xs:documentation>
1017
+ </xs:annotation>
1018
+ <xs:list itemType="xs:dateTime" />
1019
+ </xs:simpleType>
1020
+
1021
+ <xs:simpleType name="stringXMLListType">
1022
+ <xs:annotation>
1023
+ <xs:documentation xml:lang="en">
1024
+ Type providing listing of strings (xs:string)
1025
+ with separation by blank spaces.
1026
+ </xs:documentation>
1027
+ </xs:annotation>
1028
+ <xs:list itemType="xs:string" />
1029
+ </xs:simpleType>
1030
+
1031
+ </xs:schema>