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,650 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <xs:schema version="2.1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema"
3
+ xmlns:dcc="https://ptb.de/dcc"
4
+ xmlns:si="https://ptb.de/si/smartcom/d-si/v1_0_1"
5
+ targetNamespace="https://ptb.de/dcc"
6
+ elementFormDefault="qualified">
7
+
8
+ <xs:import
9
+ namespace="https://ptb.de/si/smartcom/d-si/v1_0_1"
10
+ schemaLocation="../dsi/v1.0.1.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="influenceConditions" type="dcc:influenceConditionParameter"/>
65
+ <xs:element name="results" type="dcc:resultParameter"/>
66
+ </xs:sequence>
67
+ </xs:complexType>
68
+ </xs:element>
69
+
70
+ </xs:sequence>
71
+ </xs:complexType>
72
+ </xs:element>
73
+
74
+ <xs:element name="comments" type="xs:string" minOccurs="0"/>
75
+
76
+ <xs:element name="document" type="dcc:byteDataBlock" minOccurs="0"/>
77
+
78
+ </xs:sequence>
79
+ </xs:complexType>
80
+ </xs:element>
81
+
82
+ <!-- #####################################################################################
83
+ Elements of the administrativeData part of the DCC
84
+ #####################################################################################-->
85
+ <xs:complexType name="softwareParameter">
86
+ <xs:annotation>
87
+ <xs:documentation>
88
+ Clear description of the software-version and the creator of the software used to create and process the
89
+ DCC
90
+ </xs:documentation>
91
+ </xs:annotation>
92
+ <xs:sequence>
93
+ <xs:element name="software" maxOccurs="unbounded">
94
+ <xs:complexType>
95
+ <xs:sequence>
96
+ <xs:element name="name" type="dcc:textBlock"/>
97
+ <xs:element name="release" type="xs:string"/>
98
+ <xs:element name="description" type="dcc:textBlock" minOccurs="0" maxOccurs="unbounded"/>
99
+ </xs:sequence>
100
+ <xs:attribute name="id" type="xs:ID" use="optional"/>
101
+ </xs:complexType>
102
+ </xs:element>
103
+ </xs:sequence>
104
+ </xs:complexType>
105
+
106
+ <xs:complexType name="coreDataParameter">
107
+ <xs:annotation>
108
+ <xs:documentation>
109
+ Basic parameters of the Digital Calibration Certificate (DCC)
110
+ </xs:documentation>
111
+ </xs:annotation>
112
+ <xs:sequence>
113
+ <xs:element name="countryCodeISO3166_1" type="dcc:elementStringISO3166"/>
114
+ <xs:element name="usedLangCodeISO639_1" type="dcc:elementStringISO639" maxOccurs="unbounded"/>
115
+ <xs:element name="mandatoryLangCodeISO639_1" type="dcc:elementStringISO639" maxOccurs="unbounded"/>
116
+ <xs:element name="uniqueIdentifier" type="xs:string"/>
117
+ <xs:element name="receiptDate" type="xs:date" minOccurs="0"/>
118
+
119
+ <xs:element name="beginPerformanceDate" type="xs:date"/>
120
+ <xs:element name="endPerformanceDate" type="xs:date"/>
121
+
122
+ <xs:element name="previousReport" type="dcc:hash" minOccurs="0"/>
123
+ </xs:sequence>
124
+ </xs:complexType>
125
+
126
+ <xs:complexType name="itemParameter">
127
+ <xs:annotation>
128
+ <xs:documentation>
129
+ Clear description of the calibration items
130
+ </xs:documentation>
131
+ </xs:annotation>
132
+ <xs:sequence>
133
+ <xs:element name="name" type="dcc:textBlock" minOccurs="0"/>
134
+ <xs:element name="description" type="dcc:textBlock" minOccurs="0"/>
135
+ <xs:element name="owner" type="dcc:contact" minOccurs="0"/>
136
+
137
+ <xs:element name="item" maxOccurs="unbounded">
138
+ <xs:complexType>
139
+ <xs:sequence>
140
+ <xs:element name="name" type="dcc:textBlock"/>
141
+ <xs:element name="description" type="dcc:textBlock" maxOccurs="unbounded"/>
142
+ <xs:element name="descriptionData" type="dcc:byteDataBlock" minOccurs="0" maxOccurs="unbounded"/>
143
+
144
+ <xs:element name="manufacturer" type="dcc:contactNotStrict"/>
145
+ <xs:element name="model" type="xs:string" minOccurs="0"/>
146
+
147
+ <xs:element name="identifications">
148
+ <xs:complexType>
149
+ <xs:sequence>
150
+ <xs:element name="identification" maxOccurs="unbounded">
151
+ <xs:complexType>
152
+ <xs:sequence>
153
+ <xs:element name="issuer">
154
+ <xs:simpleType>
155
+ <xs:restriction base="xs:string">
156
+ <xs:enumeration value="manufacturer"/>
157
+ <xs:enumeration value="calibrationLaboratory"/>
158
+ <xs:enumeration value="customer"/>
159
+ <xs:enumeration value="owner"/>
160
+ <xs:enumeration value="other"/>
161
+ </xs:restriction>
162
+ </xs:simpleType>
163
+ </xs:element>
164
+ <xs:element name="value" type="xs:string"/>
165
+ <xs:element name="description" type="dcc:textBlock" minOccurs="0"/>
166
+ </xs:sequence>
167
+ <xs:attribute name="id" type="xs:ID" use="optional"/>
168
+ </xs:complexType>
169
+ </xs:element>
170
+ </xs:sequence>
171
+ </xs:complexType>
172
+ </xs:element>
173
+ </xs:sequence>
174
+ <xs:attribute name="id" type="xs:ID" use="optional"/>
175
+ </xs:complexType>
176
+ </xs:element>
177
+ </xs:sequence>
178
+ </xs:complexType>
179
+
180
+ <xs:complexType name="calibrationLaboratoryParameter">
181
+ <xs:annotation>
182
+ <xs:documentation>
183
+ Informations about the calibration laboratory
184
+ </xs:documentation>
185
+ </xs:annotation>
186
+ <xs:sequence>
187
+ <xs:element name="calibrationLaboratoryCode" type="xs:string" minOccurs="0"/>
188
+ <xs:element name="contact" type="dcc:contact" maxOccurs="unbounded"/>
189
+ </xs:sequence>
190
+ </xs:complexType>
191
+
192
+ <xs:complexType name="respPersonParameter">
193
+ <xs:annotation>
194
+ <xs:documentation>
195
+ List of responsible persons for the DCC
196
+ </xs:documentation>
197
+ </xs:annotation>
198
+ <xs:sequence>
199
+ <xs:element name="respPerson" maxOccurs="unbounded">
200
+ <xs:complexType>
201
+ <xs:sequence>
202
+ <xs:element name="person" type="xs:string"/>
203
+ <xs:element name="mainSigner" type="xs:boolean" minOccurs="0"/>
204
+ <xs:element name="cryptElectronicSeal" type="xs:boolean" minOccurs="0"/>
205
+ <xs:element name="cryptElectronicSignature" type="xs:boolean" minOccurs="0"/>
206
+ <xs:element name="cryptElectronicTimeStamp" type="xs:boolean" minOccurs="0"/>
207
+ <xs:element name="eMailPerson" type="xs:string" minOccurs="0"/>
208
+ <xs:element name="furtherInfoPerson" type="dcc:textBlock" minOccurs="0" maxOccurs="unbounded"/>
209
+ <xs:element name="location" type="dcc:location" minOccurs="0"/>
210
+ </xs:sequence>
211
+ <xs:attribute name="id" type="xs:ID" use="optional"/>
212
+ </xs:complexType>
213
+ </xs:element>
214
+ </xs:sequence>
215
+ </xs:complexType>
216
+
217
+ <xs:complexType name="statementParameter">
218
+ <xs:annotation>
219
+ <xs:documentation>
220
+ Elements for the statements
221
+ </xs:documentation>
222
+ </xs:annotation>
223
+ <xs:sequence>
224
+ <xs:element name="statement" type="dcc:statementMetaDataParameter" maxOccurs="unbounded"/>
225
+ </xs:sequence>
226
+ </xs:complexType>
227
+
228
+ <!-- #####################################################################################
229
+ Elements of the measurementResult part of the DCC
230
+ ##################################################################################### -->
231
+
232
+ <!-- We need community input about the following:
233
+ Talk to us: gemimeg@ptb.de
234
+
235
+ <xs:complexType name="externalParameter">
236
+ <xs:annotation>
237
+ <xs:documentation>
238
+ Information about the external partners
239
+
240
+ Community input needed! Talk to us: gemimeg@ptb.de
241
+ </xs:documentation>
242
+ </xs:annotation>
243
+ <xs:sequence>
244
+ <xs:element name="external" type="dcc:contact" maxOccurs="unbounded"/>
245
+ </xs:sequence>
246
+ </xs:complexType>
247
+
248
+ <xs:complexType name="sampledMaterialParameter">
249
+ <xs:annotation>
250
+ <xs:documentation>
251
+ Information about the sampled material
252
+
253
+ Community input needed! Talk to us: gemimeg@ptb.de
254
+ </xs:documentation>
255
+ </xs:annotation>
256
+ <xs:sequence>
257
+ <xs:element name="sampledMaterial" maxOccurs="unbounded">
258
+ <xs:complexType>
259
+ <xs:sequence>
260
+ <xs:element name="plan" type="dcc:textBlock"/>
261
+ <xs:element name="method" type="dcc:textBlock"/>
262
+ <xs:element name="descriptionData" type="dcc:byteDataBlock" minOccurs="0" maxOccurs="unbounded"/>
263
+ <xs:element name="externalSampler" type="dcc:contact" minOccurs="0" maxOccurs="unbounded"/>
264
+ </xs:sequence>
265
+ <xs:attribute name="id" type="xs:ID" use="optional"/>
266
+ </xs:complexType>
267
+ </xs:element>
268
+ </xs:sequence>
269
+ </xs:complexType>
270
+
271
+ <xs:complexType name="metrologicallyTraceableParameter">
272
+ <xs:annotation>
273
+ <xs:documentation>
274
+ Elements for metrologically traceable measurements
275
+
276
+ Community input needed! Talk to us: gemimeg@ptb.de
277
+
278
+ </xs:documentation>
279
+ </xs:annotation>
280
+ <xs:sequence>
281
+ <xs:element name="name" type="dcc:textBlock" />
282
+ <xs:element name="description" type="dcc:textBlock" />
283
+ <xs:element name="identifier" type="dcc:hash" />
284
+ </xs:sequence>
285
+ </xs:complexType>
286
+
287
+ -->
288
+
289
+ <xs:complexType name="usedMethodParameter">
290
+ <xs:annotation>
291
+ <xs:documentation>
292
+ Clear description of the used method
293
+ </xs:documentation>
294
+ </xs:annotation>
295
+ <xs:sequence>
296
+ <xs:element name="usedMethod" maxOccurs="unbounded">
297
+ <xs:complexType>
298
+ <xs:sequence>
299
+ <xs:element name="name" type="dcc:textBlock"/>
300
+ <xs:element name="description" type="dcc:textBlock" maxOccurs="unbounded"/>
301
+ <xs:element name="norm" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
302
+ </xs:sequence>
303
+ <xs:attribute name="id" type="xs:ID" use="optional"/>
304
+ </xs:complexType>
305
+ </xs:element>
306
+ </xs:sequence>
307
+ </xs:complexType>
308
+
309
+ <xs:complexType name="influenceConditionParameter">
310
+ <xs:annotation>
311
+ <xs:documentation>
312
+ Elements for the conditions (e.g. environmental) under which the calibrations were
313
+ made that have an influence on the measurement results
314
+ </xs:documentation>
315
+ </xs:annotation>
316
+ <xs:sequence>
317
+ <xs:element name="influenceCondition" type="dcc:conditionBlock" maxOccurs="unbounded"/>
318
+ </xs:sequence>
319
+ </xs:complexType>
320
+
321
+ <xs:complexType name="calibrationLocationParameter">
322
+ <xs:annotation>
323
+ <xs:documentation>
324
+ Locations, where the calibration was done
325
+ </xs:documentation>
326
+ </xs:annotation>
327
+ <xs:sequence>
328
+ <xs:element name="calibrationLocation" maxOccurs="unbounded">
329
+ <xs:complexType>
330
+ <xs:sequence>
331
+ <xs:element name="calibrationLocationSite" type="dcc:textBlock"/>
332
+ <xs:element name="beginLocationCalDateTime" type="xs:dateTime" minOccurs="0"/>
333
+ <xs:element name="endLocationCalDateTime" type="xs:dateTime" minOccurs="0"/>
334
+ <xs:element name="location" type="dcc:location" minOccurs="0"/>
335
+ </xs:sequence>
336
+ <xs:attribute name="id" type="xs:ID" use="optional"/>
337
+ </xs:complexType>
338
+ </xs:element>
339
+ </xs:sequence>
340
+
341
+ </xs:complexType>
342
+
343
+ <xs:complexType name="conditionBlock">
344
+ <xs:annotation>
345
+ <xs:documentation>
346
+ All necessary information for one part of a measurement
347
+ </xs:documentation>
348
+ </xs:annotation>
349
+ <xs:sequence>
350
+ <xs:element name="name" type="dcc:textBlock"/>
351
+ <xs:element name="description" type="dcc:textBlock" minOccurs="0"/>
352
+ <xs:element name="state" minOccurs="0">
353
+ <xs:simpleType>
354
+ <xs:restriction base="xs:string">
355
+ <xs:enumeration value="beforeAdjustment"/>
356
+ <xs:enumeration value="afterAdjustment"/>
357
+ <xs:enumeration value="beforeRepair"/>
358
+ <xs:enumeration value="afterRepair"/>
359
+ </xs:restriction>
360
+ </xs:simpleType>
361
+ </xs:element>
362
+ <xs:element name="data" type="dcc:dataBlock"/>
363
+ </xs:sequence>
364
+ <xs:attribute name="id" type="xs:ID" use="optional"/>
365
+ </xs:complexType>
366
+
367
+ <xs:complexType name="resultBlock">
368
+ <xs:annotation>
369
+ <xs:documentation>
370
+ The result itself
371
+ </xs:documentation>
372
+ </xs:annotation>
373
+ <xs:sequence>
374
+ <xs:element name="name" type="dcc:textBlock"/>
375
+ <xs:element name="description" type="dcc:textBlock" minOccurs="0"/>
376
+ <xs:element name="data" type="dcc:dataBlock"/>
377
+ </xs:sequence>
378
+ <xs:attribute name="id" type="xs:ID" use="optional"/>
379
+ </xs:complexType>
380
+
381
+ <xs:complexType name="resultParameter">
382
+ <xs:annotation>
383
+ <xs:documentation>
384
+ Elements for the measurement results
385
+ </xs:documentation>
386
+ </xs:annotation>
387
+ <xs:sequence>
388
+ <xs:element name="result" type="dcc:resultBlock" maxOccurs="unbounded"/>
389
+ </xs:sequence>
390
+ </xs:complexType>
391
+
392
+ <xs:complexType name="dataBlock">
393
+ <xs:annotation>
394
+ <xs:documentation>
395
+ In the Element "outcome", any of the elements
396
+ "text", "formula", "byteData", "chart", "image", "data" and "xml"
397
+ can be used multiple times in an arbitrary order. The usage of each element
398
+ is optional. At least one of the elements must be provided.
399
+ </xs:documentation>
400
+ </xs:annotation>
401
+ <xs:choice maxOccurs="unbounded">
402
+ <xs:element name="text" type="dcc:textBlock"/>
403
+ <xs:element name="formula" type="dcc:formulaBlock"/>
404
+ <xs:element name="byteData" type="dcc:byteDataBlock"/>
405
+ <xs:element name="xml" type="dcc:xmlBlock"/>
406
+ <xs:element name="quantity" type="dcc:quantity"/>
407
+ <xs:element name="list" type="dcc:list"/>
408
+ </xs:choice>
409
+ <xs:attribute name="id" type="xs:ID" use="optional"/>
410
+ </xs:complexType>
411
+
412
+ <!-- #####################################################################################
413
+ Elements for the specification of measurement data (quantities) in the DCC
414
+ (XMl Schema for the secure exchange of measurement data in ICT applications)
415
+ #####################################################################################-->
416
+
417
+ <xs:complexType name="quantity">
418
+ <xs:annotation>
419
+ <xs:documentation>
420
+ Basic element for the statement of measurement values in a DCC.
421
+ The measurement value, its unit and uncertainty are defined by type 'si:real'.
422
+ The 'unit' must be defined in the SI-system (siunitx format).
423
+ Additional information can be made according to MRA, Ilac and external
424
+ measurements in the 'measurementMetaData' element.
425
+ In addition, the 'quantity' can contain a comma separated list of independent real quantities
426
+ ('si:realCS').
427
+ The 'quantity' has an optional 'name' element and it can have a unique ID.
428
+ The 'name' element can be repeated with different languages.
429
+ </xs:documentation>
430
+ </xs:annotation>
431
+ <xs:sequence>
432
+ <xs:element name="name" type="dcc:textBlock" minOccurs="0"/>
433
+ <xs:choice>
434
+ <xs:element name="noQuantity" type="dcc:textBlock" />
435
+ <xs:element ref="si:real"/>
436
+ <xs:element ref="si:realCS"/>
437
+ <xs:element ref="si:list"/>
438
+ <xs:element ref="si:hybrid"/>
439
+ </xs:choice>
440
+ <xs:element name="usedMethods" type="dcc:usedMethodParameter" minOccurs="0"/>
441
+ <xs:element name="usedSoftware" type="dcc:softwareParameter" minOccurs="0"/>
442
+ <xs:element name="influenceConditions" type="dcc:influenceConditionParameter" minOccurs="0"/>
443
+ <xs:element name="measurementMetaData" type="dcc:measurementMetaDataParameter" minOccurs="0"/>
444
+ </xs:sequence>
445
+ <xs:attribute name="id" type="xs:ID" use="optional"/>
446
+ </xs:complexType>
447
+
448
+ <xs:complexType name="list">
449
+ <xs:annotation>
450
+ <xs:documentation>
451
+ The 'list' element allows to define a collection of measurement results
452
+ which are subject to structures with integrity. Basic structures are
453
+ vector quantities. A recursive usage of 'list' allows the creation of
454
+ matrix and tensor structures as well as structures of higher dimension. The 'list'
455
+ may also be used to give measurement results in combination with some
456
+ ambient conditions at the measurement.
457
+ In this version of the data format, the 'list' supports a global definition of uncertainties
458
+ that are binding for all quantities inside the 'list' element.
459
+ For future versions it is planned to add uncertainty elements for vector quantities
460
+ (e.g. covariance matrix).
461
+ The 'list' element can have a unique ID and several name elements.
462
+ </xs:documentation>
463
+ </xs:annotation>
464
+ <xs:sequence>
465
+ <xs:element name="name" type="dcc:textBlock" minOccurs="0"/>
466
+ <xs:element name="dateTime" type="xs:dateTime" minOccurs="0"/>
467
+ <xs:choice>
468
+ <xs:element name="list" type="dcc:list" maxOccurs="unbounded"/>
469
+ <xs:element name="quantity" type="dcc:quantity" maxOccurs="unbounded"/>
470
+ </xs:choice>
471
+ <xs:element name="usedMethods" type="dcc:usedMethodParameter" minOccurs="0"/>
472
+ <xs:element name="usedSoftware" type="dcc:softwareParameter" minOccurs="0"/>
473
+ <xs:element name="influenceConditions" type="dcc:influenceConditionParameter" minOccurs="0"/>
474
+ <xs:element name="measurementMetaData" type="dcc:measurementMetaDataParameter" minOccurs="0"/>
475
+ </xs:sequence>
476
+ <xs:attribute name="id" type="xs:ID" use="optional"/>
477
+ </xs:complexType>
478
+
479
+
480
+ <xs:complexType name="measurementMetaDataParameter">
481
+ <xs:annotation>
482
+ <xs:documentation>
483
+ TODO: noch anpassen an neue Struktur
484
+ The measurement meta data comprises optional information that lead to a measurement result.
485
+ The sub-elements should reference the specific and detailed information in the administrative part.
486
+ Each element is optional and the user should only provide the elements that are relevant
487
+ for the measurement result.
488
+ </xs:documentation>
489
+ </xs:annotation>
490
+ <xs:sequence>
491
+ <xs:element name="metaData" type="dcc:statementMetaDataParameter" maxOccurs="unbounded"/>
492
+ </xs:sequence>
493
+ </xs:complexType>
494
+
495
+
496
+ <!-- #####################################################################################
497
+ complexTypes for DCC
498
+ #####################################################################################-->
499
+
500
+ <xs:complexType name="statementMetaDataParameter">
501
+ <xs:sequence>
502
+ <xs:element name="countryCodeISO3166_1" type="dcc:elementStringISO3166" minOccurs="0" maxOccurs="unbounded"/>
503
+ <xs:element name="convention" type="xs:string" minOccurs="0"/>
504
+ <xs:element name="traceable" type="xs:boolean" minOccurs="0"/>
505
+ <xs:element name="norm" type="xs:string" minOccurs="0"/>
506
+ <xs:element name="reference" type="xs:string" minOccurs="0"/>
507
+ <xs:element name="declaration" type="dcc:textBlock" minOccurs="0"/>
508
+ <xs:element name="valid" type="xs:boolean" minOccurs="0"/>
509
+ <xs:element name="refId" type="xs:IDREF" minOccurs="0"/>
510
+ <xs:element name="date" type="xs:date" minOccurs="0"/>
511
+ <xs:element name="period" type="xs:duration" minOccurs="0"/>
512
+ </xs:sequence>
513
+ <xs:attribute name="id" type="xs:ID" use="optional"/>
514
+ </xs:complexType>
515
+
516
+ <xs:simpleType name="elementStringISO3166">
517
+ <xs:restriction base="xs:string">
518
+ <xs:pattern value="[A-Z]{2}"/>
519
+ </xs:restriction>
520
+ </xs:simpleType>
521
+
522
+ <xs:simpleType name="elementStringISO639">
523
+ <xs:restriction base="xs:string">
524
+ <xs:pattern value="[a-z]{2}"/>
525
+ </xs:restriction>
526
+ </xs:simpleType>
527
+
528
+ <xs:complexType name="elementStringWithLang">
529
+ <xs:simpleContent>
530
+ <xs:extension base="xs:string">
531
+ <xs:attribute name="lang" type="dcc:elementStringISO639" use="optional"/>
532
+ <xs:attribute name="id" type="xs:ID" use="optional"/>
533
+ </xs:extension>
534
+ </xs:simpleContent>
535
+ </xs:complexType>
536
+
537
+ <xs:complexType name="location">
538
+ <xs:choice maxOccurs="unbounded">
539
+ <xs:element name="further" type="dcc:textBlock"/>
540
+ <xs:element name="street" type="xs:string"/>
541
+ <xs:element name="streetNo" type="xs:string"/>
542
+ <xs:element name="postOfficeBox" type="xs:string"/>
543
+ <xs:element name="postCode" type="xs:string"/>
544
+ <xs:element name="city" type="xs:string"/>
545
+ <xs:element name="state" type="xs:string"/>
546
+ <xs:element name="countryCode" type="dcc:elementStringISO3166"/>
547
+ <xs:element name="descriptionData" type="dcc:byteDataBlock"/>
548
+ </xs:choice>
549
+ </xs:complexType>
550
+
551
+ <xs:complexType name="contact">
552
+ <xs:sequence>
553
+ <xs:element name="name" type="dcc:textBlock"/>
554
+ <xs:element name="eMail" type="xs:string"/>
555
+ <xs:element name="location" type="dcc:location"/>
556
+ </xs:sequence>
557
+ <xs:attribute name="id" type="xs:ID" use="optional"/>
558
+ </xs:complexType>
559
+
560
+ <xs:complexType name="contactNotStrict">
561
+ <xs:sequence>
562
+ <xs:element name="name" type="dcc:textBlock"/>
563
+ <xs:element name="eMail" type="xs:string" minOccurs="0"/>
564
+ <xs:element name="location" type="dcc:location" minOccurs="0"/>
565
+ </xs:sequence>
566
+ <xs:attribute name="id" type="xs:ID" use="optional"/>
567
+ </xs:complexType>
568
+
569
+ <xs:complexType name="hash">
570
+ <xs:sequence>
571
+ <xs:element name="reference" type="dcc:textBlock"/>
572
+ <xs:element name="referenceID" type="xs:string"/>
573
+ <xs:element name="procedure" type="xs:string"/>
574
+ <xs:element name="value" type="xs:string"/>
575
+ <xs:element name="linkedReport" type="dcc:hash" minOccurs="0"/>
576
+ </xs:sequence>
577
+ <xs:attribute name="id" type="xs:ID" use="optional"/>
578
+ </xs:complexType>
579
+
580
+ <xs:complexType name="textBlock">
581
+ <xs:annotation>
582
+ <xs:documentation>
583
+ The textBlock defines the type for writing text in the DCC.
584
+ In this block, the element content can be used many times with different language definition (attribute
585
+ lang).
586
+ The optional attribute ID is for a unique ID.
587
+ </xs:documentation>
588
+ </xs:annotation>
589
+ <xs:sequence>
590
+ <xs:element name="content" type="dcc:elementStringWithLang" maxOccurs="unbounded"/>
591
+ </xs:sequence>
592
+ <xs:attribute name="id" type="xs:ID" use="optional"/>
593
+ </xs:complexType>
594
+
595
+ <xs:complexType name="byteDataBlock">
596
+ <xs:annotation>
597
+ <xs:documentation>
598
+ The byteDataBlock defines a type which allows to add
599
+ binary encoded files to the measurement result section.
600
+ It is a good practise to use the Base64
601
+ Data Encodings standard (see RFC 4648).
602
+ The file must be encoded as base64Binary, see RFC 4648.
603
+ Examples for the content are image files or ZIP archives.
604
+ The element fileName gives the name of the original file.
605
+ Element mimeType is the underlying file type (e.g. zip, jpeg, png).
606
+ Element data contains the base64Binary encoded file.
607
+ The optional attribute ID is for a unique ID of this data block.
608
+ </xs:documentation>
609
+ </xs:annotation>
610
+ <xs:sequence>
611
+ <xs:element name="name" type="dcc:textBlock"/>
612
+ <xs:element name="description" type="dcc:textBlock"/>
613
+ <xs:element name="fileName" type="xs:string"/>
614
+ <xs:element name="mimeType" type="xs:string"/>
615
+ <xs:element name="data" type="xs:base64Binary"/>
616
+ </xs:sequence>
617
+ <xs:attribute name="id" type="xs:ID" use="optional"/><!--92200_A_I-->
618
+ </xs:complexType>
619
+
620
+ <xs:complexType name="formulaBlock">
621
+ <xs:annotation>
622
+ <xs:documentation>
623
+ This data block is used to add formulas and equations to the measurement result section of the DCC.
624
+ A formula is expected to by written by means of the LaTeX ams math formalism. All units in the
625
+ LaTeX expression must follow the siunitx LaTeX standard.
626
+ The formula is written to the siunitx element.
627
+ The optional attribute ID is for a unique ID of this block.
628
+ </xs:documentation>
629
+ </xs:annotation>
630
+ <xs:sequence>
631
+ <xs:element name="siunitx" type="xs:string"/>
632
+ </xs:sequence>
633
+ <xs:attribute name="lang" type="xs:string" use="optional"/>
634
+ <xs:attribute name="id" type="xs:ID" use="optional"/>
635
+ </xs:complexType>
636
+
637
+ <xs:complexType name="xmlBlock">
638
+ <xs:annotation>
639
+ <xs:documentation>
640
+ This data block is used to add user or application specific XML content to the
641
+ measurement result section of the DCC.
642
+ The optional attribute ID is for a unique ID of this block.
643
+ </xs:documentation>
644
+ </xs:annotation>
645
+ <xs:sequence>
646
+ <xs:any namespace="##other" minOccurs="0"/>
647
+ </xs:sequence>
648
+ </xs:complexType>
649
+
650
+ </xs:schema>