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,963 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <xs:schema version="3.2.1" xmlns:xs="http://www.w3.org/2001/XMLSchema"
3
+ xmlns:dcc="https://ptb.de/dcc"
4
+ xmlns:si="https://ptb.de/si"
5
+ xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
6
+ targetNamespace="https://ptb.de/dcc"
7
+ elementFormDefault="qualified">
8
+
9
+ <xs:import
10
+ namespace="https://ptb.de/si"
11
+ schemaLocation="../dsi/v2.1.0.xsd"/>
12
+
13
+ <xs:import
14
+ namespace="http://www.w3.org/2000/09/xmldsig#"
15
+ schemaLocation="../xmldsig-core-schema.xsd"/>
16
+
17
+ <xs:annotation>
18
+ <xs:documentation>
19
+ DCC - Digital Calibration Certificate
20
+ Copyright (c) 2019 - 2023 Physikalisch-Technische Bundesanstalt
21
+
22
+ This XML Scheme Definition (XSD) is free software: you can redistribute it and/or modify
23
+ it under the terms of the GNU Lesser General Public License as published by
24
+ the Free Software Foundation, version 3 of the License.
25
+
26
+ This XSD is distributed in the hope that it will be useful,
27
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
28
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29
+ GNU Lesser General Public License for more details.
30
+
31
+ The development of minimum requirements for a digital calibration certificate (DCC) is partially funded and
32
+ supported by the joint research project EMPIR 17IND02 (title: SmartCom).
33
+ This project (17IND02) has received funding from the EMPIR programme co-financed by the Participating States
34
+ and from the European Union's Horizon 2020 research and innovation programme.
35
+ The further development of the digital calibration certificate (DCC) is partly supported by the lighthouse
36
+ project GEMIMEG-II (GEMIMEG 01 MT20001E) funded by the German Federal Ministry for Economic Affairs and
37
+ Energy (BMWi) and the project "International Standard Accident Number" (ISAN) funded by the Niedersächsiches
38
+ Vorab initiative of the Volkswagen Foundation (VolkswagenStiftung).
39
+
40
+
41
+ Documentation: https://ptb.de/dcc/v3.2.1/
42
+ </xs:documentation>
43
+ </xs:annotation>
44
+
45
+ <xs:element name="digitalCalibrationCertificate" type="dcc:digitalCalibrationCertificateType"/>
46
+
47
+ <xs:complexType name="digitalCalibrationCertificateType">
48
+ <xs:annotation>
49
+ <xs:documentation>
50
+ The root element that contains the four rings of the DCC.
51
+ </xs:documentation>
52
+ </xs:annotation>
53
+ <xs:sequence>
54
+ <xs:element name="administrativeData" type="dcc:administrativeDataType"/>
55
+
56
+ <xs:element name="measurementResults" type="dcc:measurementResultListType"/>
57
+
58
+ <xs:element name="comment" minOccurs="0">
59
+ <xs:complexType>
60
+ <xs:sequence>
61
+ <xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
62
+ </xs:sequence>
63
+ </xs:complexType>
64
+ </xs:element>
65
+
66
+ <xs:element name="document" type="dcc:byteDataType" minOccurs="0"/>
67
+
68
+ <xs:element ref="ds:Signature" minOccurs="0" maxOccurs="unbounded"/>
69
+ </xs:sequence>
70
+
71
+ <xs:attribute name="schemaVersion" use="required">
72
+ <xs:simpleType>
73
+ <xs:restriction base="xs:string">
74
+ <xs:pattern value="3\.2\.1"/>
75
+ </xs:restriction>
76
+ </xs:simpleType>
77
+ </xs:attribute>
78
+ </xs:complexType>
79
+
80
+ <xs:complexType name="administrativeDataType">
81
+ <xs:annotation>
82
+ <xs:documentation>
83
+ The element administrativeData contains all essential administrative information about the calibration.
84
+ The entries in this area are basically the same and regulated in all DCCs.
85
+ </xs:documentation>
86
+ </xs:annotation>
87
+ <xs:all>
88
+ <xs:element name="dccSoftware" type="dcc:softwareListType"/>
89
+ <xs:element name="refTypeDefinitions" type="dcc:refTypeDefinitionListType" minOccurs="0"/>
90
+ <xs:element name="coreData" type="dcc:coreDataType"/>
91
+ <xs:element name="items" type="dcc:itemListType"/>
92
+ <xs:element name="calibrationLaboratory" type="dcc:calibrationLaboratoryType"/>
93
+ <xs:element name="respPersons" type="dcc:respPersonListType"/>
94
+ <xs:element name="customer" type="dcc:contactType"/>
95
+ <xs:element name="statements" type="dcc:statementListType" minOccurs="0"/>
96
+ </xs:all>
97
+ </xs:complexType>
98
+
99
+ <xs:complexType name="softwareListType">
100
+ <xs:annotation>
101
+ <xs:documentation>
102
+ A list of software elements.
103
+ </xs:documentation>
104
+ </xs:annotation>
105
+ <xs:sequence>
106
+ <xs:element name="software" type="dcc:softwareType" maxOccurs="unbounded"/>
107
+ </xs:sequence>
108
+ </xs:complexType>
109
+
110
+ <xs:complexType name="softwareType">
111
+ <xs:annotation>
112
+ <xs:documentation>
113
+ Information about a software including its name, version and a description.
114
+ </xs:documentation>
115
+ </xs:annotation>
116
+ <xs:sequence>
117
+ <xs:element name="name" type="dcc:textType"/>
118
+ <xs:element name="release" type="dcc:notEmptyStringType"/>
119
+ <xs:element name="type" minOccurs="0">
120
+ <xs:simpleType>
121
+ <xs:restriction base="xs:string">
122
+ <xs:enumeration value="application" />
123
+ <xs:enumeration value="bios" />
124
+ <xs:enumeration value="driver" />
125
+ <xs:enumeration value="editor" />
126
+ <xs:enumeration value="firmware" />
127
+ <xs:enumeration value="library" />
128
+ <xs:enumeration value="os" />
129
+ <xs:enumeration value="other" />
130
+ </xs:restriction>
131
+ </xs:simpleType>
132
+ </xs:element>
133
+ <xs:element name="description" type="dcc:richContentType" minOccurs="0"/>
134
+ </xs:sequence>
135
+ <xs:attribute name="id" type="xs:ID" use="optional"/>
136
+ <xs:attribute name="refType" type="dcc:refTypesType" use="optional"/>
137
+ </xs:complexType>
138
+
139
+ <xs:complexType name="refTypeDefinitionListType">
140
+ <xs:annotation>
141
+ <xs:documentation>
142
+ This type allows the give information about the used refTypes in a DCC.
143
+ </xs:documentation>
144
+ </xs:annotation>
145
+ <xs:sequence>
146
+ <xs:element name="refTypeDefinition" type="dcc:refTypeDefinitionType"
147
+ maxOccurs="unbounded"/>
148
+ </xs:sequence>
149
+ </xs:complexType>
150
+
151
+ <xs:complexType name="refTypeDefinitionType">
152
+ <xs:annotation>
153
+ <xs:documentation>
154
+ This type contains the information about the wording of the refTypes used in a DCC.
155
+ </xs:documentation>
156
+ </xs:annotation>
157
+ <xs:sequence>
158
+ <xs:element name="name" type="dcc:textType"/>
159
+ <xs:element name="description" type="dcc:richContentType" minOccurs="0"/>
160
+ <xs:element name="namespace" type="dcc:notEmptyStringType"/>
161
+ <xs:element name="link" type="dcc:notEmptyStringType"/>
162
+ <xs:element name="release" type="dcc:notEmptyStringType" minOccurs="0"/>
163
+ <xs:element name="value" type="dcc:notEmptyStringType" minOccurs="0"/>
164
+ <xs:element name="procedure" type="dcc:notEmptyStringType" minOccurs="0"/>
165
+ </xs:sequence>
166
+ <xs:attribute name="refType" type="dcc:refTypesType" use="optional"/>
167
+ </xs:complexType>
168
+
169
+ <xs:complexType name="measuringEquipmentListType">
170
+ <xs:annotation>
171
+ <xs:documentation>
172
+ List of measuring equipment and instruments
173
+ </xs:documentation>
174
+ </xs:annotation>
175
+ <xs:sequence>
176
+ <xs:element name="name" type="dcc:textType" minOccurs="0"/>
177
+ <xs:element name="equipmentClass" type="dcc:equipmentClassType" minOccurs="0" maxOccurs="unbounded"/>
178
+ <xs:element name="description" type="dcc:richContentType" minOccurs="0"/>
179
+ <xs:element name="owner" type="dcc:contactType" minOccurs="0"/>
180
+ <xs:element name="identifications" type="dcc:identificationListType" minOccurs="0"/>
181
+ <xs:element name="measuringEquipment" type="dcc:measuringEquipmentType" maxOccurs="unbounded"/>
182
+ </xs:sequence>
183
+ </xs:complexType>
184
+
185
+ <xs:complexType name="measuringEquipmentType">
186
+ <xs:annotation>
187
+ <xs:documentation>
188
+ Information about a measuring equipment or instrument used in the calibration
189
+ </xs:documentation>
190
+ </xs:annotation>
191
+ <xs:sequence>
192
+ <xs:element name="name" type="dcc:textType"/>
193
+ <xs:element name="equipmentClass" type="dcc:equipmentClassType" minOccurs="0" maxOccurs="unbounded"/>
194
+ <xs:element name="description" type="dcc:richContentType" minOccurs="0"/>
195
+ <xs:element name="certificate" type="dcc:hashType" minOccurs="0"/>
196
+ <xs:element name="manufacturer" type="dcc:contactNotStrictType" minOccurs="0"/>
197
+ <xs:element name="model" type="dcc:notEmptyStringType" minOccurs="0"/>
198
+ <xs:element name="identifications" type="dcc:identificationListType" minOccurs="0"/>
199
+ <xs:element name="measuringEquipmentQuantities" type="dcc:measuringEquipmentQuantityListType" minOccurs="0"/>
200
+ </xs:sequence>
201
+ <xs:attribute name="id" type="xs:ID" use="optional"/>
202
+ <xs:attribute name="refType" type="dcc:refTypesType" use="optional"/>
203
+ </xs:complexType>
204
+
205
+ <xs:complexType name="measuringEquipmentQuantityListType">
206
+ <xs:annotation>
207
+ <xs:documentation>
208
+ This type contains a list of measurable value(s) which belongs to the measurement equipment.
209
+ </xs:documentation>
210
+ </xs:annotation>
211
+ <xs:sequence>
212
+ <xs:element name="measuringEquipmentQuantity" type="dcc:primitiveQuantityType" maxOccurs="unbounded"/>
213
+ </xs:sequence>
214
+ </xs:complexType>
215
+
216
+ <xs:complexType name="primitiveQuantityType">
217
+ <xs:annotation>
218
+ <xs:documentation>
219
+ This type contains measurable value(s).
220
+ </xs:documentation>
221
+ </xs:annotation>
222
+ <xs:sequence>
223
+ <xs:element name="name" type="dcc:textType" minOccurs="0"/>
224
+ <xs:element name="description" type="dcc:richContentType" minOccurs="0"/>
225
+ <xs:choice>
226
+ <xs:element name="noQuantity" type="dcc:richContentType"/>
227
+ <xs:element name="charsXMLList" type="dcc:charsXMLListType"/>
228
+ <xs:element ref="si:real"/>
229
+ <xs:element ref="si:hybrid"/>
230
+ <xs:element ref="si:complex"/>
231
+ <xs:element ref="si:constant"/>
232
+ <xs:element ref="si:realListXMLList"/>
233
+ </xs:choice>
234
+ </xs:sequence>
235
+ <xs:attribute name="id" type="xs:ID" use="optional"/>
236
+ <xs:attribute name="refId" type="xs:IDREFS" use="optional"/>
237
+ <xs:attribute name="refType" type="dcc:refTypesType" use="optional"/>
238
+ </xs:complexType>
239
+
240
+ <xs:complexType name="coreDataType">
241
+ <xs:annotation>
242
+ <xs:documentation>
243
+ Important metadata for the DCC containing the global unique identifier and other identifications.
244
+ </xs:documentation>
245
+ </xs:annotation>
246
+ <xs:sequence>
247
+ <xs:element name="countryCodeISO3166_1" type="dcc:stringISO3166Type"/>
248
+ <xs:element name="usedLangCodeISO639_1" type="dcc:stringISO639Type" maxOccurs="unbounded"/>
249
+ <xs:element name="mandatoryLangCodeISO639_1" type="dcc:stringISO639Type" maxOccurs="unbounded"/>
250
+ <xs:element name="uniqueIdentifier" type="dcc:notEmptyStringType"/>
251
+ <xs:element name="identifications" type="dcc:identificationListType" minOccurs="0"/>
252
+ <xs:element name="receiptDate" type="xs:date" minOccurs="0"/>
253
+ <xs:element name="beginPerformanceDate" type="xs:date"/>
254
+ <xs:element name="endPerformanceDate" type="xs:date"/>
255
+ <xs:element name="performanceLocation" type="dcc:performanceLocationType"/>
256
+ <xs:element name="issueDate" type="xs:date" minOccurs="0"/>
257
+ <xs:element name="reportAmendedSubstituted" type="dcc:reportAmendedSubstitutedType" minOccurs="0"/>
258
+ <xs:element name="previousReport" type="dcc:hashType" minOccurs="0"/>
259
+ </xs:sequence>
260
+ </xs:complexType>
261
+
262
+ <xs:complexType name="reportAmendedSubstitutedType">
263
+ <xs:annotation>
264
+ <xs:documentation>
265
+ This type contains information about the replaced DCC and the reason for the replacement.
266
+ </xs:documentation>
267
+ </xs:annotation>
268
+ <xs:sequence>
269
+ <xs:element name="typeOfChange">
270
+ <xs:simpleType>
271
+ <xs:restriction base="xs:string">
272
+ <xs:enumeration value="amended"/>
273
+ <xs:enumeration value="substituted"/>
274
+ </xs:restriction>
275
+ </xs:simpleType>
276
+ </xs:element>
277
+ <xs:element name="replacedUniqueIdentifier" type="dcc:notEmptyStringType"/>
278
+ </xs:sequence>
279
+ <xs:attribute name="id" type="xs:ID" use="optional"/>
280
+ <xs:attribute name="refType" type="dcc:refTypesType" use="optional"/>
281
+ </xs:complexType>
282
+
283
+ <xs:simpleType name="notEmptyStringType">
284
+ <xs:restriction base="xs:string">
285
+ <xs:pattern value="[^\s]+(\s+[^\s]+)*"/>
286
+ </xs:restriction>
287
+ </xs:simpleType>
288
+
289
+ <xs:complexType name="equipmentClassType">
290
+ <xs:annotation>
291
+ <xs:documentation>
292
+ Clear name(s) of the item(s) and identifier(s).
293
+ </xs:documentation>
294
+ </xs:annotation>
295
+ <xs:sequence>
296
+ <xs:element name="reference" type="dcc:notEmptyStringType"/>
297
+ <xs:element name="classID" type="dcc:notEmptyStringType"/>
298
+ </xs:sequence>
299
+ <xs:attribute name="id" type="xs:ID" use="optional"/>
300
+ <xs:attribute name="refType" type="dcc:refTypesType" use="optional"/>
301
+ </xs:complexType>
302
+
303
+ <xs:complexType name="itemListType">
304
+ <xs:annotation>
305
+ <xs:documentation>
306
+ This element is a set of calibrated items.
307
+ Contains one or more item elements.
308
+ </xs:documentation>
309
+ </xs:annotation>
310
+ <xs:sequence>
311
+ <xs:element name="name" type="dcc:textType" minOccurs="0"/>
312
+ <xs:element name="equipmentClass" type="dcc:equipmentClassType" minOccurs="0" maxOccurs="unbounded"/>
313
+ <xs:element name="description" type="dcc:richContentType" minOccurs="0"/>
314
+ <xs:element name="owner" type="dcc:contactType" minOccurs="0"/>
315
+ <xs:element name="manufacturer" type="dcc:contactNotStrictType" minOccurs="0" />
316
+ <xs:element name="identifications" type="dcc:identificationListType" minOccurs="0"/>
317
+
318
+ <xs:element name="item" type="dcc:itemType" maxOccurs="unbounded"/>
319
+ </xs:sequence>
320
+ </xs:complexType>
321
+
322
+ <xs:complexType name="itemType">
323
+ <xs:annotation>
324
+ <xs:documentation>
325
+ An item that is calibrated in this DCC.
326
+ </xs:documentation>
327
+ </xs:annotation>
328
+ <xs:sequence>
329
+ <xs:element name="name" type="dcc:textType"/>
330
+ <xs:element name="equipmentClass" type="dcc:equipmentClassType" minOccurs="0" maxOccurs="unbounded"/>
331
+ <xs:element name="description" type="dcc:richContentType" minOccurs="0"/>
332
+ <xs:element name="installedSoftwares" type="dcc:softwareListType" minOccurs="0" />
333
+ <xs:element name="manufacturer" type="dcc:contactNotStrictType" minOccurs="0" />
334
+ <xs:element name="model" type="dcc:notEmptyStringType" minOccurs="0"/>
335
+ <xs:element name="identifications" type="dcc:identificationListType"/>
336
+ <xs:element name="itemQuantities" type="dcc:itemQuantityListType" minOccurs="0"/>
337
+ </xs:sequence>
338
+ <xs:attribute name="id" type="xs:ID" use="optional"/>
339
+ <xs:attribute name="refType" type="dcc:refTypesType" use="optional"/>
340
+ </xs:complexType>
341
+
342
+ <xs:complexType name="itemQuantityListType">
343
+ <xs:annotation>
344
+ <xs:documentation>
345
+ List of value(s) which belongs to the to be calibrated item.
346
+ </xs:documentation>
347
+ </xs:annotation>
348
+ <xs:sequence>
349
+ <xs:element name="itemQuantity" type="dcc:primitiveQuantityType" maxOccurs="unbounded"/>
350
+ </xs:sequence>
351
+ </xs:complexType>
352
+
353
+
354
+ <xs:complexType name="identificationListType">
355
+ <xs:annotation>
356
+ <xs:documentation>
357
+ List of additional identifications.
358
+ </xs:documentation>
359
+ </xs:annotation>
360
+ <xs:sequence>
361
+ <xs:element name="identification" type="dcc:identificationType" maxOccurs="unbounded"/>
362
+ </xs:sequence>
363
+ </xs:complexType>
364
+
365
+ <xs:complexType name="identificationType">
366
+ <xs:annotation>
367
+ <xs:documentation>
368
+ An additional identification (eg. reference no., serial number, etc.).
369
+ </xs:documentation>
370
+ </xs:annotation>
371
+ <xs:sequence>
372
+ <xs:element name="issuer">
373
+ <xs:simpleType>
374
+ <xs:restriction base="xs:string">
375
+ <xs:enumeration value="manufacturer"/>
376
+ <xs:enumeration value="calibrationLaboratory"/>
377
+ <xs:enumeration value="customer"/>
378
+ <xs:enumeration value="owner"/>
379
+ <xs:enumeration value="other"/>
380
+ </xs:restriction>
381
+ </xs:simpleType>
382
+ </xs:element>
383
+ <xs:element name="value" type="dcc:notEmptyStringType"/>
384
+ <xs:element name="name" type="dcc:textType" minOccurs="0"/>
385
+ </xs:sequence>
386
+ <xs:attribute name="id" type="xs:ID" use="optional"/>
387
+ <xs:attribute name="refType" type="dcc:refTypesType" use="optional"/>
388
+ </xs:complexType>
389
+
390
+ <xs:complexType name="performanceLocationType">
391
+ <xs:annotation>
392
+ <xs:documentation>
393
+ This type contains information about the location where the the calibration is performed.
394
+ </xs:documentation>
395
+ </xs:annotation>
396
+ <xs:simpleContent>
397
+ <xs:extension base="dcc:stringPerformanceLocationType">
398
+ <xs:attribute name="id" type="xs:ID" use="optional"/>
399
+ <xs:attribute name="refId" type="xs:IDREFS" use="optional"/>
400
+ <xs:attribute name="refType" type="dcc:refTypesType" use="optional"/>
401
+ </xs:extension>
402
+ </xs:simpleContent>
403
+ </xs:complexType>
404
+
405
+ <xs:simpleType name="stringPerformanceLocationType">
406
+ <xs:restriction base="xs:string">
407
+ <xs:enumeration value="laboratory"/>
408
+ <xs:enumeration value="customer"/>
409
+ <xs:enumeration value="laboratoryBranch"/>
410
+ <xs:enumeration value="customerBranch"/>
411
+ <xs:enumeration value="other"/>
412
+ </xs:restriction>
413
+ </xs:simpleType>
414
+
415
+ <xs:complexType name="calibrationLaboratoryType">
416
+ <xs:annotation>
417
+ <xs:documentation>
418
+ Information about the calibration laboratory.
419
+ </xs:documentation>
420
+ </xs:annotation>
421
+ <xs:sequence>
422
+ <xs:element name="calibrationLaboratoryCode" type="dcc:notEmptyStringType" minOccurs="0"/>
423
+ <xs:element name="contact" type="dcc:contactType"/>
424
+ <xs:element name="cryptElectronicSeal" type="xs:boolean" minOccurs="0"/>
425
+ <xs:element name="cryptElectronicSignature" type="xs:boolean" minOccurs="0"/>
426
+ <xs:element name="cryptElectronicTimeStamp" type="xs:boolean" minOccurs="0"/>
427
+ </xs:sequence>
428
+ </xs:complexType>
429
+
430
+ <xs:complexType name="respPersonListType">
431
+ <xs:annotation>
432
+ <xs:documentation>
433
+ List of responsible persons for a DCC.
434
+ </xs:documentation>
435
+ </xs:annotation>
436
+ <xs:sequence>
437
+ <xs:element name="respPerson" type="dcc:respPersonType" maxOccurs="unbounded"/>
438
+ </xs:sequence>
439
+ </xs:complexType>
440
+
441
+ <xs:complexType name="respPersonType">
442
+ <xs:annotation>
443
+ <xs:documentation>
444
+ A person responsible for a DCC.
445
+ </xs:documentation>
446
+ </xs:annotation>
447
+ <xs:sequence>
448
+ <xs:element name="person" type="dcc:contactNotStrictType"/>
449
+ <xs:element name="description" type="dcc:richContentType" minOccurs="0"/>
450
+ <xs:element name="role" type="dcc:notEmptyStringType" minOccurs="0"/>
451
+ <xs:element name="mainSigner" type="xs:boolean" minOccurs="0"/>
452
+ <xs:element name="cryptElectronicSeal" type="xs:boolean" minOccurs="0"/>
453
+ <xs:element name="cryptElectronicSignature" type="xs:boolean" minOccurs="0"/>
454
+ <xs:element name="cryptElectronicTimeStamp" type="xs:boolean" minOccurs="0"/>
455
+ </xs:sequence>
456
+ <xs:attribute name="id" type="xs:ID" use="optional"/>
457
+ <xs:attribute name="refType" type="dcc:refTypesType" use="optional"/>
458
+ </xs:complexType>
459
+
460
+ <xs:complexType name="statementListType">
461
+ <xs:annotation>
462
+ <xs:documentation>
463
+ List of statements attached to a DCC.
464
+ </xs:documentation>
465
+ </xs:annotation>
466
+ <xs:sequence>
467
+ <xs:element name="statement" type="dcc:statementMetaDataType" maxOccurs="unbounded"/>
468
+ </xs:sequence>
469
+ </xs:complexType>
470
+
471
+ <xs:complexType name="measurementResultListType">
472
+ <xs:annotation>
473
+ <xs:documentation>
474
+ List of measurement results that are part of a DCC.
475
+ </xs:documentation>
476
+ </xs:annotation>
477
+ <xs:sequence>
478
+ <xs:element name="measurementResult" type="dcc:measurementResultType" maxOccurs="unbounded"/>
479
+ </xs:sequence>
480
+ </xs:complexType>
481
+
482
+ <xs:complexType name="measurementResultType">
483
+ <xs:annotation>
484
+ <xs:documentation>
485
+ A measurement results with the methods, software and equipments used for the calibration.
486
+ Also contains influence conditions and a list of the actual results.
487
+ </xs:documentation>
488
+ </xs:annotation>
489
+ <xs:sequence>
490
+ <xs:element name="name" type="dcc:textType"/>
491
+ <xs:element name="description" type="dcc:richContentType" minOccurs="0"/>
492
+ <xs:element name="usedMethods" type="dcc:usedMethodListType" minOccurs="0"/>
493
+ <xs:element name="usedSoftware" type="dcc:softwareListType" minOccurs="0"/>
494
+ <xs:element name="measuringEquipments" type="dcc:measuringEquipmentListType" minOccurs="0"/>
495
+ <xs:element name="influenceConditions" type="dcc:influenceConditionListType" minOccurs="0"/>
496
+ <xs:element name="results" type="dcc:resultListType"/>
497
+ <xs:element name="measurementMetaData" type="dcc:measurementMetaDataListType" minOccurs="0"/>
498
+ </xs:sequence>
499
+ <xs:attribute name="id" type="xs:ID" use="optional"/>
500
+ <xs:attribute name="refId" type="xs:IDREFS" use="optional"/>
501
+ <xs:attribute name="refType" type="dcc:refTypesType" use="optional"/>
502
+ </xs:complexType>
503
+
504
+ <xs:complexType name="usedMethodListType">
505
+ <xs:annotation>
506
+ <xs:documentation>
507
+ List of the methods used in the calibration.
508
+ </xs:documentation>
509
+ </xs:annotation>
510
+ <xs:sequence>
511
+ <xs:element name="usedMethod" type="dcc:usedMethodType" maxOccurs="unbounded"/>
512
+ </xs:sequence>
513
+ </xs:complexType>
514
+
515
+ <xs:complexType name="usedMethodType">
516
+ <xs:annotation>
517
+ <xs:documentation>
518
+ A method used in the calibration.
519
+ </xs:documentation>
520
+ </xs:annotation>
521
+ <xs:sequence>
522
+ <xs:element name="name" type="dcc:textType"/>
523
+ <xs:element name="description" type="dcc:richContentType" minOccurs="0"/>
524
+ <xs:element name="norm" type="dcc:notEmptyStringType" minOccurs="0" maxOccurs="unbounded"/>
525
+ <xs:element name="reference" type="dcc:notEmptyStringType" minOccurs="0" maxOccurs="unbounded"/>
526
+ </xs:sequence>
527
+ <xs:attribute name="id" type="xs:ID" use="optional"/>
528
+ <xs:attribute name="refType" type="dcc:refTypesType" use="optional"/>
529
+ </xs:complexType>
530
+
531
+ <xs:complexType name="influenceConditionListType">
532
+ <xs:annotation>
533
+ <xs:documentation>
534
+ List of conditions that influence the measurements.
535
+ </xs:documentation>
536
+ </xs:annotation>
537
+ <xs:sequence>
538
+ <xs:element name="influenceCondition" type="dcc:conditionType" maxOccurs="unbounded"/>
539
+ </xs:sequence>
540
+ </xs:complexType>
541
+
542
+ <xs:complexType name="conditionType">
543
+ <xs:annotation>
544
+ <xs:documentation>
545
+ Condition (e.g. environmental) under which the calibrations were performed which have an influence on
546
+ the measurement results.
547
+ </xs:documentation>
548
+ </xs:annotation>
549
+ <xs:sequence>
550
+ <xs:element name="name" type="dcc:textType"/>
551
+ <xs:element name="description" type="dcc:richContentType" minOccurs="0"/>
552
+ <xs:element name="status" minOccurs="0">
553
+ <xs:simpleType>
554
+ <xs:restriction base="xs:string">
555
+ <xs:enumeration value="beforeAdjustment"/>
556
+ <xs:enumeration value="afterAdjustment"/>
557
+ <xs:enumeration value="beforeRepair"/>
558
+ <xs:enumeration value="afterRepair"/>
559
+ </xs:restriction>
560
+ </xs:simpleType>
561
+ </xs:element>
562
+ <xs:element name="certificate" type="dcc:hashType" minOccurs="0"/>
563
+ <xs:element name="data" type="dcc:dataType"/>
564
+ </xs:sequence>
565
+ <xs:attribute name="id" type="xs:ID" use="optional"/>
566
+ <xs:attribute name="refType" type="dcc:refTypesType" use="optional"/>
567
+ </xs:complexType>
568
+
569
+ <xs:complexType name="resultListType">
570
+ <xs:annotation>
571
+ <xs:documentation>
572
+ List of results of the calibration.
573
+ </xs:documentation>
574
+ </xs:annotation>
575
+ <xs:sequence>
576
+ <xs:element name="result" type="dcc:resultType" maxOccurs="unbounded"/>
577
+ </xs:sequence>
578
+ </xs:complexType>
579
+
580
+ <xs:complexType name="resultType">
581
+ <xs:annotation>
582
+ <xs:documentation>
583
+ The actual result of the calibration.
584
+ </xs:documentation>
585
+ </xs:annotation>
586
+ <xs:sequence>
587
+ <xs:element name="name" type="dcc:textType"/>
588
+ <xs:element name="description" type="dcc:richContentType" minOccurs="0"/>
589
+ <xs:element name="data" type="dcc:dataType"/>
590
+ </xs:sequence>
591
+ <xs:attribute name="id" type="xs:ID" use="optional"/>
592
+ <xs:attribute name="refId" type="xs:IDREFS" use="optional"/>
593
+ <xs:attribute name="refType" type="dcc:refTypesType" use="optional"/>
594
+ </xs:complexType>
595
+
596
+ <xs:complexType name="dataType">
597
+ <xs:choice maxOccurs="unbounded">
598
+ <xs:element name="text" type="dcc:richContentType"/>
599
+ <xs:element name="formula" type="dcc:formulaType"/>
600
+ <xs:element name="byteData" type="dcc:byteDataType"/>
601
+ <xs:element name="xml" type="dcc:xmlType"/>
602
+ <xs:element name="quantity" type="dcc:quantityType"/>
603
+ <xs:element name="list" type="dcc:listType"/>
604
+ </xs:choice>
605
+ <xs:attribute name="id" type="xs:ID" use="optional"/>
606
+ <xs:attribute name="refId" type="xs:IDREFS" use="optional"/>
607
+ <xs:attribute name="refType" type="dcc:refTypesType" use="optional"/>
608
+ </xs:complexType>
609
+
610
+ <xs:complexType name="quantityType">
611
+ <xs:annotation>
612
+ <xs:documentation>
613
+ A single measurement quantity that can contain a D-SI element or text.
614
+ Additionally used methods, used software, influence conditions that only affect this quantity can be
615
+ added.
616
+ Measurement metadata can also be added.
617
+ </xs:documentation>
618
+ </xs:annotation>
619
+ <xs:sequence>
620
+ <xs:element name="name" type="dcc:textType" minOccurs="0"/>
621
+ <xs:element name="description" type="dcc:richContentType" minOccurs="0"/>
622
+ <xs:choice>
623
+ <xs:element name="noQuantity" type="dcc:richContentType"/>
624
+ <xs:element name="charsXMLList" type="dcc:charsXMLListType"/>
625
+ <xs:element ref="si:real"/>
626
+ <xs:element ref="si:list"/>
627
+ <xs:element ref="si:hybrid"/>
628
+ <xs:element ref="si:complex"/>
629
+ <xs:element ref="si:constant"/>
630
+ <xs:element ref="si:realListXMLList"/>
631
+ </xs:choice>
632
+ <xs:element name="relativeUncertainty" type="dcc:relativeUncertaintyType" minOccurs="0" />
633
+ <xs:element name="usedMethods" type="dcc:usedMethodListType" minOccurs="0"/>
634
+ <xs:element name="usedSoftware" type="dcc:softwareListType" minOccurs="0"/>
635
+ <xs:element name="measuringEquipments" type="dcc:measuringEquipmentListType" minOccurs="0"/>
636
+ <xs:element name="influenceConditions" type="dcc:influenceConditionListType" minOccurs="0"/>
637
+ <xs:element name="measurementMetaData" type="dcc:measurementMetaDataListType" minOccurs="0"/>
638
+ </xs:sequence>
639
+ <xs:attribute name="id" type="xs:ID" use="optional"/>
640
+ <xs:attribute name="refId" type="xs:IDREFS" use="optional"/>
641
+ <xs:attribute name="refType" type="dcc:refTypesType" use="optional"/>
642
+ </xs:complexType>
643
+
644
+ <xs:simpleType name="charsXMLListType">
645
+ <xs:annotation>
646
+ <xs:documentation xml:lang="en">
647
+ Type providing listing of strings (xs:string)
648
+ with separation by blank spaces.
649
+ </xs:documentation>
650
+ </xs:annotation>
651
+ <xs:list itemType="xs:string"/>
652
+ </xs:simpleType >
653
+
654
+ <xs:complexType name="relativeUncertaintyType">
655
+ <xs:choice>
656
+ <xs:element name="relativeUncertaintyXmlList" type="si:realListXMLListType" />
657
+ <xs:element name="relativeUncertaintySingle" type="si:realQuantityType" />
658
+ </xs:choice>
659
+ </xs:complexType>
660
+
661
+ <xs:complexType name="listType">
662
+ <xs:annotation>
663
+ <xs:documentation>
664
+ The 'list' element allows to define a collection of measurement results
665
+ which are subject to structures with integrity. Basic structures are
666
+ vector quantities. A recursive usage of 'list' allows the creation of
667
+ matrix and tensor structures as well as structures of higher dimension. The 'list'
668
+ may also be used to give measurement results in combination with some
669
+ ambient conditions at the measurement.
670
+ </xs:documentation>
671
+ </xs:annotation>
672
+ <xs:sequence>
673
+ <xs:element name="name" type="dcc:textType" minOccurs="0"/>
674
+ <xs:element name="description" type="dcc:richContentType" minOccurs="0"/>
675
+ <xs:choice>
676
+ <xs:element name="dateTime" type="xs:dateTime" minOccurs="0"/>
677
+ <xs:element name="dateTimeXMLList" type="dcc:dateTimeXMLListType" minOccurs="0"/>
678
+ </xs:choice>
679
+ <xs:choice maxOccurs="unbounded">
680
+ <xs:element name="list" type="dcc:listType"/>
681
+ <xs:element name="quantity" type="dcc:quantityType"/>
682
+ </xs:choice>
683
+ <xs:element name="usedMethods" type="dcc:usedMethodListType" minOccurs="0"/>
684
+ <xs:element name="usedSoftware" type="dcc:softwareListType" minOccurs="0"/>
685
+ <xs:element name="measuringEquipments" type="dcc:measuringEquipmentListType" minOccurs="0"/>
686
+ <xs:element name="influenceConditions" type="dcc:influenceConditionListType" minOccurs="0"/>
687
+ <xs:element name="measurementMetaData" type="dcc:measurementMetaDataListType" minOccurs="0"/>
688
+ </xs:sequence>
689
+ <xs:attribute name="id" type="xs:ID" use="optional"/>
690
+ <xs:attribute name="refId" type="xs:IDREFS" use="optional"/>
691
+ <xs:attribute name="refType" type="dcc:refTypesType" use="optional"/>
692
+ </xs:complexType>
693
+
694
+ <xs:simpleType name="dateTimeXMLListType">
695
+ <xs:list itemType="xs:dateTime" />
696
+ </xs:simpleType>
697
+
698
+ <xs:complexType name="measurementMetaDataListType">
699
+ <xs:annotation>
700
+ <xs:documentation>
701
+ A list of additional metadata elements.
702
+ </xs:documentation>
703
+ </xs:annotation>
704
+ <xs:sequence>
705
+ <xs:element name="metaData" type="dcc:statementMetaDataType" maxOccurs="unbounded"/>
706
+ </xs:sequence>
707
+ </xs:complexType>
708
+
709
+ <xs:complexType name="statementMetaDataType">
710
+ <xs:sequence>
711
+ <xs:element name="name" type="dcc:textType" minOccurs="0"/>
712
+ <xs:element name="description" type="dcc:richContentType" minOccurs="0"/>
713
+ <xs:element name="countryCodeISO3166_1" type="dcc:stringISO3166Type" minOccurs="0"
714
+ maxOccurs="unbounded"/>
715
+ <xs:element name="convention" type="dcc:notEmptyStringType" minOccurs="0"/>
716
+ <xs:element name="traceable" type="xs:boolean" minOccurs="0"/>
717
+ <xs:element name="norm" type="dcc:notEmptyStringType" minOccurs="0" maxOccurs="unbounded"/>
718
+ <xs:element name="reference" type="dcc:notEmptyStringType" minOccurs="0" maxOccurs="unbounded"/>
719
+ <xs:element name="declaration" type="dcc:richContentType" minOccurs="0"/>
720
+ <xs:choice minOccurs="0">
721
+ <xs:element name="valid" type="xs:boolean"/>
722
+ <xs:element name="validXMLList" type="dcc:booleanXMLListType"/>
723
+ </xs:choice>
724
+ <xs:element name="date" type="xs:date" minOccurs="0"/>
725
+ <xs:element name="period" type="xs:duration" minOccurs="0"/>
726
+ <xs:element name="respAuthority" type="dcc:contactType" minOccurs="0"/>
727
+ <xs:choice minOccurs="0">
728
+ <xs:element name="conformity" type="dcc:stringConformityStatementStatusType"/>
729
+ <xs:element name="conformityXMLList" type="dcc:stringConformityStatementStatusXMLListType"/>
730
+ </xs:choice>
731
+ <xs:element name="data" type="dcc:dataType" minOccurs="0"/>
732
+ <xs:element name="nonSIDefinition" type="dcc:notEmptyStringType" minOccurs="0"/>
733
+ <xs:element name="nonSIUnit" type="dcc:notEmptyStringType" minOccurs="0"/>
734
+ <xs:element name="location" type="dcc:locationType" minOccurs="0"/>
735
+ </xs:sequence>
736
+ <xs:attribute name="id" type="xs:ID" use="optional"/>
737
+ <xs:attribute name="refId" type="xs:IDREFS" use="optional"/>
738
+ <xs:attribute name="refType" type="dcc:refTypesType" use="optional"/>
739
+ </xs:complexType>
740
+
741
+ <xs:simpleType name="booleanXMLListType">
742
+ <xs:list itemType="xs:boolean"/>
743
+ </xs:simpleType>
744
+
745
+ <xs:simpleType name="stringConformityStatementStatusType">
746
+ <xs:restriction base="xs:string">
747
+ <xs:enumeration value="pass"/>
748
+ <xs:enumeration value="fail"/>
749
+ <xs:enumeration value="conditionalPass"/>
750
+ <xs:enumeration value="conditionalFail"/>
751
+ <xs:enumeration value="noPass"/>
752
+ <xs:enumeration value="noFail"/>
753
+ </xs:restriction>
754
+ </xs:simpleType>
755
+
756
+ <xs:simpleType name="stringConformityStatementStatusXMLListType">
757
+ <xs:list itemType="dcc:stringConformityStatementStatusType"/>
758
+ </xs:simpleType>
759
+
760
+ <xs:simpleType name="stringISO3166Type">
761
+ <xs:annotation>
762
+ <xs:documentation>
763
+ A string that is restricted to two upper case letters that contain a country code as defined in
764
+ ISO 3166-1.
765
+ </xs:documentation>
766
+ </xs:annotation>
767
+ <xs:restriction base="xs:string">
768
+ <xs:pattern value="[A-Z]{2}"/>
769
+ </xs:restriction>
770
+ </xs:simpleType>
771
+
772
+ <xs:simpleType name="stringISO639Type">
773
+ <xs:annotation>
774
+ <xs:documentation>
775
+ A string that is restricted to two lower case letters that contain a language code as defined in
776
+ ISO 639.
777
+ </xs:documentation>
778
+ </xs:annotation>
779
+ <xs:restriction base="xs:string">
780
+ <xs:pattern value="[a-z]{2}"/>
781
+ </xs:restriction>
782
+ </xs:simpleType>
783
+
784
+ <xs:complexType name="stringWithLangType">
785
+ <xs:annotation>
786
+ <xs:documentation>
787
+ A string element with an additional lang attribute for localization.
788
+ </xs:documentation>
789
+ </xs:annotation>
790
+ <xs:simpleContent>
791
+ <xs:extension base="xs:string">
792
+ <xs:attribute name="lang" type="dcc:stringISO639Type" use="optional"/>
793
+ <xs:attribute name="id" type="xs:ID" use="optional"/>
794
+ <xs:attribute name="refId" type="xs:IDREFS" use="optional"/>
795
+ <xs:attribute name="refType" type="dcc:refTypesType" use="optional"/>
796
+ </xs:extension>
797
+ </xs:simpleContent>
798
+ </xs:complexType>
799
+
800
+ <xs:complexType name="locationType">
801
+ <xs:choice maxOccurs="unbounded">
802
+ <xs:element name="city" type="dcc:notEmptyStringType"/>
803
+ <xs:element name="countryCode" type="dcc:stringISO3166Type"/>
804
+ <xs:element name="postCode" type="dcc:notEmptyStringType"/>
805
+ <xs:element name="postOfficeBox" type="dcc:notEmptyStringType"/>
806
+ <xs:element name="state" type="dcc:notEmptyStringType"/>
807
+ <xs:element name="street" type="dcc:notEmptyStringType"/>
808
+ <xs:element name="streetNo" type="dcc:notEmptyStringType"/>
809
+ <xs:element name="further" type="dcc:richContentType"/>
810
+ <xs:element name="positionCoordinates" type="dcc:positionCoordinatesType"/>
811
+ </xs:choice>
812
+ </xs:complexType>
813
+
814
+ <xs:complexType name="positionCoordinatesType">
815
+ <xs:sequence>
816
+ <xs:element name="positionCoordinateSystem" type="dcc:notEmptyStringType"/>
817
+ <xs:element name="reference" type="dcc:notEmptyStringType" minOccurs="0"/>
818
+ <xs:element name="declaration" type="dcc:richContentType" minOccurs="0"/>
819
+ <xs:element name="positionCoordinate1" type="si:realQuantityType"/>
820
+ <xs:element name="positionCoordinate2" type="si:realQuantityType"/>
821
+ <xs:element name="positionCoordinate3" type="si:realQuantityType" minOccurs="0"/>
822
+ </xs:sequence>
823
+ <xs:attribute name="id" type="xs:ID" use="optional"/>
824
+ <xs:attribute name="refId" type="xs:IDREFS" use="optional"/>
825
+ <xs:attribute name="refType" type="dcc:refTypesType" use="optional"/>
826
+ </xs:complexType>
827
+
828
+ <xs:complexType name="contactType">
829
+ <xs:sequence>
830
+ <xs:element name="name" type="dcc:textType"/>
831
+ <xs:element name="eMail" type="dcc:notEmptyStringType" minOccurs="0"/>
832
+ <xs:element name="phone" type="dcc:notEmptyStringType" minOccurs="0"/>
833
+ <xs:element name="fax" type="dcc:notEmptyStringType" minOccurs="0"/>
834
+ <xs:element name="location" type="dcc:locationType"/>
835
+ <xs:element name="descriptionData" type="dcc:byteDataType" minOccurs="0"/>
836
+ </xs:sequence>
837
+ <xs:attribute name="id" type="xs:ID" use="optional"/>
838
+ </xs:complexType>
839
+
840
+ <xs:complexType name="contactNotStrictType">
841
+ <xs:sequence>
842
+ <xs:element name="name" type="dcc:textType"/>
843
+ <xs:element name="eMail" type="dcc:notEmptyStringType" minOccurs="0"/>
844
+ <xs:element name="phone" type="dcc:notEmptyStringType" minOccurs="0"/>
845
+ <xs:element name="fax" type="dcc:notEmptyStringType" minOccurs="0"/>
846
+ <xs:element name="location" type="dcc:locationType" minOccurs="0"/>
847
+ <xs:element name="descriptionData" type="dcc:byteDataType" minOccurs="0"/>
848
+ </xs:sequence>
849
+ <xs:attribute name="id" type="xs:ID" use="optional"/>
850
+ <xs:attribute name="refId" type="xs:IDREFS" use="optional"/>
851
+ <xs:attribute name="refType" type="dcc:refTypesType" use="optional"/>
852
+ </xs:complexType>
853
+
854
+ <xs:complexType name="hashType">
855
+ <xs:sequence>
856
+ <xs:element name="referral" type="dcc:textType"/>
857
+ <xs:element name="referralID" type="dcc:notEmptyStringType"/>
858
+ <xs:element name="procedure" type="dcc:notEmptyStringType"/>
859
+ <xs:element name="value" type="dcc:notEmptyStringType"/>
860
+ <xs:element name="description" type="dcc:richContentType" minOccurs="0"/>
861
+ <xs:element name="inValidityRange" type="xs:boolean" minOccurs="0"/>
862
+ <xs:element name="traceable" type="xs:boolean" minOccurs="0"/>
863
+ <xs:element name="linkedReport" type="dcc:hashType" minOccurs="0"/>
864
+ </xs:sequence>
865
+ <xs:attribute name="id" type="xs:ID" use="optional"/>
866
+ <xs:attribute name="refType" type="dcc:refTypesType" use="optional"/>
867
+ </xs:complexType>
868
+
869
+ <xs:complexType name="textType">
870
+ <xs:annotation>
871
+ <xs:documentation>
872
+ The textType defines the type for writing localized text in the DCC.
873
+ In this Type, the element content can be used many times with different language definition (attribute
874
+ lang).
875
+ </xs:documentation>
876
+ </xs:annotation>
877
+ <xs:sequence>
878
+ <xs:element name="content" type="dcc:stringWithLangType" maxOccurs="unbounded"/>
879
+ </xs:sequence>
880
+ <xs:attribute name="id" type="xs:ID" use="optional"/>
881
+ </xs:complexType>
882
+
883
+ <xs:complexType name="richContentType">
884
+ <xs:annotation>
885
+ <xs:documentation>
886
+ Rich content Type can contain files and formulas beside the normal text content.
887
+ </xs:documentation>
888
+ </xs:annotation>
889
+ <xs:sequence>
890
+ <xs:element name="name" type="dcc:textType" minOccurs="0"/>
891
+ <xs:sequence maxOccurs="unbounded">
892
+ <xs:element name="content" type="dcc:stringWithLangType" minOccurs="0" maxOccurs="unbounded"/>
893
+ <xs:element name="file" type="dcc:byteDataType" minOccurs="0" maxOccurs="unbounded"/>
894
+ <xs:element name="formula" type="dcc:formulaType" minOccurs="0" maxOccurs="unbounded"/>
895
+ </xs:sequence>
896
+ </xs:sequence>
897
+ <xs:attribute name="id" type="xs:ID" use="optional"/>
898
+ <xs:attribute name="refId" type="xs:IDREFS" use="optional"/>
899
+ <xs:attribute name="refType" type="dcc:refTypesType" use="optional"/>
900
+ </xs:complexType>
901
+
902
+ <xs:complexType name="byteDataType">
903
+ <xs:annotation>
904
+ <xs:documentation>
905
+ The byteDataType defines a type which allows to add binary encoded files to the measurement result
906
+ section.
907
+ </xs:documentation>
908
+ </xs:annotation>
909
+ <xs:sequence>
910
+ <xs:element name="name" type="dcc:textType" minOccurs="0"/>
911
+ <xs:element name="description" type="dcc:richContentType" minOccurs="0"/>
912
+ <xs:element name="fileName" type="dcc:notEmptyStringType"/>
913
+ <xs:element name="mimeType" type="dcc:notEmptyStringType"/>
914
+ <xs:element name="dataBase64" type="xs:base64Binary"/>
915
+ </xs:sequence>
916
+ <xs:attribute name="id" type="xs:ID" use="optional"/>
917
+ <xs:attribute name="refId" type="xs:IDREFS" use="optional"/>
918
+ <xs:attribute name="refType" type="dcc:refTypesType" use="optional"/>
919
+ </xs:complexType>
920
+
921
+ <xs:complexType name="formulaType">
922
+ <xs:annotation>
923
+ <xs:documentation>
924
+ This data block is used to add formulas and equations to the measurement result section of the DCC.
925
+ </xs:documentation>
926
+ </xs:annotation>
927
+ <xs:choice>
928
+ <xs:element name="latex" type="xs:string"/>
929
+ <xs:element name="mathml" type="dcc:xmlType"/>
930
+ </xs:choice>
931
+ <xs:attribute name="id" type="xs:ID" use="optional"/>
932
+ <xs:attribute name="refId" type="xs:IDREFS" use="optional"/>
933
+ <xs:attribute name="refType" type="dcc:refTypesType" use="optional"/>
934
+ </xs:complexType>
935
+
936
+ <xs:complexType name="xmlType">
937
+ <xs:annotation>
938
+ <xs:documentation>
939
+ This data block is used to add user or application specific XML content.
940
+ </xs:documentation>
941
+ </xs:annotation>
942
+ <xs:sequence>
943
+ <xs:any namespace="##other" minOccurs="0"/>
944
+ </xs:sequence>
945
+ <xs:attribute name="id" type="xs:ID" use="optional"/>
946
+ <xs:attribute name="refId" type="xs:IDREFS" use="optional"/>
947
+ <xs:attribute name="refType" type="dcc:refTypesType" use="optional"/>
948
+ </xs:complexType>
949
+
950
+ <xs:simpleType name="refTypesType">
951
+ <xs:annotation>
952
+ <xs:documentation>
953
+ Allow multiple refTypes for one element as attribute.
954
+ </xs:documentation>
955
+ </xs:annotation>
956
+ <xs:restriction>
957
+ <xs:simpleType>
958
+ <xs:list itemType="xs:string"/>
959
+ </xs:simpleType>
960
+ <xs:minLength value="1"/>
961
+ </xs:restriction>
962
+ </xs:simpleType>
963
+ </xs:schema>