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,730 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <xs:schema version="2.2.0" xmlns:xs="http://www.w3.org/2001/XMLSchema"
3
+ xmlns:dcc="https://ptb.de/dcc"
4
+ xmlns:si="https://ptb.de/si"
5
+ targetNamespace="https://ptb.de/dcc"
6
+ elementFormDefault="qualified">
7
+
8
+ <xs:import
9
+ namespace="https://ptb.de/si"
10
+ schemaLocation="../dsi/v1.3.0.xsd" />
11
+
12
+ <xs:annotation>
13
+ <xs:documentation>
14
+ Copyright (c) 2019 - Physikalisch-Technische Bundesanstalt, alle Rechte vorbehalten - all rights reserved
15
+
16
+ Diese Software wurde in der Physikalisch-Technischen Bundesanstalt entwickelt. Die Software wird unentgeltlich, wie sie ist, auf eigenes Risiko des Nutzers zur Verfügung gestellt. Die PTB übernimmt keine Haftung, egal aus welchem Rechtsgrund, für die Nutzung der Software durch Andere und garantiert weder ausdrücklich noch konkludent für die Qualität, Sicherheit, Zuverlässigkeit, Tauglichkeit, oder andere Merkmale der Software. Soweit gesetzlich zulässig lehnt die PTB jede Haftung für direkte Schäden, indirekte Schäden oder für Folgeschäden ab, die durch die Nutzung der Software entstehen.
17
+
18
+ This software was developed at the Physikalisch-Technische Bundesanstalt (PTB). The software is made available “as is“ free of cost at your own risk. PTB assumes no responsibility whatsoever for its use by other parties, and makes no guarantees, expressed or implied, about its quality, reliability, safety, suitability or any other characteristic. As far as legally permitted PTB refuses any liability for any direct, indirect or consequential damage arising in connection with the use of this software.
19
+ </xs:documentation>
20
+ </xs:annotation>
21
+
22
+ <xs:element name="digitalCalibrationCertificate">
23
+
24
+ <xs:complexType>
25
+ <xs:sequence>
26
+ <xs:element name="administrativeData">
27
+ <xs:complexType>
28
+ <xs:all>
29
+ <xs:element name="dccSoftware" type="dcc:softwareParameter"/>
30
+ <xs:element name="coreData" type="dcc:coreDataParameter"/>
31
+ <xs:element name="items" type="dcc:itemParameter"/>
32
+ <xs:element name="calibrationLaboratory" type="dcc:calibrationLaboratoryParameter"/>
33
+ <xs:element name="respPersons" type="dcc:respPersonParameter"/>
34
+ <xs:element name="customer" type="dcc:contact"/>
35
+ <xs:element name="statements" type="dcc:statementParameter" minOccurs="0"/>
36
+ </xs:all>
37
+ </xs:complexType>
38
+ </xs:element>
39
+
40
+ <xs:element name="measurementResults">
41
+ <xs:complexType>
42
+ <xs:sequence>
43
+ <!--
44
+ For this elements is community input needed.
45
+ Talk to us: gemimeg@ptb.de
46
+
47
+ <xs:element name="samplingDate" type="xs:date" minOccurs="0"/>
48
+ <xs:element name="sampledMaterials" type="dcc:sampledMaterialParameter" minOccurs="0"/>
49
+
50
+ <xs:element name="externals" type="dcc:externalParameter" minOccurs="0"/>
51
+
52
+ <xs:element name="metrologicallyTraceable" type="dcc:metrologicallyTraceableParameter" minOccurs="0"/>
53
+
54
+
55
+ <xs:element name="calibrationLocations" type="dcc:calibrationLocationParameter" maxOccurs="unbounded"/>
56
+
57
+ -->
58
+
59
+ <xs:element name="measurementResult" maxOccurs="unbounded">
60
+ <xs:complexType>
61
+ <xs:sequence>
62
+ <xs:element name="usedMethods" type="dcc:usedMethodParameter" minOccurs="0"/>
63
+ <xs:element name="usedSoftware" type="dcc:softwareParameter" minOccurs="0"/>
64
+ <xs:element name="measuringEquipments" type="dcc:measuringEquipmentParameter" minOccurs="0"/>
65
+ <xs:element name="influenceConditions" type="dcc:influenceConditionParameter"/>
66
+ <xs:element name="results" type="dcc:resultParameter"/>
67
+ </xs:sequence>
68
+ </xs:complexType>
69
+ </xs:element>
70
+
71
+ </xs:sequence>
72
+ </xs:complexType>
73
+ </xs:element>
74
+
75
+ <xs:element name="comments" type="xs:string" minOccurs="0"/>
76
+
77
+ <xs:element name="document" type="dcc:byteDataBlock" minOccurs="0"/>
78
+
79
+ </xs:sequence>
80
+ </xs:complexType>
81
+ </xs:element>
82
+
83
+ <!-- #####################################################################################
84
+ Elements of the administrativeData part of the DCC
85
+ #####################################################################################-->
86
+
87
+ <xs:complexType name="softwareParameter">
88
+ <xs:annotation>
89
+ <xs:documentation>
90
+ Clear description of the software-version and the creator of the software used to create and process the
91
+ DCC
92
+ </xs:documentation>
93
+ </xs:annotation>
94
+ <xs:sequence>
95
+ <xs:element name="software" maxOccurs="unbounded">
96
+ <xs:complexType>
97
+ <xs:sequence>
98
+ <xs:element name="name" type="dcc:textBlock"/>
99
+ <xs:element name="release" type="xs:string"/>
100
+ <xs:element name="description" type="dcc:textBlock" minOccurs="0" maxOccurs="unbounded"/>
101
+ </xs:sequence>
102
+ <xs:attribute name="id" type="xs:ID" use="optional"/>
103
+ </xs:complexType>
104
+ </xs:element>
105
+ </xs:sequence>
106
+ </xs:complexType>
107
+
108
+
109
+ <xs:complexType name="measuringEquipmentParameter">
110
+ <xs:annotation>
111
+ <xs:documentation>
112
+ Informations about the instruments used
113
+ </xs:documentation>
114
+ </xs:annotation>
115
+ <xs:sequence>
116
+ <xs:element name="measuringEquipment" maxOccurs="unbounded">
117
+ <xs:complexType>
118
+ <xs:sequence>
119
+ <xs:element name="name" type="dcc:textBlock" />
120
+ <!-- <xs:element name="equipmentClass" type="dcc:equipmentClassParameter" minOccurs="0" /> -->
121
+ <xs:element name="description" type="dcc:textBlock" maxOccurs="unbounded"/>
122
+ <xs:element name="descriptionData" type="dcc:byteDataBlock" minOccurs="0" maxOccurs="unbounded"/>
123
+ <xs:element name="certificate" type="dcc:hash" minOccurs="0"/>
124
+ <xs:element name="manufacturer" type="dcc:contactNotStrict" minOccurs="0"/>
125
+ <xs:element name="model" type="xs:string" minOccurs="0"/>
126
+ <xs:element name="identifications" type="dcc:identificationsParameter" minOccurs="0" />
127
+ </xs:sequence>
128
+ <xs:attribute name="id" type="xs:ID" use="optional"/>
129
+ </xs:complexType>
130
+ </xs:element>
131
+ </xs:sequence>
132
+ </xs:complexType>
133
+
134
+ <xs:complexType name="coreDataParameter">
135
+ <xs:annotation>
136
+ <xs:documentation>
137
+ Basic parameters of the Digital Calibration Certificate (DCC)
138
+ </xs:documentation>
139
+ </xs:annotation>
140
+ <xs:sequence>
141
+ <xs:element name="countryCodeISO3166_1" type="dcc:elementStringISO3166"/>
142
+ <xs:element name="usedLangCodeISO639_1" type="dcc:elementStringISO639" maxOccurs="unbounded"/>
143
+ <xs:element name="mandatoryLangCodeISO639_1" type="dcc:elementStringISO639" maxOccurs="unbounded"/>
144
+ <xs:element name="uniqueIdentifier" type="xs:string"/>
145
+ <xs:element name="receiptDate" type="xs:date" minOccurs="0"/>
146
+ <xs:element name="beginPerformanceDate" type="xs:date"/>
147
+ <xs:element name="endPerformanceDate" type="xs:date"/>
148
+ <xs:element name="previousReport" type="dcc:hash" minOccurs="0"/>
149
+ </xs:sequence>
150
+ </xs:complexType>
151
+
152
+ <!--
153
+ This is a preview for equipmentClass.
154
+ See the discussion at https://gitlab1.ptb.de/d-ptb/dcc/xsd-dcc/issues/59
155
+
156
+ <xs:complexType name="equipmentClassParameter">
157
+ <xs:annotation>
158
+ <xs:documentation>
159
+ Clear name(s) of the item(s) and identifier(s)
160
+ </xs:documentation>
161
+ </xs:annotation>
162
+ <xs:sequence>
163
+ <xs:element name="reference" type="xs:string"/>
164
+ <xs:element name="classID" type="xs:string" maxOccurs="unbounded"/>
165
+ </xs:sequence>
166
+ <xs:attribute name="id" type="xs:ID" use="optional"/>
167
+ </xs:complexType>
168
+ -->
169
+
170
+ <xs:complexType name="itemParameter">
171
+ <xs:annotation>
172
+ <xs:documentation>
173
+ Clear description of the calibration items
174
+ </xs:documentation>
175
+ </xs:annotation>
176
+ <xs:sequence>
177
+ <xs:element name="name" type="dcc:textBlock" minOccurs="0"/>
178
+ <!--<xs:element name="equipmentClass" type="dcc:equipmentClassParameter" minOccurs="0" />-->
179
+ <xs:element name="description" type="dcc:textBlock" minOccurs="0"/>
180
+ <xs:element name="owner" type="dcc:contact" minOccurs="0"/>
181
+
182
+ <xs:element name="item" maxOccurs="unbounded">
183
+ <xs:complexType>
184
+ <xs:sequence>
185
+ <xs:element name="name" type="dcc:textBlock" />
186
+ <!--<xs:element name="equipmentClass" type="dcc:equipmentClassParameter" minOccurs="0" />-->
187
+ <xs:element name="description" type="dcc:textBlock" maxOccurs="unbounded"/>
188
+ <xs:element name="descriptionData" type="dcc:byteDataBlock" minOccurs="0" maxOccurs="unbounded"/>
189
+
190
+ <xs:element name="manufacturer" type="dcc:contactNotStrict"/>
191
+ <xs:element name="model" type="xs:string" minOccurs="0"/>
192
+
193
+ <xs:element name="identifications" type="dcc:identificationsParameter" />
194
+ </xs:sequence>
195
+ <xs:attribute name="id" type="xs:ID" use="optional"/>
196
+ </xs:complexType>
197
+ </xs:element>
198
+ </xs:sequence>
199
+ </xs:complexType>
200
+
201
+ <xs:complexType name="identificationsParameter">
202
+ <xs:sequence>
203
+ <xs:element name="identification" maxOccurs="unbounded">
204
+ <xs:complexType>
205
+ <xs:sequence>
206
+ <xs:element name="issuer">
207
+ <xs:simpleType>
208
+ <xs:restriction base="xs:string">
209
+ <xs:enumeration value="manufacturer"/>
210
+ <xs:enumeration value="calibrationLaboratory"/>
211
+ <xs:enumeration value="customer"/>
212
+ <xs:enumeration value="owner"/>
213
+ <xs:enumeration value="other"/>
214
+ </xs:restriction>
215
+ </xs:simpleType>
216
+ </xs:element>
217
+ <xs:element name="value" type="xs:string"/>
218
+ <xs:element name="description" type="dcc:textBlock" minOccurs="0"/>
219
+ </xs:sequence>
220
+ <xs:attribute name="id" type="xs:ID" use="optional"/>
221
+ </xs:complexType>
222
+ </xs:element>
223
+ </xs:sequence>
224
+ </xs:complexType>
225
+
226
+ <xs:complexType name="calibrationLaboratoryParameter">
227
+ <xs:annotation>
228
+ <xs:documentation>
229
+ Informations about the calibration laboratory
230
+ </xs:documentation>
231
+ </xs:annotation>
232
+ <xs:sequence>
233
+ <xs:element name="calibrationLaboratoryCode" type="xs:string" minOccurs="0"/>
234
+ <xs:element name="contact" type="dcc:contact" maxOccurs="unbounded"/>
235
+ </xs:sequence>
236
+ </xs:complexType>
237
+
238
+ <xs:complexType name="respPersonParameter">
239
+ <xs:annotation>
240
+ <xs:documentation>
241
+ List of responsible persons for the DCC
242
+ </xs:documentation>
243
+ </xs:annotation>
244
+ <xs:sequence>
245
+ <xs:element name="respPerson" maxOccurs="unbounded">
246
+ <xs:complexType>
247
+ <xs:sequence>
248
+ <xs:element name="person" type="dcc:contactNotStrict"/>
249
+ <xs:element name="description" type="dcc:textBlock" minOccurs="0"/>
250
+ <xs:element name="mainSigner" type="xs:boolean" minOccurs="0"/>
251
+ <xs:element name="cryptElectronicSeal" type="xs:boolean" minOccurs="0"/>
252
+ <xs:element name="cryptElectronicSignature" type="xs:boolean" minOccurs="0"/>
253
+ <xs:element name="cryptElectronicTimeStamp" type="xs:boolean" minOccurs="0"/>
254
+ </xs:sequence>
255
+ <xs:attribute name="id" type="xs:ID" use="optional"/>
256
+ </xs:complexType>
257
+ </xs:element>
258
+ </xs:sequence>
259
+ </xs:complexType>
260
+
261
+ <xs:complexType name="statementParameter">
262
+ <xs:annotation>
263
+ <xs:documentation>
264
+ Elements for the statements
265
+ </xs:documentation>
266
+ </xs:annotation>
267
+ <xs:sequence>
268
+ <xs:element name="statement" type="dcc:statementMetaDataParameter" maxOccurs="unbounded"/>
269
+ </xs:sequence>
270
+ </xs:complexType>
271
+
272
+ <!-- #####################################################################################
273
+ Elements of the measurementResult part of the DCC
274
+ ##################################################################################### -->
275
+
276
+ <!-- We need community input about the following:
277
+ Talk to us: gemimeg@ptb.de
278
+
279
+ <xs:complexType name="externalParameter">
280
+ <xs:annotation>
281
+ <xs:documentation>
282
+ Information about the external partners
283
+
284
+ Community input needed! Talk to us: gemimeg@ptb.de
285
+ </xs:documentation>
286
+ </xs:annotation>
287
+ <xs:sequence>
288
+ <xs:element name="external" type="dcc:contact" maxOccurs="unbounded"/>
289
+ </xs:sequence>
290
+ </xs:complexType>
291
+
292
+ <xs:complexType name="sampledMaterialParameter">
293
+ <xs:annotation>
294
+ <xs:documentation>
295
+ Information about the sampled material
296
+
297
+ Community input needed! Talk to us: gemimeg@ptb.de
298
+ </xs:documentation>
299
+ </xs:annotation>
300
+ <xs:sequence>
301
+ <xs:element name="sampledMaterial" maxOccurs="unbounded">
302
+ <xs:complexType>
303
+ <xs:sequence>
304
+ <xs:element name="plan" type="dcc:textBlock"/>
305
+ <xs:element name="method" type="dcc:textBlock"/>
306
+ <xs:element name="descriptionData" type="dcc:byteDataBlock" minOccurs="0" maxOccurs="unbounded"/>
307
+ <xs:element name="externalSampler" type="dcc:contact" minOccurs="0" maxOccurs="unbounded"/>
308
+ </xs:sequence>
309
+ <xs:attribute name="id" type="xs:ID" use="optional"/>
310
+ </xs:complexType>
311
+ </xs:element>
312
+ </xs:sequence>
313
+ </xs:complexType>
314
+
315
+ <xs:complexType name="metrologicallyTraceableParameter">
316
+ <xs:annotation>
317
+ <xs:documentation>
318
+ Elements for metrologically traceable measurements
319
+
320
+ Community input needed! Talk to us: gemimeg@ptb.de
321
+
322
+ </xs:documentation>
323
+ </xs:annotation>
324
+ <xs:sequence>
325
+ <xs:element name="name" type="dcc:textBlock" />
326
+ <xs:element name="description" type="dcc:textBlock" />
327
+ <xs:element name="identifier" type="dcc:hash" />
328
+ </xs:sequence>
329
+ </xs:complexType>
330
+
331
+ -->
332
+
333
+ <xs:complexType name="usedMethodParameter">
334
+ <xs:annotation>
335
+ <xs:documentation>
336
+ Clear description of the used method
337
+ </xs:documentation>
338
+ </xs:annotation>
339
+ <xs:sequence>
340
+ <xs:element name="usedMethod" maxOccurs="unbounded">
341
+ <xs:complexType>
342
+ <xs:sequence>
343
+ <xs:element name="name" type="dcc:textBlock"/>
344
+ <xs:element name="description" type="dcc:textBlock" maxOccurs="unbounded"/>
345
+ <xs:element name="norm" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
346
+ </xs:sequence>
347
+ <xs:attribute name="id" type="xs:ID" use="optional"/>
348
+ </xs:complexType>
349
+ </xs:element>
350
+ </xs:sequence>
351
+ </xs:complexType>
352
+
353
+ <xs:complexType name="influenceConditionParameter">
354
+ <xs:annotation>
355
+ <xs:documentation>
356
+ Elements for the conditions (e.g. environmental) under which the calibrations were
357
+ made that have an influence on the measurement results
358
+ </xs:documentation>
359
+ </xs:annotation>
360
+ <xs:sequence>
361
+ <xs:element name="influenceCondition" type="dcc:conditionBlock" maxOccurs="unbounded"/>
362
+ </xs:sequence>
363
+ </xs:complexType>
364
+
365
+ <xs:complexType name="calibrationLocationParameter">
366
+ <xs:annotation>
367
+ <xs:documentation>
368
+ Locations, where the calibration was done
369
+ </xs:documentation>
370
+ </xs:annotation>
371
+ <xs:sequence>
372
+ <xs:element name="calibrationLocation" maxOccurs="unbounded">
373
+ <xs:complexType>
374
+ <xs:sequence>
375
+ <xs:element name="calibrationLocationSite" type="dcc:textBlock"/>
376
+ <xs:element name="beginLocationCalDateTime" type="xs:dateTime" minOccurs="0"/>
377
+ <xs:element name="endLocationCalDateTime" type="xs:dateTime" minOccurs="0"/>
378
+ <xs:element name="location" type="dcc:location" minOccurs="0"/>
379
+ </xs:sequence>
380
+ <xs:attribute name="id" type="xs:ID" use="optional"/>
381
+ </xs:complexType>
382
+ </xs:element>
383
+ </xs:sequence>
384
+
385
+ </xs:complexType>
386
+
387
+ <xs:complexType name="conditionBlock">
388
+ <xs:annotation>
389
+ <xs:documentation>
390
+ All necessary information for one part of a measurement
391
+ </xs:documentation>
392
+ </xs:annotation>
393
+ <xs:sequence>
394
+ <xs:element name="name" type="dcc:textBlock"/>
395
+ <xs:element name="description" type="dcc:textBlock" minOccurs="0"/>
396
+ <xs:element name="state" minOccurs="0">
397
+ <xs:simpleType>
398
+ <xs:restriction base="xs:string">
399
+ <xs:enumeration value="beforeAdjustment"/>
400
+ <xs:enumeration value="afterAdjustment"/>
401
+ <xs:enumeration value="beforeRepair"/>
402
+ <xs:enumeration value="afterRepair"/>
403
+ </xs:restriction>
404
+ </xs:simpleType>
405
+ </xs:element>
406
+ <xs:element name="data" type="dcc:dataBlock"/>
407
+ </xs:sequence>
408
+ <xs:attribute name="id" type="xs:ID" use="optional"/>
409
+ </xs:complexType>
410
+
411
+ <xs:complexType name="resultBlock">
412
+ <xs:annotation>
413
+ <xs:documentation>
414
+ The result itself
415
+ </xs:documentation>
416
+ </xs:annotation>
417
+ <xs:sequence>
418
+ <xs:element name="name" type="dcc:textBlock"/>
419
+ <xs:element name="description" type="dcc:textBlock" minOccurs="0"/>
420
+ <xs:element name="data" type="dcc:dataBlock"/>
421
+ </xs:sequence>
422
+ <xs:attribute name="id" type="xs:ID" use="optional"/>
423
+ </xs:complexType>
424
+
425
+ <xs:complexType name="resultParameter">
426
+ <xs:annotation>
427
+ <xs:documentation>
428
+ Elements for the measurement results
429
+ </xs:documentation>
430
+ </xs:annotation>
431
+ <xs:sequence>
432
+ <xs:element name="result" type="dcc:resultBlock" maxOccurs="unbounded"/>
433
+ </xs:sequence>
434
+ </xs:complexType>
435
+
436
+ <xs:complexType name="dataBlock">
437
+ <xs:annotation>
438
+ <xs:documentation>
439
+ In the Element "outcome", any of the elements
440
+ "text", "formula", "byteData", "chart", "image", "data" and "xml"
441
+ can be used multiple times in an arbitrary order. The usage of each element
442
+ is optional. At least one of the elements must be provided.
443
+ </xs:documentation>
444
+ </xs:annotation>
445
+ <xs:choice maxOccurs="unbounded">
446
+ <xs:element name="text" type="dcc:textBlock"/>
447
+ <xs:element name="formula" type="dcc:formulaBlock"/>
448
+ <xs:element name="byteData" type="dcc:byteDataBlock"/>
449
+ <xs:element name="xml" type="dcc:xmlBlock"/>
450
+ <xs:element name="quantity" type="dcc:quantity"/>
451
+ <xs:element name="list" type="dcc:list"/>
452
+ </xs:choice>
453
+ <xs:attribute name="id" type="xs:ID" use="optional"/>
454
+ </xs:complexType>
455
+
456
+ <!-- #####################################################################################
457
+ Elements for the specification of measurement data (quantities) in the DCC
458
+ (XMl Schema for the secure exchange of measurement data in ICT applications)
459
+ #####################################################################################-->
460
+
461
+ <xs:complexType name="quantity">
462
+ <xs:annotation>
463
+ <xs:documentation>
464
+ Basic element for the statement of measurement values in a DCC.
465
+ The measurement value, its unit and uncertainty are defined by type 'si:real'.
466
+ The 'unit' must be defined in the SI-system (siunitx format).
467
+ Additional information can be made according to MRA, Ilac and external
468
+ measurements in the 'measurementMetaData' element.
469
+ In addition, the 'quantity' can contain a comma separated list of independent real quantities
470
+ ('si:realCS').
471
+ The 'quantity' has an optional 'name' element and it can have a unique ID.
472
+ The 'name' element can be repeated with different languages.
473
+ </xs:documentation>
474
+ </xs:annotation>
475
+ <xs:sequence>
476
+ <xs:element name="name" type="dcc:textBlock" minOccurs="0"/>
477
+ <xs:choice>
478
+ <xs:element name="noQuantity" type="dcc:textBlock" />
479
+ <xs:element ref="si:real"/>
480
+ <xs:element ref="si:list"/>
481
+ <xs:element ref="si:hybrid"/>
482
+ <!--<xs:element name="toleranceOneDim" type="dcc:toleranceOneDimParameter"/>-->
483
+ </xs:choice>
484
+ <!--<xs:element name="toleranceOneDim" type="dcc:toleranceOneDimParameter" minOccurs="0"/>-->
485
+ <xs:element name="usedMethods" type="dcc:usedMethodParameter" minOccurs="0"/>
486
+ <xs:element name="usedSoftware" type="dcc:softwareParameter" minOccurs="0"/>
487
+ <xs:element name="influenceConditions" type="dcc:influenceConditionParameter" minOccurs="0"/>
488
+ <xs:element name="measurementMetaData" type="dcc:measurementMetaDataParameter" minOccurs="0"/>
489
+ </xs:sequence>
490
+ <xs:attribute name="id" type="xs:ID" use="optional"/>
491
+ </xs:complexType>
492
+
493
+ <!--
494
+ This is a preview for toleranceOneDim.
495
+ See the discussion at https://gitlab1.ptb.de/d-ptb/dcc/xsd-dcc/issues/68
496
+
497
+ <xs:complexType name="toleranceOneDimParameter">
498
+ <xs:annotation>
499
+ <xs:documentation>
500
+ This element is necessary to handle tolerances.
501
+ </xs:documentation>
502
+ </xs:annotation>
503
+ <xs:sequence>
504
+ <xs:element name="lowerLimit" minOccurs="0">
505
+ <xs:complexType>
506
+ <xs:choice>
507
+ <xs:element ref="si:real"/>
508
+ <xs:element ref="si:hybrid"/>
509
+ </xs:choice>
510
+ </xs:complexType>
511
+ </xs:element>
512
+ <xs:element name="upperLimit" minOccurs="0">
513
+ <xs:complexType>
514
+ <xs:choice>
515
+ <xs:element ref="si:real"/>
516
+ <xs:element ref="si:hybrid"/>
517
+ </xs:choice>
518
+ </xs:complexType>
519
+ </xs:element>
520
+ </xs:sequence>
521
+ </xs:complexType>
522
+ -->
523
+
524
+ <xs:complexType name="list">
525
+ <xs:annotation>
526
+ <xs:documentation>
527
+ The 'list' element allows to define a collection of measurement results
528
+ which are subject to structures with integrity. Basic structures are
529
+ vector quantities. A recursive usage of 'list' allows the creation of
530
+ matrix and tensor structures as well as structures of higher dimension. The 'list'
531
+ may also be used to give measurement results in combination with some
532
+ ambient conditions at the measurement.
533
+ In this version of the data format, the 'list' supports a global definition of uncertainties
534
+ that are binding for all quantities inside the 'list' element.
535
+ For future versions it is planned to add uncertainty elements for vector quantities
536
+ (e.g. covariance matrix).
537
+ The 'list' element can have a unique ID and several name elements.
538
+ </xs:documentation>
539
+ </xs:annotation>
540
+ <xs:sequence>
541
+ <xs:element name="name" type="dcc:textBlock" minOccurs="0"/>
542
+ <xs:element name="dateTime" type="xs:dateTime" minOccurs="0"/>
543
+ <xs:choice>
544
+ <xs:element name="list" type="dcc:list" maxOccurs="unbounded"/>
545
+ <xs:element name="quantity" type="dcc:quantity" maxOccurs="unbounded"/>
546
+ </xs:choice>
547
+ <xs:element name="usedMethods" type="dcc:usedMethodParameter" minOccurs="0"/>
548
+ <xs:element name="usedSoftware" type="dcc:softwareParameter" minOccurs="0"/>
549
+ <xs:element name="influenceConditions" type="dcc:influenceConditionParameter" minOccurs="0"/>
550
+ <xs:element name="measurementMetaData" type="dcc:measurementMetaDataParameter" minOccurs="0"/>
551
+ </xs:sequence>
552
+ <xs:attribute name="id" type="xs:ID" use="optional"/>
553
+ </xs:complexType>
554
+
555
+ <xs:complexType name="measurementMetaDataParameter">
556
+ <xs:annotation>
557
+ <xs:documentation>
558
+ TODO: noch anpassen an neue Struktur
559
+ The measurement meta data comprises optional information that lead to a measurement result.
560
+ The sub-elements should reference the specific and detailed information in the administrative part.
561
+ Each element is optional and the user should only provide the elements that are relevant
562
+ for the measurement result.
563
+ </xs:documentation>
564
+ </xs:annotation>
565
+ <xs:sequence>
566
+ <xs:element name="metaData" type="dcc:statementMetaDataParameter" maxOccurs="unbounded"/>
567
+ </xs:sequence>
568
+ </xs:complexType>
569
+
570
+
571
+ <!-- #####################################################################################
572
+ complexTypes for DCC
573
+ #####################################################################################-->
574
+
575
+ <xs:complexType name="statementMetaDataParameter">
576
+ <xs:sequence>
577
+ <xs:element name="countryCodeISO3166_1" type="dcc:elementStringISO3166" minOccurs="0" maxOccurs="unbounded"/>
578
+ <xs:element name="convention" type="xs:string" minOccurs="0"/>
579
+ <xs:element name="traceable" type="xs:boolean" minOccurs="0"/>
580
+ <xs:element name="norm" type="xs:string" minOccurs="0"/>
581
+ <xs:element name="reference" type="xs:string" minOccurs="0"/>
582
+ <xs:element name="declaration" type="dcc:textBlock" minOccurs="0"/>
583
+ <xs:element name="valid" type="xs:boolean" minOccurs="0"/>
584
+ <xs:element name="refId" type="xs:IDREF" minOccurs="0"/>
585
+ <xs:element name="date" type="xs:date" minOccurs="0"/>
586
+ <xs:element name="period" type="xs:duration" minOccurs="0"/>
587
+ </xs:sequence>
588
+ <xs:attribute name="id" type="xs:ID" use="optional"/>
589
+ </xs:complexType>
590
+
591
+ <xs:simpleType name="elementStringISO3166">
592
+ <xs:restriction base="xs:string">
593
+ <xs:pattern value="[A-Z]{2}"/>
594
+ </xs:restriction>
595
+ </xs:simpleType>
596
+
597
+ <xs:simpleType name="elementStringISO639">
598
+ <xs:restriction base="xs:string">
599
+ <xs:pattern value="[a-z]{2}"/>
600
+ </xs:restriction>
601
+ </xs:simpleType>
602
+
603
+ <xs:complexType name="elementStringWithLang">
604
+ <xs:simpleContent>
605
+ <xs:extension base="xs:string">
606
+ <xs:attribute name="lang" type="dcc:elementStringISO639" use="optional"/>
607
+ <xs:attribute name="id" type="xs:ID" use="optional"/>
608
+ </xs:extension>
609
+ </xs:simpleContent>
610
+ </xs:complexType>
611
+
612
+ <xs:complexType name="location">
613
+ <xs:choice maxOccurs="unbounded">
614
+ <xs:element name="city" type="xs:string"/>
615
+ <xs:element name="countryCode" type="dcc:elementStringISO3166"/>
616
+ <xs:element name="postCode" type="xs:string"/>
617
+ <xs:element name="postOfficeBox" type="xs:string"/>
618
+ <xs:element name="state" type="xs:string"/>
619
+ <xs:element name="street" type="xs:string"/>
620
+ <xs:element name="streetNo" type="xs:string"/>
621
+ <xs:element name="further" type="dcc:textBlock"/>
622
+ </xs:choice>
623
+ </xs:complexType>
624
+
625
+ <xs:complexType name="contact">
626
+ <xs:sequence>
627
+ <xs:element name="name" type="dcc:textBlock"/>
628
+ <xs:element name="eMail" type="xs:string"/>
629
+ <xs:element name="phone" type="xs:string" minOccurs="0"/>
630
+ <xs:element name="fax" type="xs:string" minOccurs="0"/>
631
+ <xs:element name="location" type="dcc:location"/>
632
+ <xs:element name="descriptionData" type="dcc:byteDataBlock" minOccurs="0"/>
633
+ </xs:sequence>
634
+ <xs:attribute name="id" type="xs:ID" use="optional"/>
635
+ </xs:complexType>
636
+
637
+ <xs:complexType name="contactNotStrict">
638
+ <xs:sequence>
639
+ <xs:element name="name" type="dcc:textBlock"/>
640
+ <xs:element name="eMail" type="xs:string" minOccurs="0"/>
641
+ <xs:element name="phone" type="xs:string" minOccurs="0"/>
642
+ <xs:element name="fax" type="xs:string" minOccurs="0"/>
643
+ <xs:element name="location" type="dcc:location" minOccurs="0"/>
644
+ <xs:element name="descriptionData" type="dcc:byteDataBlock" minOccurs="0"/>
645
+ </xs:sequence>
646
+ <xs:attribute name="id" type="xs:ID" use="optional"/>
647
+ </xs:complexType>
648
+
649
+ <xs:complexType name="hash">
650
+ <xs:sequence>
651
+ <xs:element name="reference" type="dcc:textBlock"/>
652
+ <xs:element name="referenceID" type="xs:string"/>
653
+ <xs:element name="procedure" type="xs:string"/>
654
+ <xs:element name="value" type="xs:string"/>
655
+ <xs:element name="linkedReport" type="dcc:hash" minOccurs="0"/>
656
+ </xs:sequence>
657
+ <xs:attribute name="id" type="xs:ID" use="optional"/>
658
+ </xs:complexType>
659
+
660
+ <xs:complexType name="textBlock">
661
+ <xs:annotation>
662
+ <xs:documentation>
663
+ The textBlock defines the type for writing text in the DCC.
664
+ In this block, the element content can be used many times with different language definition (attribute
665
+ lang).
666
+ The optional attribute ID is for a unique ID.
667
+ </xs:documentation>
668
+ </xs:annotation>
669
+ <xs:sequence>
670
+ <xs:element name="content" type="dcc:elementStringWithLang" maxOccurs="unbounded"/>
671
+ </xs:sequence>
672
+ <xs:attribute name="id" type="xs:ID" use="optional"/>
673
+ </xs:complexType>
674
+
675
+ <xs:complexType name="byteDataBlock">
676
+ <xs:annotation>
677
+ <xs:documentation>
678
+ The byteDataBlock defines a type which allows to add
679
+ binary encoded files to the measurement result section.
680
+ It is a good practise to use the Base64
681
+ Data Encodings standard (see RFC 4648).
682
+ The file must be encoded as base64Binary, see RFC 4648.
683
+ Examples for the content are image files or ZIP archives.
684
+ The element fileName gives the name of the original file.
685
+ Element mimeType is the underlying file type (e.g. zip, jpeg, png).
686
+ Element data contains the base64Binary encoded file.
687
+ The optional attribute ID is for a unique ID of this data block.
688
+ </xs:documentation>
689
+ </xs:annotation>
690
+ <xs:sequence>
691
+ <xs:element name="name" type="dcc:textBlock"/>
692
+ <xs:element name="description" type="dcc:textBlock"/>
693
+ <xs:element name="fileName" type="xs:string"/>
694
+ <xs:element name="mimeType" type="xs:string"/>
695
+ <xs:element name="data" type="xs:base64Binary"/>
696
+ </xs:sequence>
697
+ <xs:attribute name="id" type="xs:ID" use="optional"/><!--92200_A_I-->
698
+ </xs:complexType>
699
+
700
+ <xs:complexType name="formulaBlock">
701
+ <xs:annotation>
702
+ <xs:documentation>
703
+ This data block is used to add formulas and equations to the measurement result section of the DCC.
704
+ A formula is expected to by written by means of the LaTeX ams math formalism. All units in the
705
+ LaTeX expression must follow the siunitx LaTeX standard.
706
+ The formula is written to the siunitx element.
707
+ The optional attribute ID is for a unique ID of this block.
708
+ </xs:documentation>
709
+ </xs:annotation>
710
+ <xs:sequence>
711
+ <xs:element name="siunitx" type="xs:string"/>
712
+ </xs:sequence>
713
+ <xs:attribute name="lang" type="xs:string" use="optional"/>
714
+ <xs:attribute name="id" type="xs:ID" use="optional"/>
715
+ </xs:complexType>
716
+
717
+ <xs:complexType name="xmlBlock">
718
+ <xs:annotation>
719
+ <xs:documentation>
720
+ This data block is used to add user or application specific XML content to the
721
+ measurement result section of the DCC.
722
+ The optional attribute ID is for a unique ID of this block.
723
+ </xs:documentation>
724
+ </xs:annotation>
725
+ <xs:sequence>
726
+ <xs:any namespace="##other" minOccurs="0"/>
727
+ </xs:sequence>
728
+ </xs:complexType>
729
+
730
+ </xs:schema>