lutaml-model 0.7.6 → 0.8.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 (1573) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/dependent-tests.yml +4 -0
  3. data/.github/workflows/docs.yml +59 -0
  4. data/.github/workflows/downstream-performance.yml +156 -0
  5. data/.github/workflows/performance.yml +33 -0
  6. data/.github/workflows/rake.yml +13 -0
  7. data/.github/workflows/release.yml +5 -0
  8. data/.gitignore +27 -1
  9. data/.rubocop.yml +14 -2
  10. data/.rubocop_todo.yml +574 -88
  11. data/Gemfile +15 -9
  12. data/README.adoc +13522 -6905
  13. data/RELEASE_NOTES.adoc +51 -0
  14. data/Rakefile +2 -0
  15. data/bench/baselines/.gitkeep +0 -0
  16. data/bench/bench_all.rb +52 -0
  17. data/bench/bench_common.rb +147 -0
  18. data/bench/bench_compare.rb +195 -0
  19. data/bench/bench_mml.rb +53 -0
  20. data/bench/bench_niso.rb +54 -0
  21. data/bench/bench_sts.rb +49 -0
  22. data/bench/bench_unitsml.rb +43 -0
  23. data/bench/bench_uniword.rb +69 -0
  24. data/bench/bench_xmi.rb +51 -0
  25. data/bench/gate_config.rb +127 -0
  26. data/benchmark/quick_benchmark.rb +297 -0
  27. data/benchmark/serialization_benchmark.rb +619 -0
  28. data/docs/.rubocop.yml +1 -0
  29. data/docs/.rubocop_todo.yml +7 -0
  30. data/docs/Gemfile +13 -0
  31. data/docs/PERFORMANCE_METHODOLOGY.md +645 -0
  32. data/docs/_config.yml +145 -0
  33. data/docs/_guides/advanced-mapping.adoc +564 -0
  34. data/docs/_guides/character-encoding.adoc +342 -0
  35. data/docs/_guides/collection-serialization.adoc +349 -0
  36. data/docs/_guides/creating-xsd.adoc +1221 -0
  37. data/docs/_guides/index.adoc +71 -0
  38. data/docs/_guides/keyvalue-serialization.adoc +1156 -0
  39. data/docs/_guides/liquid-templates.adoc +505 -0
  40. data/docs/_guides/missing-values-handling.adoc +1531 -0
  41. data/docs/_guides/ooxml-examples.adoc +755 -0
  42. data/docs/{schema_generation.adoc → _guides/schema-generation.adoc} +5 -0
  43. data/docs/{schema_import.adoc → _guides/schema-import.adoc} +276 -4
  44. data/docs/_guides/value-transformations.adoc +1388 -0
  45. data/docs/_guides/xml/namespace-presentation.adoc +476 -0
  46. data/docs/_guides/xml/namespace-semantics.adoc +677 -0
  47. data/docs/_guides/xml/reusable-mapping-classes.adoc +181 -0
  48. data/docs/_guides/xml/schema-location.adoc +245 -0
  49. data/docs/_guides/xml/type-namespaces.adoc +1011 -0
  50. data/docs/_guides/xml-mapping.adoc +1847 -0
  51. data/docs/_guides/xml-mappings-guide.adoc +21 -0
  52. data/docs/_guides/xml-namespace-declarations.adoc +662 -0
  53. data/docs/_guides/xml-namespace-qualification.adoc +720 -0
  54. data/docs/_guides/xml-namespaces.adoc +2613 -0
  55. data/docs/_guides/xml_mappings/01_introduction.adoc +65 -0
  56. data/docs/_guides/xml_mappings/02_core_concepts.adoc +177 -0
  57. data/docs/_guides/xml_mappings/03_architecture.adoc +205 -0
  58. data/docs/_guides/xml_mappings/04_xml_namespace_class.adoc +1754 -0
  59. data/docs/_guides/xml_mappings/05_common_patterns.adoc +1803 -0
  60. data/docs/_guides/xml_mappings/06_migration_guide.adoc +523 -0
  61. data/docs/_guides/xml_mappings/07_best_practices.adoc +959 -0
  62. data/docs/_guides/xml_mappings/08_troubleshooting.adoc +934 -0
  63. data/docs/_migrations/0-1-0-migrate-from-shale.adoc +304 -0
  64. data/docs/_migrations/0-8-0-namespace-restructuring.adoc +1572 -0
  65. data/docs/_migrations/0-8-0-xsd-features.adoc +729 -0
  66. data/docs/_migrations/index.adoc +18 -0
  67. data/docs/_migrations/xsd-type-migration.adoc +1294 -0
  68. data/docs/_pages/attributes.adoc +1156 -0
  69. data/docs/_pages/breaking-changes.adoc +154 -0
  70. data/docs/_pages/collections.adoc +1664 -0
  71. data/docs/_pages/comparison-with-shale.adoc +139 -0
  72. data/docs/_pages/configuration.adoc +192 -0
  73. data/docs/_pages/consolidation-mapping.adoc +252 -0
  74. data/docs/_pages/importable_models.adoc +591 -0
  75. data/docs/_pages/index.adoc +46 -0
  76. data/docs/_pages/installation.adoc +35 -0
  77. data/docs/_pages/models.adoc +332 -0
  78. data/docs/_pages/quick-start.adoc +124 -0
  79. data/docs/_pages/serialization_adapters.adoc +268 -0
  80. data/docs/_pages/troubleshooting.adoc +104 -0
  81. data/docs/_pages/validation.adoc +171 -0
  82. data/docs/_pages/value_types.adoc +1514 -0
  83. data/docs/_pages/xml-conformance.adoc +143 -0
  84. data/docs/_references/architecture.adoc +189 -0
  85. data/docs/{custom_adapters.adoc → _references/custom_adapters.adoc} +6 -1
  86. data/docs/_references/custom_registers.adoc +1026 -0
  87. data/docs/_references/data-modeling-in-a-nutshell.adoc +207 -0
  88. data/docs/_references/format-independent-features.adoc +713 -0
  89. data/docs/_references/index.adoc +47 -0
  90. data/docs/_references/instance-serialization.adoc +120 -0
  91. data/docs/_references/lutaml-namespace-planning.md +120 -0
  92. data/docs/_references/parent-root-context.adoc +122 -0
  93. data/docs/_references/reference_type.adoc +302 -0
  94. data/docs/_references/serialization-model-mappings.adoc +102 -0
  95. data/docs/_references/three-phase-namespace-architecture.adoc +470 -0
  96. data/docs/_references/xml-w3c-namespace-qualification.adoc +66 -0
  97. data/docs/_references/xsd-generation-with-namespace-support.adoc +449 -0
  98. data/docs/_references/xsd-schema-parsing.adoc +1260 -0
  99. data/docs/_references/xsd-type-architecture.adoc +534 -0
  100. data/docs/_tutorials/basic-model-definition.adoc +157 -0
  101. data/docs/_tutorials/custom-types-tutorial.adoc +258 -0
  102. data/docs/_tutorials/first-json-serialization.adoc +192 -0
  103. data/docs/_tutorials/first-xml-serialization.adoc +223 -0
  104. data/docs/_tutorials/index.adoc +60 -0
  105. data/docs/_tutorials/lutaml-xml-architecture.adoc +1354 -0
  106. data/docs/_tutorials/polymorphic-models-tutorial.adoc +253 -0
  107. data/docs/_tutorials/schema-compiler-module-namespaces.adoc +497 -0
  108. data/docs/_tutorials/validation-basics.adoc +232 -0
  109. data/docs/_tutorials/working-with-collections.adoc +201 -0
  110. data/docs/_tutorials/xml-element-attribute-namespace-guide.adoc +279 -0
  111. data/docs/_tutorials/xml-namespaces-basics.adoc +315 -0
  112. data/docs/_tutorials/xml-schema-primer-style-guide.adoc +1394 -0
  113. data/docs/architecture.md +424 -0
  114. data/docs/bugreports/BUGREPORT_element_order_render_empty.md +99 -0
  115. data/docs/cli_compare.adoc +249 -0
  116. data/docs/collection_validation.adoc +366 -0
  117. data/docs/index.adoc +106 -0
  118. data/docs/key_value_data_model.adoc +1229 -0
  119. data/docs/model_transforms.adoc +769 -0
  120. data/docs/namespace-management.adoc +1051 -0
  121. data/docs/xml-schema-qualification.md +171 -0
  122. data/lib/lutaml/{model/hash_adapter → hash_format/adapter}/document.rb +3 -4
  123. data/lib/lutaml/hash_format/adapter/mapping.rb +19 -0
  124. data/lib/lutaml/hash_format/adapter/mapping_rule.rb +9 -0
  125. data/lib/lutaml/{model/hash_adapter → hash_format/adapter}/standard_adapter.rb +3 -3
  126. data/lib/lutaml/hash_format/adapter/transform.rb +9 -0
  127. data/lib/lutaml/hash_format/adapter.rb +13 -0
  128. data/lib/lutaml/hash_format/type/serializers.rb +24 -0
  129. data/lib/lutaml/hash_format.rb +25 -0
  130. data/lib/lutaml/{model/json → json/adapter}/document.rb +3 -3
  131. data/lib/lutaml/json/adapter/mapping.rb +19 -0
  132. data/lib/lutaml/json/adapter/mapping_rule.rb +9 -0
  133. data/lib/lutaml/json/adapter/multi_json_adapter.rb +38 -0
  134. data/lib/lutaml/json/adapter/oj_adapter.rb +38 -0
  135. data/lib/lutaml/json/adapter/standard_adapter.rb +36 -0
  136. data/lib/lutaml/json/adapter/transform.rb +9 -0
  137. data/lib/lutaml/json/adapter.rb +20 -0
  138. data/lib/lutaml/json/schema/json_schema.rb +62 -0
  139. data/lib/lutaml/json/schema.rb +9 -0
  140. data/lib/lutaml/json/type/serializers.rb +72 -0
  141. data/lib/lutaml/json.rb +58 -0
  142. data/lib/lutaml/{model/jsonl → jsonl/adapter}/document.rb +2 -2
  143. data/lib/lutaml/jsonl/adapter/mapping.rb +19 -0
  144. data/lib/lutaml/jsonl/adapter/mapping_rule.rb +9 -0
  145. data/lib/lutaml/{model/jsonl → jsonl/adapter}/standard_adapter.rb +5 -4
  146. data/lib/lutaml/jsonl/adapter/transform.rb +26 -0
  147. data/lib/lutaml/jsonl/adapter.rb +13 -0
  148. data/lib/lutaml/jsonl.rb +21 -0
  149. data/lib/lutaml/key_value/adapter/hash/document.rb +13 -0
  150. data/lib/lutaml/key_value/adapter/hash/mapping.rb +19 -0
  151. data/lib/lutaml/key_value/adapter/hash/mapping_rule.rb +9 -0
  152. data/lib/lutaml/key_value/adapter/hash/standard_adapter.rb +19 -0
  153. data/lib/lutaml/key_value/adapter/hash/transform.rb +10 -0
  154. data/lib/lutaml/key_value/adapter/hash.rb +15 -0
  155. data/lib/lutaml/key_value/adapter/json/document.rb +16 -0
  156. data/lib/lutaml/key_value/adapter/json/mapping.rb +24 -0
  157. data/lib/lutaml/key_value/adapter/json/mapping_rule.rb +14 -0
  158. data/lib/lutaml/key_value/adapter/json/multi_json_adapter.rb +43 -0
  159. data/lib/lutaml/key_value/adapter/json/oj_adapter.rb +43 -0
  160. data/lib/lutaml/key_value/adapter/json/standard_adapter.rb +41 -0
  161. data/lib/lutaml/key_value/adapter/json/transform.rb +14 -0
  162. data/lib/lutaml/key_value/adapter/json.rb +24 -0
  163. data/lib/lutaml/key_value/adapter/jsonl/document.rb +16 -0
  164. data/lib/lutaml/key_value/adapter/jsonl/mapping.rb +19 -0
  165. data/lib/lutaml/key_value/adapter/jsonl/mapping_rule.rb +9 -0
  166. data/lib/lutaml/key_value/adapter/jsonl/standard_adapter.rb +36 -0
  167. data/lib/lutaml/key_value/adapter/jsonl/transform.rb +26 -0
  168. data/lib/lutaml/key_value/adapter/jsonl.rb +17 -0
  169. data/lib/lutaml/key_value/adapter/toml/document.rb +13 -0
  170. data/lib/lutaml/key_value/adapter/toml/mapping.rb +28 -0
  171. data/lib/lutaml/key_value/adapter/toml/mapping_rule.rb +9 -0
  172. data/lib/lutaml/key_value/adapter/toml/toml_rb_adapter.rb +40 -0
  173. data/lib/lutaml/key_value/adapter/toml/tomlib_adapter.rb +46 -0
  174. data/lib/lutaml/key_value/adapter/toml/transform.rb +10 -0
  175. data/lib/lutaml/key_value/adapter/toml.rb +21 -0
  176. data/lib/lutaml/key_value/adapter/yaml/document.rb +12 -0
  177. data/lib/lutaml/key_value/adapter/yaml/mapping.rb +19 -0
  178. data/lib/lutaml/key_value/adapter/yaml/mapping_rule.rb +9 -0
  179. data/lib/lutaml/key_value/adapter/yaml/standard_adapter.rb +41 -0
  180. data/lib/lutaml/key_value/adapter/yaml/transform.rb +10 -0
  181. data/lib/lutaml/key_value/adapter/yaml.rb +17 -0
  182. data/lib/lutaml/key_value/adapter/yamls/document.rb +16 -0
  183. data/lib/lutaml/key_value/adapter/yamls/mapping.rb +19 -0
  184. data/lib/lutaml/key_value/adapter/yamls/mapping_rule.rb +9 -0
  185. data/lib/lutaml/key_value/adapter/yamls/standard_adapter.rb +37 -0
  186. data/lib/lutaml/key_value/adapter/yamls/transform.rb +26 -0
  187. data/lib/lutaml/key_value/adapter/yamls.rb +17 -0
  188. data/lib/lutaml/key_value/adapter.rb +14 -0
  189. data/lib/lutaml/key_value/data_model/element.rb +222 -0
  190. data/lib/lutaml/key_value/data_model.rb +14 -0
  191. data/lib/lutaml/{model/key_value_document.rb → key_value/document.rb} +2 -2
  192. data/lib/lutaml/{model/mapping/key_value_mapping.rb → key_value/mapping.rb} +90 -44
  193. data/lib/lutaml/{model/mapping/key_value_mapping_rule.rb → key_value/mapping_rule.rb} +9 -9
  194. data/lib/lutaml/{model/transform/key_value_transform.rb → key_value/transform.rb} +111 -65
  195. data/lib/lutaml/key_value/transformation/collection_serializer.rb +575 -0
  196. data/lib/lutaml/key_value/transformation/rule_compiler.rb +294 -0
  197. data/lib/lutaml/key_value/transformation/value_serializer.rb +268 -0
  198. data/lib/lutaml/key_value/transformation.rb +1071 -0
  199. data/lib/lutaml/key_value/transformation_builder.rb +30 -0
  200. data/lib/lutaml/key_value.rb +24 -0
  201. data/lib/lutaml/model/attribute.rb +515 -121
  202. data/lib/lutaml/model/attribute_validator.rb +288 -0
  203. data/lib/lutaml/model/cached_type_resolver/concurrent_map_cache.rb +46 -0
  204. data/lib/lutaml/model/cached_type_resolver/mutex_hash_cache.rb +51 -0
  205. data/lib/lutaml/model/cached_type_resolver.rb +144 -0
  206. data/lib/lutaml/model/choice.rb +230 -13
  207. data/lib/lutaml/model/cli.rb +75 -121
  208. data/lib/lutaml/model/collection.rb +526 -42
  209. data/lib/lutaml/model/collection_handler.rb +106 -0
  210. data/lib/lutaml/model/comparable_model.rb +11 -3
  211. data/lib/lutaml/model/comparable_nil.rb +0 -2
  212. data/lib/lutaml/model/compiled_rule.rb +208 -0
  213. data/lib/lutaml/model/config.rb +56 -88
  214. data/lib/lutaml/model/configuration.rb +323 -0
  215. data/lib/lutaml/model/consolidation/attribute_grouper.rb +44 -0
  216. data/lib/lutaml/model/consolidation/dispatcher.rb +45 -0
  217. data/lib/lutaml/model/consolidation/engine.rb +33 -0
  218. data/lib/lutaml/model/consolidation/pattern_chunker.rb +87 -0
  219. data/lib/lutaml/model/consolidation_map.rb +68 -0
  220. data/lib/lutaml/model/consolidation_rule/dispatch_block.rb +34 -0
  221. data/lib/lutaml/model/consolidation_rule/gather_rule.rb +17 -0
  222. data/lib/lutaml/model/consolidation_rule/pattern_content_rule.rb +15 -0
  223. data/lib/lutaml/model/consolidation_rule/pattern_element_rule.rb +17 -0
  224. data/lib/lutaml/model/consolidation_rule.rb +27 -0
  225. data/lib/lutaml/model/constants.rb +5 -3
  226. data/lib/lutaml/model/context_registry.rb +208 -0
  227. data/lib/lutaml/model/error/element_count_out_of_range_error.rb +13 -7
  228. data/lib/lutaml/model/error/format_adapter_not_specified_error.rb +25 -0
  229. data/lib/lutaml/model/error/invalid_attribute_type_error.rb +98 -0
  230. data/lib/lutaml/model/error/invalid_format_error.rb +11 -0
  231. data/lib/lutaml/model/error/liquid_class_not_found_error.rb +9 -0
  232. data/lib/lutaml/model/error/mapping_already_exists_error.rb +6 -0
  233. data/lib/lutaml/model/error/mapping_attribute_missing_error.rb +6 -0
  234. data/lib/lutaml/model/error/mapping_attribute_type_error.rb +6 -0
  235. data/lib/lutaml/model/error/mixed_content_collection_error.rb +17 -0
  236. data/lib/lutaml/model/error/no_attributes_defined_liquid_error.rb +9 -0
  237. data/lib/lutaml/model/error/no_mapping_found_error.rb +9 -0
  238. data/lib/lutaml/model/error/required_attribute_missing_error.rb +9 -0
  239. data/lib/lutaml/model/error/reverse_transform_block_not_defined_error.rb +6 -0
  240. data/lib/lutaml/model/error/reverse_transformation_declaration_error.rb +6 -0
  241. data/lib/lutaml/model/error/sorting_configuration_conflict_error.rb +9 -0
  242. data/lib/lutaml/model/error/transform_block_not_defined_error.rb +6 -0
  243. data/lib/lutaml/model/error/type.rb +17 -0
  244. data/lib/lutaml/model/error/undefined_attribute_error.rb +9 -0
  245. data/lib/lutaml/model/error/unknown_adapter_type_error.rb +82 -3
  246. data/lib/lutaml/model/error/unknown_type_error.rb +25 -2
  247. data/lib/lutaml/model/error/unresolvable_type_error.rb +27 -0
  248. data/lib/lutaml/model/error.rb +2 -33
  249. data/lib/lutaml/model/errors.rb +4 -2
  250. data/lib/lutaml/model/finalization_cache.rb +51 -0
  251. data/lib/lutaml/model/format_registry.rb +236 -2
  252. data/lib/lutaml/model/global_context.rb +446 -0
  253. data/lib/lutaml/model/global_register.rb +106 -5
  254. data/lib/lutaml/model/hash.rb +15 -0
  255. data/lib/lutaml/model/import_registry.rb +250 -0
  256. data/lib/lutaml/model/instrumentation.rb +304 -0
  257. data/lib/lutaml/model/json.rb +17 -13
  258. data/lib/lutaml/model/jsonl.rb +7 -13
  259. data/lib/lutaml/model/liquefiable.rb +100 -12
  260. data/lib/lutaml/model/liquid/mapping.rb +30 -0
  261. data/lib/lutaml/model/liquid.rb +9 -0
  262. data/lib/lutaml/model/mapping/listener.rb +124 -0
  263. data/lib/lutaml/model/mapping/mapping.rb +99 -1
  264. data/lib/lutaml/model/mapping/mapping_rule.rb +172 -17
  265. data/lib/lutaml/model/mapping/model_mapping.rb +133 -0
  266. data/lib/lutaml/model/mapping/model_mapping_rule.rb +57 -0
  267. data/lib/lutaml/model/mapping_hash.rb +3 -1
  268. data/lib/lutaml/model/model_transformer.rb +101 -0
  269. data/lib/lutaml/model/one_entry_cache.rb +57 -0
  270. data/lib/lutaml/model/organization.rb +29 -0
  271. data/lib/lutaml/model/register/model_tree_importer.rb +88 -0
  272. data/lib/lutaml/model/register/namespace_binding.rb +92 -0
  273. data/lib/lutaml/model/register.rb +500 -35
  274. data/lib/lutaml/model/registrable.rb +2 -0
  275. data/lib/lutaml/model/render_policy.rb +154 -0
  276. data/lib/lutaml/model/runtime_compatibility.rb +95 -0
  277. data/lib/lutaml/model/schema/base_schema.rb +1 -3
  278. data/lib/lutaml/model/schema/decorators/attribute.rb +3 -1
  279. data/lib/lutaml/model/schema/decorators/choices.rb +0 -2
  280. data/lib/lutaml/model/schema/decorators/class_definition.rb +4 -5
  281. data/lib/lutaml/model/schema/decorators/definition_collection.rb +7 -7
  282. data/lib/lutaml/model/schema/decorators.rb +15 -0
  283. data/lib/lutaml/model/schema/generator/definition.rb +4 -3
  284. data/lib/lutaml/model/schema/generator/definitions_collection.rb +4 -3
  285. data/lib/lutaml/model/schema/generator/properties_collection.rb +7 -5
  286. data/lib/lutaml/model/schema/generator/property.rb +5 -1
  287. data/lib/lutaml/model/schema/generator.rb +15 -0
  288. data/lib/lutaml/model/schema/helpers.rb +11 -0
  289. data/lib/lutaml/model/schema/json_schema.rb +9 -53
  290. data/lib/lutaml/model/schema/renderer.rb +19 -17
  291. data/lib/lutaml/model/schema/schema_builder/nokogiri.rb +41 -0
  292. data/lib/lutaml/model/schema/schema_builder/oga.rb +92 -0
  293. data/lib/lutaml/model/schema/shared_methods.rb +2 -2
  294. data/lib/lutaml/model/schema/xml_compiler/attribute.rb +33 -12
  295. data/lib/lutaml/model/schema/xml_compiler/attribute_group.rb +3 -1
  296. data/lib/lutaml/model/schema/xml_compiler/choice.rb +4 -2
  297. data/lib/lutaml/model/schema/xml_compiler/complex_type.rb +73 -36
  298. data/lib/lutaml/model/schema/xml_compiler/element.rb +18 -1
  299. data/lib/lutaml/model/schema/xml_compiler/group.rb +20 -4
  300. data/lib/lutaml/model/schema/xml_compiler/registry_generator.rb +127 -0
  301. data/lib/lutaml/model/schema/xml_compiler/restriction.rb +5 -2
  302. data/lib/lutaml/model/schema/xml_compiler/sequence.rb +6 -2
  303. data/lib/lutaml/model/schema/xml_compiler/simple_content.rb +7 -3
  304. data/lib/lutaml/model/schema/xml_compiler/simple_type.rb +127 -51
  305. data/lib/lutaml/model/schema/xml_compiler/xml_namespace_class.rb +110 -0
  306. data/lib/lutaml/model/schema/xml_compiler.rb +256 -82
  307. data/lib/lutaml/model/schema/yaml_schema.rb +10 -50
  308. data/lib/lutaml/model/schema.rb +49 -14
  309. data/lib/lutaml/model/schema_location.rb +12 -60
  310. data/lib/lutaml/model/sequence.rb +102 -30
  311. data/lib/lutaml/model/serializable.rb +1 -3
  312. data/lib/lutaml/model/serialization_adapter.rb +2 -0
  313. data/lib/lutaml/model/serialize/attribute_definition.rb +229 -0
  314. data/lib/lutaml/model/serialize/builder.rb +169 -0
  315. data/lib/lutaml/model/serialize/enum_handling.rb +124 -0
  316. data/lib/lutaml/model/serialize/format_conversion.rb +298 -0
  317. data/lib/lutaml/model/serialize/initialization.rb +308 -0
  318. data/lib/lutaml/model/serialize/model_import.rb +357 -0
  319. data/lib/lutaml/model/serialize/transformation_builder.rb +127 -0
  320. data/lib/lutaml/model/serialize/value_mapping.rb +200 -0
  321. data/lib/lutaml/model/serialize.rb +175 -580
  322. data/lib/lutaml/model/services/base.rb +2 -2
  323. data/lib/lutaml/model/services/default_value_resolver.rb +60 -0
  324. data/lib/lutaml/model/services/logger.rb +10 -7
  325. data/lib/lutaml/model/services/rule_value_extractor.rb +22 -36
  326. data/lib/lutaml/model/services/transformer.rb +50 -9
  327. data/lib/lutaml/model/services/type/validator/string.rb +3 -2
  328. data/lib/lutaml/model/services/type/validator/symbol.rb +30 -0
  329. data/lib/lutaml/model/services/type/validator.rb +5 -2
  330. data/lib/lutaml/model/services/type.rb +9 -0
  331. data/lib/lutaml/model/services/validator.rb +1 -3
  332. data/lib/lutaml/model/services.rb +12 -5
  333. data/lib/lutaml/model/store.rb +59 -0
  334. data/lib/lutaml/model/toml.rb +24 -18
  335. data/lib/lutaml/model/transform/xml_transform.rb +4 -227
  336. data/lib/lutaml/model/transform.rb +49 -17
  337. data/lib/lutaml/model/transformation.rb +84 -0
  338. data/lib/lutaml/model/transformation_builder.rb +55 -0
  339. data/lib/lutaml/model/transformation_registry.rb +314 -0
  340. data/lib/lutaml/model/type/base64_binary.rb +58 -0
  341. data/lib/lutaml/model/type/boolean.rb +9 -16
  342. data/lib/lutaml/model/type/date.rb +49 -9
  343. data/lib/lutaml/model/type/date_time.rb +30 -18
  344. data/lib/lutaml/model/type/decimal.rb +28 -9
  345. data/lib/lutaml/model/type/duration.rb +82 -0
  346. data/lib/lutaml/model/type/float.rb +12 -13
  347. data/lib/lutaml/model/type/hash.rb +10 -17
  348. data/lib/lutaml/model/type/hex_binary.rb +56 -0
  349. data/lib/lutaml/model/type/integer.rb +19 -1
  350. data/lib/lutaml/model/type/qname.rb +85 -0
  351. data/lib/lutaml/model/type/reference.rb +76 -0
  352. data/lib/lutaml/model/type/string.rb +18 -35
  353. data/lib/lutaml/model/type/symbol.rb +67 -0
  354. data/lib/lutaml/model/type/time.rb +19 -22
  355. data/lib/lutaml/model/type/time_without_date.rb +18 -18
  356. data/lib/lutaml/model/type/uninitialized_class_guard.rb +36 -0
  357. data/lib/lutaml/model/type/uri.rb +51 -0
  358. data/lib/lutaml/model/type/value.rb +52 -5
  359. data/lib/lutaml/model/type.rb +98 -13
  360. data/lib/lutaml/model/type_context.rb +279 -0
  361. data/lib/lutaml/model/type_registry.rb +165 -0
  362. data/lib/lutaml/model/type_resolver.rb +185 -0
  363. data/lib/lutaml/model/type_substitution.rb +117 -0
  364. data/lib/lutaml/model/uninitialized_class.rb +1 -1
  365. data/lib/lutaml/model/utils.rb +110 -9
  366. data/lib/lutaml/model/validation.rb +50 -7
  367. data/lib/lutaml/model/value_transformer.rb +25 -0
  368. data/lib/lutaml/model/version.rb +1 -1
  369. data/lib/lutaml/model/yaml.rb +7 -13
  370. data/lib/lutaml/model/yamls.rb +7 -13
  371. data/lib/lutaml/model.rb +227 -25
  372. data/lib/lutaml/{model/toml → toml/adapter}/document.rb +3 -4
  373. data/lib/lutaml/{model/toml → toml/adapter}/mapping.rb +7 -6
  374. data/lib/lutaml/toml/adapter/mapping_rule.rb +9 -0
  375. data/lib/lutaml/toml/adapter/toml_rb_adapter.rb +38 -0
  376. data/lib/lutaml/toml/adapter/tomlib_adapter.rb +54 -0
  377. data/lib/lutaml/toml/adapter/transform.rb +9 -0
  378. data/lib/lutaml/toml/adapter.rb +19 -0
  379. data/lib/lutaml/toml/type/serializers.rb +71 -0
  380. data/lib/lutaml/toml.rb +41 -0
  381. data/lib/lutaml/xml/adapter/adapter_helpers.rb +149 -0
  382. data/lib/lutaml/xml/adapter/base_adapter.rb +672 -0
  383. data/lib/lutaml/xml/adapter/namespace_data.rb +73 -0
  384. data/lib/lutaml/xml/adapter/nokogiri_adapter.rb +1115 -0
  385. data/lib/lutaml/xml/adapter/oga_adapter.rb +849 -0
  386. data/lib/lutaml/xml/adapter/ox_adapter.rb +891 -0
  387. data/lib/lutaml/xml/adapter/rexml_adapter.rb +869 -0
  388. data/lib/lutaml/xml/adapter/xml_serialization.rb +145 -0
  389. data/lib/lutaml/xml/adapter.rb +20 -0
  390. data/lib/lutaml/xml/adapter_element.rb +185 -0
  391. data/lib/lutaml/xml/adapter_loader.rb +53 -0
  392. data/lib/lutaml/xml/attribute_namespace_resolver.rb +139 -0
  393. data/lib/lutaml/xml/blank_namespace.rb +51 -0
  394. data/lib/lutaml/xml/blank_namespace_handler.rb +50 -0
  395. data/lib/lutaml/xml/builder/base.rb +215 -0
  396. data/lib/lutaml/xml/builder/nokogiri.rb +12 -0
  397. data/lib/lutaml/xml/builder/oga.rb +15 -0
  398. data/lib/lutaml/xml/builder/ox.rb +15 -0
  399. data/lib/lutaml/xml/builder/rexml.rb +15 -0
  400. data/lib/lutaml/xml/builder.rb +16 -0
  401. data/lib/lutaml/xml/configurable.rb +214 -0
  402. data/lib/lutaml/xml/data_model.rb +257 -0
  403. data/lib/lutaml/xml/decisions/decision.rb +103 -0
  404. data/lib/lutaml/xml/decisions/decision_context.rb +225 -0
  405. data/lib/lutaml/xml/decisions/decision_engine.rb +67 -0
  406. data/lib/lutaml/xml/decisions/decision_rule.rb +54 -0
  407. data/lib/lutaml/xml/decisions/element_prefix_resolver.rb +85 -0
  408. data/lib/lutaml/xml/decisions/rules/attribute_usage_rule.rb +37 -0
  409. data/lib/lutaml/xml/decisions/rules/default_preference_rule.rb +62 -0
  410. data/lib/lutaml/xml/decisions/rules/element_form_default_rule.rb +66 -0
  411. data/lib/lutaml/xml/decisions/rules/element_form_default_unqualified_rule.rb +73 -0
  412. data/lib/lutaml/xml/decisions/rules/element_form_option_rule.rb +83 -0
  413. data/lib/lutaml/xml/decisions/rules/explicit_option_rule.rb +57 -0
  414. data/lib/lutaml/xml/decisions/rules/format_preservation_rule.rb +74 -0
  415. data/lib/lutaml/xml/decisions/rules/hoisted_on_parent_rule.rb +60 -0
  416. data/lib/lutaml/xml/decisions/rules/inherit_from_parent_rule.rb +52 -0
  417. data/lib/lutaml/xml/decisions/rules/inherit_parent_prefix_rule.rb +69 -0
  418. data/lib/lutaml/xml/decisions/rules/namespace_scope_rule.rb +54 -0
  419. data/lib/lutaml/xml/decisions/rules/reuse_parent_prefix_rule.rb +78 -0
  420. data/lib/lutaml/xml/decisions/rules/used_prefix_rule.rb +70 -0
  421. data/lib/lutaml/xml/decisions/rules.rb +39 -0
  422. data/lib/lutaml/xml/decisions.rb +15 -0
  423. data/lib/lutaml/xml/declaration_handler.rb +217 -0
  424. data/lib/lutaml/xml/declaration_plan/attribute_node.rb +81 -0
  425. data/lib/lutaml/xml/declaration_plan/element_node.rb +101 -0
  426. data/lib/lutaml/xml/declaration_plan.rb +480 -0
  427. data/lib/lutaml/xml/declaration_plan_query.rb +105 -0
  428. data/lib/lutaml/xml/declaration_planner.rb +1849 -0
  429. data/lib/lutaml/xml/doctype_extractor.rb +51 -0
  430. data/lib/lutaml/xml/document.rb +380 -0
  431. data/lib/lutaml/xml/element.rb +93 -0
  432. data/lib/lutaml/xml/element_prefix_resolver.rb +50 -0
  433. data/lib/lutaml/xml/encoding_normalizer.rb +54 -0
  434. data/lib/lutaml/xml/error/invalid_namespace_error.rb +46 -0
  435. data/lib/lutaml/xml/error/invalid_xsd_type_error.rb +43 -0
  436. data/lib/lutaml/xml/error/namespace_mismatch_error.rb +53 -0
  437. data/lib/lutaml/xml/error/xml_configuration_error.rb +17 -0
  438. data/lib/lutaml/xml/error/xml_error.rb +21 -0
  439. data/lib/lutaml/xml/format_chooser.rb +214 -0
  440. data/lib/lutaml/xml/hoisting_algorithm.rb +234 -0
  441. data/lib/lutaml/xml/listener.rb +33 -0
  442. data/lib/lutaml/xml/mapping.rb +1470 -0
  443. data/lib/lutaml/xml/mapping_rule.rb +565 -0
  444. data/lib/lutaml/xml/model_transform.rb +944 -0
  445. data/lib/lutaml/xml/namespace.rb +435 -0
  446. data/lib/lutaml/xml/namespace_class_registry.rb +144 -0
  447. data/lib/lutaml/xml/namespace_collector.rb +611 -0
  448. data/lib/lutaml/xml/namespace_declaration.rb +202 -0
  449. data/lib/lutaml/xml/namespace_declaration_builder.rb +67 -0
  450. data/lib/lutaml/xml/namespace_declaration_data.rb +182 -0
  451. data/lib/lutaml/xml/namespace_inheritance_resolver.rb +142 -0
  452. data/lib/lutaml/xml/namespace_inheritance_strategy.rb +26 -0
  453. data/lib/lutaml/xml/namespace_needs.rb +213 -0
  454. data/lib/lutaml/xml/namespace_resolution_strategy.rb +230 -0
  455. data/lib/lutaml/xml/namespace_resolver.rb +219 -0
  456. data/lib/lutaml/xml/namespace_scope_config.rb +109 -0
  457. data/lib/lutaml/xml/namespace_type_resolver.rb +135 -0
  458. data/lib/lutaml/xml/namespace_usage.rb +121 -0
  459. data/lib/lutaml/xml/nokogiri/element.rb +34 -0
  460. data/lib/lutaml/xml/nokogiri.rb +10 -0
  461. data/lib/lutaml/xml/oga/element.rb +15 -0
  462. data/lib/lutaml/xml/oga.rb +10 -0
  463. data/lib/lutaml/xml/ox/element.rb +15 -0
  464. data/lib/lutaml/xml/ox.rb +10 -0
  465. data/lib/lutaml/xml/parsed_namespace_declaration.rb +129 -0
  466. data/lib/lutaml/xml/parsed_namespace_set.rb +149 -0
  467. data/lib/lutaml/xml/polymorphic_value_handler.rb +41 -0
  468. data/lib/lutaml/xml/qualified_inheritance_strategy.rb +27 -0
  469. data/lib/lutaml/xml/rexml/element.rb +15 -0
  470. data/lib/lutaml/xml/rexml.rb +10 -0
  471. data/lib/lutaml/xml/schema/builder/nokogiri.rb +41 -0
  472. data/lib/lutaml/xml/schema/builder/oga.rb +92 -0
  473. data/lib/lutaml/xml/schema/builder.rb +59 -0
  474. data/lib/lutaml/xml/schema/builtin_types.rb +112 -0
  475. data/lib/lutaml/{model → xml}/schema/relaxng_schema.rb +9 -4
  476. data/lib/lutaml/xml/schema/xsd/all.rb +31 -0
  477. data/lib/lutaml/xml/schema/xsd/annotation.rb +31 -0
  478. data/lib/lutaml/xml/schema/xsd/any.rb +33 -0
  479. data/lib/lutaml/xml/schema/xsd/any_attribute.rb +29 -0
  480. data/lib/lutaml/xml/schema/xsd/appinfo.rb +25 -0
  481. data/lib/lutaml/xml/schema/xsd/attribute.rb +78 -0
  482. data/lib/lutaml/xml/schema/xsd/attribute_group.rb +89 -0
  483. data/lib/lutaml/xml/schema/xsd/base.rb +267 -0
  484. data/lib/lutaml/xml/schema/xsd/choice.rb +68 -0
  485. data/lib/lutaml/xml/schema/xsd/complex_content.rb +39 -0
  486. data/lib/lutaml/xml/schema/xsd/complex_type.rb +157 -0
  487. data/lib/lutaml/xml/schema/xsd/documentation.rb +26 -0
  488. data/lib/lutaml/xml/schema/xsd/element.rb +117 -0
  489. data/lib/lutaml/xml/schema/xsd/enumeration.rb +25 -0
  490. data/lib/lutaml/xml/schema/xsd/errors/enhanced_error.rb +142 -0
  491. data/lib/lutaml/xml/schema/xsd/errors/error_context.rb +67 -0
  492. data/lib/lutaml/xml/schema/xsd/errors/message_builder.rb +103 -0
  493. data/lib/lutaml/xml/schema/xsd/errors/suggestion.rb +67 -0
  494. data/lib/lutaml/xml/schema/xsd/errors/troubleshooters/namespace_troubleshooter.rb +96 -0
  495. data/lib/lutaml/xml/schema/xsd/errors/troubleshooters/troubleshooting_handler.rb +70 -0
  496. data/lib/lutaml/xml/schema/xsd/errors.rb +148 -0
  497. data/lib/lutaml/xml/schema/xsd/extension_complex_content.rb +63 -0
  498. data/lib/lutaml/xml/schema/xsd/extension_simple_content.rb +48 -0
  499. data/lib/lutaml/xml/schema/xsd/field.rb +25 -0
  500. data/lib/lutaml/xml/schema/xsd/file_validation_result.rb +55 -0
  501. data/lib/lutaml/xml/schema/xsd/fraction_digits.rb +29 -0
  502. data/lib/lutaml/xml/schema/xsd/glob.rb +105 -0
  503. data/lib/lutaml/xml/schema/xsd/group.rb +79 -0
  504. data/lib/lutaml/xml/schema/xsd/import.rb +33 -0
  505. data/lib/lutaml/xml/schema/xsd/include.rb +31 -0
  506. data/lib/lutaml/xml/schema/xsd/key.rb +32 -0
  507. data/lib/lutaml/xml/schema/xsd/keyref.rb +33 -0
  508. data/lib/lutaml/xml/schema/xsd/length.rb +27 -0
  509. data/lib/lutaml/xml/schema/xsd/list.rb +28 -0
  510. data/lib/lutaml/xml/schema/xsd/max_exclusive.rb +25 -0
  511. data/lib/lutaml/xml/schema/xsd/max_inclusive.rb +23 -0
  512. data/lib/lutaml/xml/schema/xsd/max_length.rb +25 -0
  513. data/lib/lutaml/xml/schema/xsd/min_exclusive.rb +25 -0
  514. data/lib/lutaml/xml/schema/xsd/min_inclusive.rb +23 -0
  515. data/lib/lutaml/xml/schema/xsd/min_length.rb +25 -0
  516. data/lib/lutaml/xml/schema/xsd/namespace_mapping.rb +37 -0
  517. data/lib/lutaml/xml/schema/xsd/namespace_uri_remapping.rb +79 -0
  518. data/lib/lutaml/xml/schema/xsd/notation.rb +31 -0
  519. data/lib/lutaml/xml/schema/xsd/pattern.rb +25 -0
  520. data/lib/lutaml/xml/schema/xsd/redefine.rb +35 -0
  521. data/lib/lutaml/xml/schema/xsd/restriction_complex_content.rb +56 -0
  522. data/lib/lutaml/xml/schema/xsd/restriction_simple_content.rb +84 -0
  523. data/lib/lutaml/xml/schema/xsd/restriction_simple_type.rb +64 -0
  524. data/lib/lutaml/xml/schema/xsd/schema.rb +373 -0
  525. data/lib/lutaml/xml/schema/xsd/schema_file_validation_results.rb +55 -0
  526. data/lib/lutaml/xml/schema/xsd/schema_location_mapping.rb +74 -0
  527. data/lib/lutaml/xml/schema/xsd/schema_name_resolver.rb +32 -0
  528. data/lib/lutaml/xml/schema/xsd/schema_path.rb +196 -0
  529. data/lib/lutaml/xml/schema/xsd/schema_validator.rb +256 -0
  530. data/lib/lutaml/xml/schema/xsd/selector.rb +27 -0
  531. data/lib/lutaml/xml/schema/xsd/sequence.rb +68 -0
  532. data/lib/lutaml/xml/schema/xsd/serialized_schema.rb +185 -0
  533. data/lib/lutaml/xml/schema/xsd/simple_content.rb +61 -0
  534. data/lib/lutaml/xml/schema/xsd/simple_type.rb +37 -0
  535. data/lib/lutaml/xml/schema/xsd/total_digits.rb +29 -0
  536. data/lib/lutaml/xml/schema/xsd/type_index_entry.rb +40 -0
  537. data/lib/lutaml/xml/schema/xsd/type_resolution_result.rb +112 -0
  538. data/lib/lutaml/xml/schema/xsd/union.rb +30 -0
  539. data/lib/lutaml/xml/schema/xsd/unique.rb +31 -0
  540. data/lib/lutaml/xml/schema/xsd/validation_error.rb +48 -0
  541. data/lib/lutaml/xml/schema/xsd/validation_result.rb +86 -0
  542. data/lib/lutaml/xml/schema/xsd/version.rb +11 -0
  543. data/lib/lutaml/xml/schema/xsd/white_space.rb +27 -0
  544. data/lib/lutaml/xml/schema/xsd.rb +165 -0
  545. data/lib/lutaml/xml/schema/xsd_namespace.rb +29 -0
  546. data/lib/lutaml/xml/schema/xsd_schema.rb +536 -0
  547. data/lib/lutaml/xml/schema.rb +13 -0
  548. data/lib/lutaml/xml/schema_location.rb +155 -0
  549. data/lib/lutaml/xml/serialization/collection_ext.rb +61 -0
  550. data/lib/lutaml/xml/serialization/format_conversion.rb +402 -0
  551. data/lib/lutaml/xml/serialization/instance_methods.rb +297 -0
  552. data/lib/lutaml/xml/serialization/model_import_ext.rb +40 -0
  553. data/lib/lutaml/xml/serialization.rb +15 -0
  554. data/lib/lutaml/xml/shared_dsl.rb +119 -0
  555. data/lib/lutaml/xml/transform.rb +6 -0
  556. data/lib/lutaml/xml/transformation/custom_method_wrapper.rb +262 -0
  557. data/lib/lutaml/xml/transformation/element_builder.rb +586 -0
  558. data/lib/lutaml/xml/transformation/ordered_applier.rb +329 -0
  559. data/lib/lutaml/xml/transformation/rule_applier.rb +379 -0
  560. data/lib/lutaml/xml/transformation/rule_compiler.rb +543 -0
  561. data/lib/lutaml/xml/transformation/skip_logic.rb +70 -0
  562. data/lib/lutaml/xml/transformation/value_serializer.rb +139 -0
  563. data/lib/lutaml/xml/transformation.rb +340 -0
  564. data/lib/lutaml/xml/transformation_builder.rb +28 -0
  565. data/lib/lutaml/xml/transformation_support.rb +14 -0
  566. data/lib/lutaml/xml/type/configurable.rb +157 -0
  567. data/lib/lutaml/xml/type/serializers.rb +98 -0
  568. data/lib/lutaml/xml/type/value_xml_mapping.rb +94 -0
  569. data/lib/lutaml/xml/type_namespace/collector.rb +101 -0
  570. data/lib/lutaml/xml/type_namespace/declaration.rb +61 -0
  571. data/lib/lutaml/xml/type_namespace/planner.rb +121 -0
  572. data/lib/lutaml/xml/type_namespace/reference.rb +71 -0
  573. data/lib/lutaml/xml/type_namespace/resolver.rb +43 -0
  574. data/lib/lutaml/xml/type_namespace.rb +13 -0
  575. data/lib/lutaml/xml/type_namespace_resolver.rb +76 -0
  576. data/lib/lutaml/xml/unqualified_inheritance_strategy.rb +34 -0
  577. data/lib/lutaml/xml/w3c/registration.rb +66 -0
  578. data/lib/lutaml/xml/w3c.rb +398 -0
  579. data/lib/lutaml/xml/xml_attribute.rb +38 -0
  580. data/lib/lutaml/xml/xml_element.rb +447 -0
  581. data/lib/lutaml/xml/xml_namespace.rb +72 -0
  582. data/lib/lutaml/xml.rb +295 -0
  583. data/lib/lutaml/{model/yaml → yaml/adapter}/document.rb +3 -3
  584. data/lib/lutaml/yaml/adapter/mapping.rb +19 -0
  585. data/lib/lutaml/yaml/adapter/mapping_rule.rb +9 -0
  586. data/lib/lutaml/yaml/adapter/standard_adapter.rb +39 -0
  587. data/lib/lutaml/yaml/adapter/transform.rb +9 -0
  588. data/lib/lutaml/yaml/adapter.rb +13 -0
  589. data/lib/lutaml/yaml/schema/yaml_schema.rb +65 -0
  590. data/lib/lutaml/yaml/schema.rb +9 -0
  591. data/lib/lutaml/yaml/type/serializers.rb +60 -0
  592. data/lib/lutaml/yaml.rb +26 -0
  593. data/lib/lutaml/{model/yamls → yamls/adapter}/document.rb +2 -2
  594. data/lib/lutaml/yamls/adapter/mapping.rb +19 -0
  595. data/lib/lutaml/yamls/adapter/mapping_rule.rb +9 -0
  596. data/lib/lutaml/{model/yamls → yamls/adapter}/standard_adapter.rb +6 -5
  597. data/lib/lutaml/yamls/adapter/transform.rb +26 -0
  598. data/lib/lutaml/yamls/adapter.rb +13 -0
  599. data/lib/lutaml/yamls.rb +21 -0
  600. data/lib/tasks/benchmark_runner.rb +161 -0
  601. data/lib/tasks/memory_profile.rb +176 -0
  602. data/lib/tasks/performance.rake +75 -0
  603. data/lib/tasks/performance_benchmark.rb +499 -0
  604. data/lib/tasks/performance_comparator.rb +114 -0
  605. data/lib/tasks/performance_helpers.rb +149 -0
  606. data/lib/tasks/xml_compiler_benchmark.rb +226 -0
  607. data/lib/tasks/xml_optimization_benchmark.rb +178 -0
  608. data/lutaml-model.gemspec +11 -1
  609. data/reference-docs/XML Entity Definitions for Characters (3rd Edition).html +595 -0
  610. data/scripts-xmi-profile/profile_xmi.rb +192 -0
  611. data/scripts-xmi-profile/profile_xmi_simple.rb +210 -0
  612. data/spec/address_person_spec.rb +436 -0
  613. data/spec/address_spec.rb +20 -18
  614. data/spec/ceramic_spec.rb +25 -7
  615. data/spec/fixtures/address.rb +2 -2
  616. data/spec/fixtures/ceramic.rb +6 -2
  617. data/spec/fixtures/person.rb +14 -13
  618. data/spec/fixtures/sample_model.rb +3 -3
  619. data/spec/fixtures/vase.rb +3 -3
  620. data/spec/fixtures/xml/address_example_260.xsd +8 -4
  621. data/spec/fixtures/xml/examples/nested_categories.xml +45 -51
  622. data/spec/fixtures/xml/examples/valid_catalog.xml +27 -41
  623. data/spec/fixtures/xml/math_document_schema.xsd +7 -5
  624. data/spec/fixtures/xml/product_catalog.xsd +19 -138
  625. data/spec/fixtures/xml/schema/xsd/build_test_package.rb +19 -0
  626. data/spec/fixtures/xml/schema/xsd/citygml/2.0/cityGMLBase.xsd +339 -0
  627. data/spec/fixtures/xml/schema/xsd/citygml/appearance/2.0/appearance.xsd +332 -0
  628. data/spec/fixtures/xml/schema/xsd/citygml/bridge/2.0/bridge.xsd +578 -0
  629. data/spec/fixtures/xml/schema/xsd/citygml/building/2.0/building.xsd +535 -0
  630. data/spec/fixtures/xml/schema/xsd/citygml/cityfurniture/2.0/cityFurniture.xsd +57 -0
  631. data/spec/fixtures/xml/schema/xsd/citygml/cityobjectgroup/2.0/cityObjectGroup.xsd +84 -0
  632. data/spec/fixtures/xml/schema/xsd/citygml/examples/2.0/ade/noise-ade/CityGML-NoiseADE.xsd +174 -0
  633. data/spec/fixtures/xml/schema/xsd/citygml/examples/2.0/ade/robotics-ade/stdOp.xsd +46 -0
  634. data/spec/fixtures/xml/schema/xsd/citygml/examples/2.0/ade/robotics-ade/unr.xsd +46 -0
  635. data/spec/fixtures/xml/schema/xsd/citygml/generics/2.0/generics.xsd +184 -0
  636. data/spec/fixtures/xml/schema/xsd/citygml/landuse/2.0/landUse.xsd +50 -0
  637. data/spec/fixtures/xml/schema/xsd/citygml/profiles/base/2.0/CityGML.xsd +30 -0
  638. data/spec/fixtures/xml/schema/xsd/citygml/relief/2.0/relief.xsd +186 -0
  639. data/spec/fixtures/xml/schema/xsd/citygml/texturedsurface/2.0/texturedSurface.xsd +157 -0
  640. data/spec/fixtures/xml/schema/xsd/citygml/transportation/2.0/transportation.xsd +224 -0
  641. data/spec/fixtures/xml/schema/xsd/citygml/tunnel/2.0/tunnel.xsd +530 -0
  642. data/spec/fixtures/xml/schema/xsd/citygml/vegetation/2.0/vegetation.xsd +108 -0
  643. data/spec/fixtures/xml/schema/xsd/citygml/waterbody/2.0/waterBody.xsd +171 -0
  644. data/spec/fixtures/xml/schema/xsd/citygml/xAL/xAL.xsd +1680 -0
  645. data/spec/fixtures/xml/schema/xsd/codesynthesis-gml-3.2.1/gml/3.2.1/basicTypes.xsd +262 -0
  646. data/spec/fixtures/xml/schema/xsd/codesynthesis-gml-3.2.1/gml/3.2.1/coordinateOperations.xsd +519 -0
  647. data/spec/fixtures/xml/schema/xsd/codesynthesis-gml-3.2.1/gml/3.2.1/coordinateReferenceSystems.xsd +367 -0
  648. data/spec/fixtures/xml/schema/xsd/codesynthesis-gml-3.2.1/gml/3.2.1/coordinateSystems.xsd +291 -0
  649. data/spec/fixtures/xml/schema/xsd/codesynthesis-gml-3.2.1/gml/3.2.1/coverage.xsd +287 -0
  650. data/spec/fixtures/xml/schema/xsd/codesynthesis-gml-3.2.1/gml/3.2.1/datums.xsd +281 -0
  651. data/spec/fixtures/xml/schema/xsd/codesynthesis-gml-3.2.1/gml/3.2.1/defaultStyle.xsd +447 -0
  652. data/spec/fixtures/xml/schema/xsd/codesynthesis-gml-3.2.1/gml/3.2.1/deprecatedTypes.xsd +1128 -0
  653. data/spec/fixtures/xml/schema/xsd/codesynthesis-gml-3.2.1/gml/3.2.1/dictionary.xsd +84 -0
  654. data/spec/fixtures/xml/schema/xsd/codesynthesis-gml-3.2.1/gml/3.2.1/direction.xsd +78 -0
  655. data/spec/fixtures/xml/schema/xsd/codesynthesis-gml-3.2.1/gml/3.2.1/dynamicFeature.xsd +103 -0
  656. data/spec/fixtures/xml/schema/xsd/codesynthesis-gml-3.2.1/gml/3.2.1/feature.xsd +88 -0
  657. data/spec/fixtures/xml/schema/xsd/codesynthesis-gml-3.2.1/gml/3.2.1/geometryAggregates.xsd +191 -0
  658. data/spec/fixtures/xml/schema/xsd/codesynthesis-gml-3.2.1/gml/3.2.1/geometryBasic0d1d.xsd +271 -0
  659. data/spec/fixtures/xml/schema/xsd/codesynthesis-gml-3.2.1/gml/3.2.1/geometryBasic2d.xsd +118 -0
  660. data/spec/fixtures/xml/schema/xsd/codesynthesis-gml-3.2.1/gml/3.2.1/geometryComplexes.xsd +89 -0
  661. data/spec/fixtures/xml/schema/xsd/codesynthesis-gml-3.2.1/gml/3.2.1/geometryPrimitives.xsd +841 -0
  662. data/spec/fixtures/xml/schema/xsd/codesynthesis-gml-3.2.1/gml/3.2.1/gml.xsd +15 -0
  663. data/spec/fixtures/xml/schema/xsd/codesynthesis-gml-3.2.1/gml/3.2.1/gmlBase.xsd +179 -0
  664. data/spec/fixtures/xml/schema/xsd/codesynthesis-gml-3.2.1/gml/3.2.1/grids.xsd +58 -0
  665. data/spec/fixtures/xml/schema/xsd/codesynthesis-gml-3.2.1/gml/3.2.1/measures.xsd +63 -0
  666. data/spec/fixtures/xml/schema/xsd/codesynthesis-gml-3.2.1/gml/3.2.1/observation.xsd +90 -0
  667. data/spec/fixtures/xml/schema/xsd/codesynthesis-gml-3.2.1/gml/3.2.1/referenceSystems.xsd +64 -0
  668. data/spec/fixtures/xml/schema/xsd/codesynthesis-gml-3.2.1/gml/3.2.1/temporal.xsd +263 -0
  669. data/spec/fixtures/xml/schema/xsd/codesynthesis-gml-3.2.1/gml/3.2.1/temporalReferenceSystems.xsd +183 -0
  670. data/spec/fixtures/xml/schema/xsd/codesynthesis-gml-3.2.1/gml/3.2.1/temporalTopology.xsd +113 -0
  671. data/spec/fixtures/xml/schema/xsd/codesynthesis-gml-3.2.1/gml/3.2.1/topology.xsd +380 -0
  672. data/spec/fixtures/xml/schema/xsd/codesynthesis-gml-3.2.1/gml/3.2.1/units.xsd +156 -0
  673. data/spec/fixtures/xml/schema/xsd/codesynthesis-gml-3.2.1/gml/3.2.1/valueObjects.xsd +199 -0
  674. data/spec/fixtures/xml/schema/xsd/codesynthesis-gml-3.2.1/iso/19139/20070417/gco/basicTypes.xsd +429 -0
  675. data/spec/fixtures/xml/schema/xsd/codesynthesis-gml-3.2.1/iso/19139/20070417/gco/gco.xsd +12 -0
  676. data/spec/fixtures/xml/schema/xsd/codesynthesis-gml-3.2.1/iso/19139/20070417/gco/gcoBase.xsd +61 -0
  677. data/spec/fixtures/xml/schema/xsd/codesynthesis-gml-3.2.1/iso/19139/20070417/gmd/applicationSchema.xsd +42 -0
  678. data/spec/fixtures/xml/schema/xsd/codesynthesis-gml-3.2.1/iso/19139/20070417/gmd/citation.xsd +275 -0
  679. data/spec/fixtures/xml/schema/xsd/codesynthesis-gml-3.2.1/iso/19139/20070417/gmd/constraints.xsd +106 -0
  680. data/spec/fixtures/xml/schema/xsd/codesynthesis-gml-3.2.1/iso/19139/20070417/gmd/content.xsd +188 -0
  681. data/spec/fixtures/xml/schema/xsd/codesynthesis-gml-3.2.1/iso/19139/20070417/gmd/dataQuality.xsd +554 -0
  682. data/spec/fixtures/xml/schema/xsd/codesynthesis-gml-3.2.1/iso/19139/20070417/gmd/distribution.xsd +202 -0
  683. data/spec/fixtures/xml/schema/xsd/codesynthesis-gml-3.2.1/iso/19139/20070417/gmd/extent.xsd +205 -0
  684. data/spec/fixtures/xml/schema/xsd/codesynthesis-gml-3.2.1/iso/19139/20070417/gmd/freeText.xsd +122 -0
  685. data/spec/fixtures/xml/schema/xsd/codesynthesis-gml-3.2.1/iso/19139/20070417/gmd/gmd.xsd +12 -0
  686. data/spec/fixtures/xml/schema/xsd/codesynthesis-gml-3.2.1/iso/19139/20070417/gmd/identification.xsd +348 -0
  687. data/spec/fixtures/xml/schema/xsd/codesynthesis-gml-3.2.1/iso/19139/20070417/gmd/maintenance.xsd +86 -0
  688. data/spec/fixtures/xml/schema/xsd/codesynthesis-gml-3.2.1/iso/19139/20070417/gmd/metadataApplication.xsd +175 -0
  689. data/spec/fixtures/xml/schema/xsd/codesynthesis-gml-3.2.1/iso/19139/20070417/gmd/metadataEntity.xsd +70 -0
  690. data/spec/fixtures/xml/schema/xsd/codesynthesis-gml-3.2.1/iso/19139/20070417/gmd/metadataExtension.xsd +99 -0
  691. data/spec/fixtures/xml/schema/xsd/codesynthesis-gml-3.2.1/iso/19139/20070417/gmd/portrayalCatalogue.xsd +36 -0
  692. data/spec/fixtures/xml/schema/xsd/codesynthesis-gml-3.2.1/iso/19139/20070417/gmd/referenceSystem.xsd +100 -0
  693. data/spec/fixtures/xml/schema/xsd/codesynthesis-gml-3.2.1/iso/19139/20070417/gmd/spatialRepresentation.xsd +237 -0
  694. data/spec/fixtures/xml/schema/xsd/codesynthesis-gml-3.2.1/iso/19139/20070417/gmx/catalogues.xsd +112 -0
  695. data/spec/fixtures/xml/schema/xsd/codesynthesis-gml-3.2.1/iso/19139/20070417/gmx/codelistItem.xsd +168 -0
  696. data/spec/fixtures/xml/schema/xsd/codesynthesis-gml-3.2.1/iso/19139/20070417/gmx/crsItem.xsd +1030 -0
  697. data/spec/fixtures/xml/schema/xsd/codesynthesis-gml-3.2.1/iso/19139/20070417/gmx/extendedTypes.xsd +75 -0
  698. data/spec/fixtures/xml/schema/xsd/codesynthesis-gml-3.2.1/iso/19139/20070417/gmx/gmx.xsd +2 -0
  699. data/spec/fixtures/xml/schema/xsd/codesynthesis-gml-3.2.1/iso/19139/20070417/gmx/gmxUsage.xsd +127 -0
  700. data/spec/fixtures/xml/schema/xsd/codesynthesis-gml-3.2.1/iso/19139/20070417/gmx/uomItem.xsd +162 -0
  701. data/spec/fixtures/xml/schema/xsd/codesynthesis-gml-3.2.1/iso/19139/20070417/gsr/gsr.xsd +12 -0
  702. data/spec/fixtures/xml/schema/xsd/codesynthesis-gml-3.2.1/iso/19139/20070417/gsr/spatialReferencing.xsd +24 -0
  703. data/spec/fixtures/xml/schema/xsd/codesynthesis-gml-3.2.1/iso/19139/20070417/gss/geometry.xsd +35 -0
  704. data/spec/fixtures/xml/schema/xsd/codesynthesis-gml-3.2.1/iso/19139/20070417/gss/gss.xsd +12 -0
  705. data/spec/fixtures/xml/schema/xsd/codesynthesis-gml-3.2.1/iso/19139/20070417/gts/gts.xsd +12 -0
  706. data/spec/fixtures/xml/schema/xsd/codesynthesis-gml-3.2.1/iso/19139/20070417/gts/temporalObjects.xsd +34 -0
  707. data/spec/fixtures/xml/schema/xsd/codesynthesis-gml-3.2.1/xlink/1.0.0/xlinks.xsd +122 -0
  708. data/spec/fixtures/xml/schema/xsd/i-ur/urbanFunction.xsd +2772 -0
  709. data/spec/fixtures/xml/schema/xsd/i-ur/urbanObject.xsd +3344 -0
  710. data/spec/fixtures/xml/schema/xsd/import-without-location.xsd +9 -0
  711. data/spec/fixtures/xml/schema/xsd/isotc211/19103/-/gco/1.2/baseTypes.xsd +775 -0
  712. data/spec/fixtures/xml/schema/xsd/isotc211/19103/-/gco/1.2/gco.xsd +17 -0
  713. data/spec/fixtures/xml/schema/xsd/isotc211/19103/-/gco/1.2.0/baseTypes.xsd +775 -0
  714. data/spec/fixtures/xml/schema/xsd/isotc211/19103/-/gco/1.2.0/gco.xsd +17 -0
  715. data/spec/fixtures/xml/schema/xsd/isotc211/19103/-/gcx/1.2/extendedTypes.xsd +151 -0
  716. data/spec/fixtures/xml/schema/xsd/isotc211/19103/-/gcx/1.2/gcx.xsd +16 -0
  717. data/spec/fixtures/xml/schema/xsd/isotc211/19103/-/gcx/1.2.0/extendedTypes.xsd +151 -0
  718. data/spec/fixtures/xml/schema/xsd/isotc211/19103/-/gcx/1.2.0/gcx.xsd +16 -0
  719. data/spec/fixtures/xml/schema/xsd/isotc211/19107/-/gss/1.0.0/coordinateGeometry.xsd +1078 -0
  720. data/spec/fixtures/xml/schema/xsd/isotc211/19107/-/gss/1.0.0/geometricAggregates.xsd +141 -0
  721. data/spec/fixtures/xml/schema/xsd/isotc211/19107/-/gss/1.0.0/geometricComplex.xsd +177 -0
  722. data/spec/fixtures/xml/schema/xsd/isotc211/19107/-/gss/1.0.0/geometricPrimative.xsd +526 -0
  723. data/spec/fixtures/xml/schema/xsd/isotc211/19107/-/gss/1.0.0/geometry.xsd +9 -0
  724. data/spec/fixtures/xml/schema/xsd/isotc211/19107/-/gss/1.0.0/geometryRoot.xsd +59 -0
  725. data/spec/fixtures/xml/schema/xsd/isotc211/19107/-/gss/1.0.0/gss.xsd +26 -0
  726. data/spec/fixtures/xml/schema/xsd/isotc211/19107/-/gss/1.0.0/topoComplex.xsd +33 -0
  727. data/spec/fixtures/xml/schema/xsd/isotc211/19107/-/gss/1.0.0/topoPrimative.xsd +432 -0
  728. data/spec/fixtures/xml/schema/xsd/isotc211/19107/-/gss/1.0.0/topoRoot.xsd +9 -0
  729. data/spec/fixtures/xml/schema/xsd/isotc211/19107/-/gss/1.0.0/topology.xsd +15 -0
  730. data/spec/fixtures/xml/schema/xsd/isotc211/19107/-/gss/2.0.0/coordinates.xsd +15 -0
  731. data/spec/fixtures/xml/schema/xsd/isotc211/19107/-/gss/2.0.0/curves.xsd +22 -0
  732. data/spec/fixtures/xml/schema/xsd/isotc211/19107/-/gss/2.0.0/geometry.xsd +41 -0
  733. data/spec/fixtures/xml/schema/xsd/isotc211/19107/-/gss/2.0.0/gss.xsd +21 -0
  734. data/spec/fixtures/xml/schema/xsd/isotc211/19107/-/gss/2.0.0/simplicialGeometry.xsd +63 -0
  735. data/spec/fixtures/xml/schema/xsd/isotc211/19107/-/gss/2.0.0/solids.xsd +21 -0
  736. data/spec/fixtures/xml/schema/xsd/isotc211/19107/-/gss/2.0.0/surfaces.xsd +15 -0
  737. data/spec/fixtures/xml/schema/xsd/isotc211/19107/-/gss/2.0.0/topology.xsd +21 -0
  738. data/spec/fixtures/xml/schema/xsd/isotc211/19110/-/fcc/2.1.0/abstract.xsd +47 -0
  739. data/spec/fixtures/xml/schema/xsd/isotc211/19110/-/fcc/2.1.0/fcc.xsd +12 -0
  740. data/spec/fixtures/xml/schema/xsd/isotc211/19110/-/fcc/2.2/abstract.xsd +45 -0
  741. data/spec/fixtures/xml/schema/xsd/isotc211/19110/-/fcc/2.2/fcc.xsd +11 -0
  742. data/spec/fixtures/xml/schema/xsd/isotc211/19110/-/fcc/2.2.0/abstract.xsd +45 -0
  743. data/spec/fixtures/xml/schema/xsd/isotc211/19110/-/fcc/2.2.0/fcc.xsd +11 -0
  744. data/spec/fixtures/xml/schema/xsd/isotc211/19110/-/gfc/1.0/gfc.xsd +497 -0
  745. data/spec/fixtures/xml/schema/xsd/isotc211/19110/-/gfc/2.1.0/featureCatalogue.xsd +673 -0
  746. data/spec/fixtures/xml/schema/xsd/isotc211/19110/-/gfc/2.1.0/gfc.xsd +19 -0
  747. data/spec/fixtures/xml/schema/xsd/isotc211/19110/-/gfc/2.2/featureCatalogue.xsd +798 -0
  748. data/spec/fixtures/xml/schema/xsd/isotc211/19110/-/gfc/2.2/gfc.xsd +19 -0
  749. data/spec/fixtures/xml/schema/xsd/isotc211/19110/-/gfc/2.2.0/featureCatalogue.xsd +798 -0
  750. data/spec/fixtures/xml/schema/xsd/isotc211/19110/-/gfc/2.2.0/gfc.xsd +19 -0
  751. data/spec/fixtures/xml/schema/xsd/isotc211/19110/fcc/1.0/abstract.xsd +49 -0
  752. data/spec/fixtures/xml/schema/xsd/isotc211/19110/fcc/1.0/fcc.xsd +9 -0
  753. data/spec/fixtures/xml/schema/xsd/isotc211/19110/gfc/1.1/featureCatalogue.xsd +671 -0
  754. data/spec/fixtures/xml/schema/xsd/isotc211/19110/gfc/1.1/gfc.xsd +13 -0
  755. data/spec/fixtures/xml/schema/xsd/isotc211/19111/-/rbc/3.1/rbc.xsd +13 -0
  756. data/spec/fixtures/xml/schema/xsd/isotc211/19111/-/rbc/3.1/rbcStubs.xsd +195 -0
  757. data/spec/fixtures/xml/schema/xsd/isotc211/19111/-/rbc/3.1.0/rbc.xsd +13 -0
  758. data/spec/fixtures/xml/schema/xsd/isotc211/19111/-/rbc/3.1.0/rbcStubs.xsd +195 -0
  759. data/spec/fixtures/xml/schema/xsd/isotc211/19111/-/rbc/3.1.1/AbstractCommonClasses.xsd +282 -0
  760. data/spec/fixtures/xml/schema/xsd/isotc211/19111/-/rbc/3.1.1/commonClasses.xsd +127 -0
  761. data/spec/fixtures/xml/schema/xsd/isotc211/19111/-/rbc/3.1.1/coordOps.xsd +676 -0
  762. data/spec/fixtures/xml/schema/xsd/isotc211/19111/-/rbc/3.1.1/coordRefSys.xsd +498 -0
  763. data/spec/fixtures/xml/schema/xsd/isotc211/19111/-/rbc/3.1.1/coordSys.xsd +844 -0
  764. data/spec/fixtures/xml/schema/xsd/isotc211/19111/-/rbc/3.1.1/coordinates.xsd +101 -0
  765. data/spec/fixtures/xml/schema/xsd/isotc211/19111/-/rbc/3.1.1/datum.xsd +474 -0
  766. data/spec/fixtures/xml/schema/xsd/isotc211/19111/-/rbc/3.1.1/rbc.xsd +18 -0
  767. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/cit/1.3/cit.xsd +12 -0
  768. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/cit/1.3/citation.xsd +445 -0
  769. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/cit/1.3.0/cit.xsd +12 -0
  770. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/cit/1.3.0/citation.xsd +445 -0
  771. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/gex/1.3/extent.xsd +243 -0
  772. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/gex/1.3/gex.xsd +16 -0
  773. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/gex/1.3.0/extent.xsd +243 -0
  774. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/gex/1.3.0/gex.xsd +16 -0
  775. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/gex/1.3.1/extent.xsd +244 -0
  776. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/gex/1.3.1/gex.xsd +15 -0
  777. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/lan/1.3/lan.xsd +13 -0
  778. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/lan/1.3/language.xsd +152 -0
  779. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/lan/1.3.0/lan.xsd +13 -0
  780. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/lan/1.3.0/language.xsd +152 -0
  781. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/mas/1.3/applicationSchema.xsd +58 -0
  782. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/mas/1.3/mas.xsd +16 -0
  783. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/mas/1.3.0/applicationSchema.xsd +58 -0
  784. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/mas/1.3.0/mas.xsd +16 -0
  785. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/mcc/1.3/AbstractCommonClasses.xsd +378 -0
  786. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/mcc/1.3/commonClasses.xsd +205 -0
  787. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/mcc/1.3/mcc.xsd +12 -0
  788. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/mcc/1.3.0/AbstractCommonClasses.xsd +378 -0
  789. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/mcc/1.3.0/commonClasses.xsd +205 -0
  790. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/mcc/1.3.0/mcc.xsd +12 -0
  791. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/mco/1.3/constraints.xsd +171 -0
  792. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/mco/1.3/mco.xsd +14 -0
  793. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/mco/1.3.0/constraints.xsd +171 -0
  794. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/mco/1.3.0/mco.xsd +14 -0
  795. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/mda/1.3/mda.xsd +13 -0
  796. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/mda/1.3/metadataApplication.xsd +207 -0
  797. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/mda/1.3.0/mda.xsd +13 -0
  798. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/mda/1.3.0/metadataApplication.xsd +207 -0
  799. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/mda/1.3.1/mda.xsd +13 -0
  800. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/mda/1.3.1/metadataApplication.xsd +247 -0
  801. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/mdb/1.3/mdb.xsd +11 -0
  802. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/mdb/1.3/metadataBase.xsd +117 -0
  803. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/mdb/1.3/metadataBaseMDAerror.xsd +116 -0
  804. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/mdb/1.3.0/mdb.xsd +11 -0
  805. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/mdb/1.3.0/metadataBase.xsd +117 -0
  806. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/mdb/1.3.0/metadataBaseMDAerror.xsd +116 -0
  807. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/mdb/1.3.1/mdb.xsd +11 -0
  808. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/mdb/1.3.1/metadataBase.xsd +144 -0
  809. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/mex/1.3/metadataExtension.xsd +138 -0
  810. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/mex/1.3/mex.xsd +15 -0
  811. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/mex/1.3.0/metadataExtension.xsd +138 -0
  812. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/mex/1.3.0/mex.xsd +15 -0
  813. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/mmi/1.3/maintenance.xsd +70 -0
  814. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/mmi/1.3/mmi.xsd +14 -0
  815. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/mmi/1.3.0/maintenance.xsd +70 -0
  816. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/mmi/1.3.0/mmi.xsd +14 -0
  817. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/mpc/1.3/mpc.xsd +14 -0
  818. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/mpc/1.3/portrayalCatalogue.xsd +40 -0
  819. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/mpc/1.3.0/mpc.xsd +14 -0
  820. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/mpc/1.3.0/portrayalCatalogue.xsd +40 -0
  821. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/mrc/1.3/content.xsd +368 -0
  822. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/mrc/1.3/mrc.xsd +19 -0
  823. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/mrc/1.3.0/content.xsd +368 -0
  824. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/mrc/1.3.0/mrc.xsd +19 -0
  825. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/mrc/1.3.1/content.xsd +366 -0
  826. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/mrc/1.3.1/mrc.xsd +13 -0
  827. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/mrd/1.3/distribution.xsd +232 -0
  828. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/mrd/1.3/mrd.xsd +13 -0
  829. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/mrd/1.3.0/distribution.xsd +232 -0
  830. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/mrd/1.3.0/mrd.xsd +13 -0
  831. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/mri/1.3/identification.xsd +425 -0
  832. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/mri/1.3/mri.xsd +16 -0
  833. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/mri/1.3.0/identification.xsd +425 -0
  834. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/mri/1.3.0/mri.xsd +16 -0
  835. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/mrl/1.3/lineage.xsd +130 -0
  836. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/mrl/1.3/mrl.xsd +15 -0
  837. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/mrl/1.3.0/lineage.xsd +130 -0
  838. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/mrl/1.3.0/mrl.xsd +15 -0
  839. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/mrs/1.3/mrs.xsd +16 -0
  840. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/mrs/1.3/referenceSystem.xsd +67 -0
  841. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/mrs/1.3.0/mrs.xsd +16 -0
  842. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/mrs/1.3.0/referenceSystem.xsd +67 -0
  843. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/mrs/1.3.1/mrs.xsd +16 -0
  844. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/mrs/1.3.1/referenceSystem.xsd +66 -0
  845. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/msr/1.3/msr.xsd +17 -0
  846. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/msr/1.3/spatialRepresentation.xsd +326 -0
  847. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/msr/1.3.0/msr.xsd +17 -0
  848. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/msr/1.3.0/spatialRepresentation.xsd +326 -0
  849. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/msr/1.3.1/msr.xsd +15 -0
  850. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/msr/1.3.1/spatialRepresentation.xsd +326 -0
  851. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/srv/1.3/serviceInformation.xsd +252 -0
  852. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/srv/1.3/srv.xsd +14 -0
  853. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/srv/1.3.0/serviceInformation.xsd +252 -0
  854. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-1/srv/1.3.0/srv.xsd +14 -0
  855. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-2/gmi/1.0/acquisitionInformation.xsd +415 -0
  856. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-2/gmi/1.0/contentInformation.xsd +147 -0
  857. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-2/gmi/1.0/dataQualityInformation.xsd +214 -0
  858. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-2/gmi/1.0/gmi.xsd +23 -0
  859. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-2/gmi/1.0/metadataEntitySet.xsd +43 -0
  860. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-2/gmi/1.0/spatialRepresentationInformation.xsd +140 -0
  861. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-2/gmi/1.1/acquisitionInformation.xsd +415 -0
  862. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-2/gmi/1.1/contentInformation.xsd +147 -0
  863. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-2/gmi/1.1/dataQualityInformation.xsd +214 -0
  864. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-2/gmi/1.1/gmi.xsd +24 -0
  865. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-2/gmi/1.1/metadataEntitySet.xsd +43 -0
  866. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-2/gmi/1.1/spatialRepresentationInformation.xsd +142 -0
  867. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-2/mac/2.2/acquisitionInformationImagery.xsd +796 -0
  868. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-2/mac/2.2/mac.xsd +11 -0
  869. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-2/mac/2.2.0/acquisitionInformationImagery.xsd +796 -0
  870. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-2/mac/2.2.0/mac.xsd +11 -0
  871. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-2/mac/2.2.1/acquisitionInformationImagery.xsd +799 -0
  872. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-2/mac/2.2.1/mac.xsd +10 -0
  873. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-2/mrc/2.2/contentInformationImagery.xsd +161 -0
  874. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-2/mrc/2.2.0/contentInformationImagery.xsd +161 -0
  875. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-2/mrc/2.2.1/contentInformationImagery.xsd +159 -0
  876. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-2/mrl/2.2/lineageImagery.xsd +312 -0
  877. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-2/mrl/2.2.0/lineageImagery.xsd +312 -0
  878. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-2/msr/2.2/spatialRepresentationImagery.xsd +138 -0
  879. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-2/msr/2.2.0/spatialRepresentationImagery.xsd +138 -0
  880. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-2/msr/2.2.1/spatialRepresentationImagery.xsd +145 -0
  881. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/cat/1.0/cat.xsd +16 -0
  882. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/cat/1.0/catalogues.xsd +59 -0
  883. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/cat/1.0/codelistItem.xsd +63 -0
  884. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/cat/1.0/crsItem.xsd +188 -0
  885. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/cat/1.0/uomItem.xsd +45 -0
  886. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/cit/1.0/cit.xsd +11 -0
  887. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/cit/1.0/citation.xsd +400 -0
  888. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/cit/2.0/cit.xsd +11 -0
  889. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/cit/2.0/citation.xsd +402 -0
  890. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/gco/1.0/baseTypes.xsd +532 -0
  891. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/gco/1.0/baseTypes2014.xsd +531 -0
  892. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/gco/1.0/gco.xsd +16 -0
  893. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/gcx/1.0/extendedTypes.xsd +97 -0
  894. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/gcx/1.0/gcx.xsd +11 -0
  895. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/gex/1.0/extent.xsd +207 -0
  896. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/gex/1.0/gex.xsd +15 -0
  897. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/gmw/1.0/gmlWrapperTypes.xsd +147 -0
  898. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/gmw/1.0/gmlWrapperTypes2014.xsd +147 -0
  899. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/gmw/1.0/gmw.xsd +17 -0
  900. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/lan/1.0/lan.xsd +13 -0
  901. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/lan/1.0/language.xsd +141 -0
  902. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/mac/1.0/acquisitionInformationImagery.xsd +424 -0
  903. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/mac/1.0/mac.xsd +14 -0
  904. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/mac/2.0/acquisitionInformationImagery.xsd +473 -0
  905. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/mac/2.0/event.xsd +106 -0
  906. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/mac/2.0/mac.xsd +15 -0
  907. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/mac/2.0/metadataEntitySet.xsd +46 -0
  908. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/mas/1.0/applicationSchema.xsd +53 -0
  909. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/mas/1.0/mas.xsd +15 -0
  910. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/mcc/1.0/AbstractCommonClasses.xsd +362 -0
  911. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/mcc/1.0/commonClasses.xsd +179 -0
  912. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/mcc/1.0/mcc.xsd +12 -0
  913. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/mco/1.0/constraints.xsd +152 -0
  914. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/mco/1.0/mco.xsd +13 -0
  915. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/md1/1.0/md1.xsd +19 -0
  916. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/md1/1.0/metadataWExtendedType.xsd +10 -0
  917. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/md1/2.0/md1.xsd +19 -0
  918. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/md1/2.0/metadataWExtendedType.xsd +10 -0
  919. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/md2/1.0/md2.xsd +27 -0
  920. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/md2/1.0/metadataWithExtensions.xsd +10 -0
  921. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/md2/2.0/md2.xsd +27 -0
  922. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/md2/2.0/metadataWithExtensions.xsd +10 -0
  923. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/mda/1.0/mda.xsd +13 -0
  924. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/mda/1.0/metadataApplication.xsd +188 -0
  925. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/mda/2.0/mda.xsd +13 -0
  926. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/mda/2.0/metadataApplication.xsd +189 -0
  927. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/mdb/1.0/mdb.xsd +23 -0
  928. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/mdb/1.0/metadataBase.xsd +97 -0
  929. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/mdb/2.0/mdb.xsd +23 -0
  930. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/mdb/2.0/metadataBase.xsd +105 -0
  931. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/mds/1.0/mds.xsd +59 -0
  932. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/mds/1.0/metadataDataServices.xsd +10 -0
  933. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/mds/2.0/mds.xsd +44 -0
  934. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/mds/2.0/metadataDataServices.xsd +10 -0
  935. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/mdt/1.0/mdt.xsd +17 -0
  936. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/mdt/1.0/metadataTransfer.xsd +121 -0
  937. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/mdt/2.0/mdt.xsd +17 -0
  938. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/mdt/2.0/metadataTransfer.xsd +121 -0
  939. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/mex/1.0/metadataExtension.xsd +122 -0
  940. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/mex/1.0/mex.xsd +13 -0
  941. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/mmi/1.0/maintenance.xsd +63 -0
  942. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/mmi/1.0/mmi.xsd +13 -0
  943. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/mpc/1.0/mpc.xsd +13 -0
  944. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/mpc/1.0/portrayalCatalogue.xsd +35 -0
  945. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/mrc/1.0/content.xsd +330 -0
  946. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/mrc/1.0/contentInformationImagery.xsd +160 -0
  947. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/mrc/1.0/mrc.xsd +18 -0
  948. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/mrc/2.0/content.xsd +334 -0
  949. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/mrc/2.0/contentInformationImagery.xsd +143 -0
  950. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/mrc/2.0/mrc.xsd +21 -0
  951. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/mrd/1.0/distribution.xsd +212 -0
  952. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/mrd/1.0/mrd.xsd +13 -0
  953. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/mri/1.0/identification.xsd +385 -0
  954. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/mri/1.0/mri.xsd +15 -0
  955. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/mrl/1.0/lineage.xsd +117 -0
  956. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/mrl/1.0/lineageImagery.xsd +168 -0
  957. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/mrl/1.0/mrl.xsd +14 -0
  958. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/mrl/2.0/lineage.xsd +118 -0
  959. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/mrl/2.0/lineageImagery.xsd +250 -0
  960. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/mrl/2.0/mrl.xsd +14 -0
  961. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/mrs/1.0/mrs.xsd +13 -0
  962. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/mrs/1.0/referenceSystem.xsd +47 -0
  963. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/msr/1.0/msr.xsd +16 -0
  964. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/msr/1.0/spatialRepresentation.xsd +288 -0
  965. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/msr/1.0/spatialRepresentationImagery.xsd +113 -0
  966. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/msr/2.0/msr.xsd +16 -0
  967. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/msr/2.0/spatialRepresentation.xsd +296 -0
  968. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/msr/2.0/spatialRepresentationImagery.xsd +114 -0
  969. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/srv/2.0/serviceInformation.xsd +217 -0
  970. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/srv/2.0/srv.xsd +14 -0
  971. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/srv/2.1/serviceInformation.xsd +220 -0
  972. data/spec/fixtures/xml/schema/xsd/isotc211/19115/-3/srv/2.1/srv.xsd +14 -0
  973. data/spec/fixtures/xml/schema/xsd/isotc211/19119/-/srv/1.0/serviceMetadata.xsd +204 -0
  974. data/spec/fixtures/xml/schema/xsd/isotc211/19119/-/srv/1.0/serviceModel.xsd +230 -0
  975. data/spec/fixtures/xml/schema/xsd/isotc211/19119/-/srv/1.0/srv.xsd +13 -0
  976. data/spec/fixtures/xml/schema/xsd/isotc211/19119/srv/serviceMetadata.xsd +204 -0
  977. data/spec/fixtures/xml/schema/xsd/isotc211/19119/srv/serviceModel.xsd +238 -0
  978. data/spec/fixtures/xml/schema/xsd/isotc211/19119/srv/srv.xsd +13 -0
  979. data/spec/fixtures/xml/schema/xsd/isotc211/19123/-/cis/1.1/cis-0.xsd +17 -0
  980. data/spec/fixtures/xml/schema/xsd/isotc211/19123/-/cis/1.1/codeLists.xsd +68 -0
  981. data/spec/fixtures/xml/schema/xsd/isotc211/19123/-/cis/1.1/gridPoint.xsd +47 -0
  982. data/spec/fixtures/xml/schema/xsd/isotc211/19123/-/cis/1.1.0/cis-0.xsd +17 -0
  983. data/spec/fixtures/xml/schema/xsd/isotc211/19123/-/cis/1.1.0/codeLists.xsd +68 -0
  984. data/spec/fixtures/xml/schema/xsd/isotc211/19123/-/cis/1.1.0/gridPoint.xsd +47 -0
  985. data/spec/fixtures/xml/schema/xsd/isotc211/19123/-/cis/3.1.0/codeLists.xsd +68 -0
  986. data/spec/fixtures/xml/schema/xsd/isotc211/19123/-/cis/3.1.0/gridPoint.xsd +47 -0
  987. data/spec/fixtures/xml/schema/xsd/isotc211/19123/-2/cis/1.0/coverage.xsd +185 -0
  988. data/spec/fixtures/xml/schema/xsd/isotc211/19123/-2/cis/1.0/gmlcovAll.xsd +21 -0
  989. data/spec/fixtures/xml/schema/xsd/isotc211/19123/-2/cis/1.0/grids.xsd +115 -0
  990. data/spec/fixtures/xml/schema/xsd/isotc211/19123/-2/cis/1.1/coverage.xsd +188 -0
  991. data/spec/fixtures/xml/schema/xsd/isotc211/19123/-2/cis/1.1/gmlcovAll.xsd +25 -0
  992. data/spec/fixtures/xml/schema/xsd/isotc211/19123/-2/cis/1.1/grids.xsd +119 -0
  993. data/spec/fixtures/xml/schema/xsd/isotc211/19123/-2/cis/1.1.0/coverage.xsd +188 -0
  994. data/spec/fixtures/xml/schema/xsd/isotc211/19123/-2/cis/1.1.0/gmlcovAll.xsd +25 -0
  995. data/spec/fixtures/xml/schema/xsd/isotc211/19123/-2/cis/1.1.0/grids.xsd +119 -0
  996. data/spec/fixtures/xml/schema/xsd/isotc211/19123/-2/cis/3.1.0/coverage.xsd +188 -0
  997. data/spec/fixtures/xml/schema/xsd/isotc211/19123/-2/cis/3.1.0/gmlcovAll.xsd +23 -0
  998. data/spec/fixtures/xml/schema/xsd/isotc211/19123/-2/cis/3.1.0/grids.xsd +119 -0
  999. data/spec/fixtures/xml/schema/xsd/isotc211/19130/-1/smi/1.1.0/codeList.xsd +134 -0
  1000. data/spec/fixtures/xml/schema/xsd/isotc211/19130/-1/smi/1.1.0/groundControlPoints.xsd +239 -0
  1001. data/spec/fixtures/xml/schema/xsd/isotc211/19130/-1/smi/1.1.0/nonPhysicalSensorModel.xsd +321 -0
  1002. data/spec/fixtures/xml/schema/xsd/isotc211/19130/-1/smi/1.1.0/physicalSensorModel.xsd +62 -0
  1003. data/spec/fixtures/xml/schema/xsd/isotc211/19130/-1/smi/1.1.0/sensorModel.xsd +65 -0
  1004. data/spec/fixtures/xml/schema/xsd/isotc211/19130/-1/smi/1.1.0/sensorParameters.xsd +762 -0
  1005. data/spec/fixtures/xml/schema/xsd/isotc211/19130/-1/smi/1.1.0/spatialElements.xsd +497 -0
  1006. data/spec/fixtures/xml/schema/xsd/isotc211/19130/-1/smi/1.1.1/codeList.xsd +129 -0
  1007. data/spec/fixtures/xml/schema/xsd/isotc211/19130/-1/smi/1.1.1/groundControlPoints.xsd +235 -0
  1008. data/spec/fixtures/xml/schema/xsd/isotc211/19130/-1/smi/1.1.1/nonPhysicalSensorModel.xsd +321 -0
  1009. data/spec/fixtures/xml/schema/xsd/isotc211/19130/-1/smi/1.1.1/physicalSensorModel.xsd +62 -0
  1010. data/spec/fixtures/xml/schema/xsd/isotc211/19130/-1/smi/1.1.1/sensorModel.xsd +65 -0
  1011. data/spec/fixtures/xml/schema/xsd/isotc211/19130/-1/smi/1.1.1/sensorParameters.xsd +762 -0
  1012. data/spec/fixtures/xml/schema/xsd/isotc211/19130/-1/smi/1.1.1/spatialElements.xsd +496 -0
  1013. data/spec/fixtures/xml/schema/xsd/isotc211/19130/-2/smi/1.1.0/codeList.xsd +349 -0
  1014. data/spec/fixtures/xml/schema/xsd/isotc211/19130/-2/smi/1.1.0/sensorModel.xsd +53 -0
  1015. data/spec/fixtures/xml/schema/xsd/isotc211/19130/-2/smi/1.1.0/sensorParameters.xsd +681 -0
  1016. data/spec/fixtures/xml/schema/xsd/isotc211/19130/-2/smi/1.1.0/spatialElements.xsd +902 -0
  1017. data/spec/fixtures/xml/schema/xsd/isotc211/19130/-2/smi/1.1.1/codeList.xsd +344 -0
  1018. data/spec/fixtures/xml/schema/xsd/isotc211/19130/-2/smi/1.1.1/sensorModel.xsd +49 -0
  1019. data/spec/fixtures/xml/schema/xsd/isotc211/19130/-2/smi/1.1.1/sensorParameters.xsd +676 -0
  1020. data/spec/fixtures/xml/schema/xsd/isotc211/19130/-2/smi/1.1.1/spatialElements.xsd +897 -0
  1021. data/spec/fixtures/xml/schema/xsd/isotc211/19130/-3/smi/1.1/smi.xsd +42 -0
  1022. data/spec/fixtures/xml/schema/xsd/isotc211/19130/-3/smi/1.1.0/smi.xsd +42 -0
  1023. data/spec/fixtures/xml/schema/xsd/isotc211/19130/-3/smi/1.1.1/smi.xsd +42 -0
  1024. data/spec/fixtures/xml/schema/xsd/isotc211/19131/-/dps/2.0/dps.xsd +1344 -0
  1025. data/spec/fixtures/xml/schema/xsd/isotc211/19131/-/dps/2.0.0/dps.xsd +1344 -0
  1026. data/spec/fixtures/xml/schema/xsd/isotc211/19131/-/dps/2.2/dps.xsd +1522 -0
  1027. data/spec/fixtures/xml/schema/xsd/isotc211/19131/-/dps/2.2.0/dps.xsd +1522 -0
  1028. data/spec/fixtures/xml/schema/xsd/isotc211/19131/-/dps/2.2.1/dps.xsd +1522 -0
  1029. data/spec/fixtures/xml/schema/xsd/isotc211/19131/-1/dps/2.0/dps.xsd +1339 -0
  1030. data/spec/fixtures/xml/schema/xsd/isotc211/19131/-1/dps/2.2.0/dps.xsd +1540 -0
  1031. data/spec/fixtures/xml/schema/xsd/isotc211/19135/-1/pir/1.0/core.xsd +349 -0
  1032. data/spec/fixtures/xml/schema/xsd/isotc211/19135/-1/pir/1.0/extended.xsd +1074 -0
  1033. data/spec/fixtures/xml/schema/xsd/isotc211/19135/-1/pir/1.0/hierarchy.xsd +57 -0
  1034. data/spec/fixtures/xml/schema/xsd/isotc211/19135/-1/pir/1.0/pir.xsd +13 -0
  1035. data/spec/fixtures/xml/schema/xsd/isotc211/19135/-1/pir/1.1/core.xsd +344 -0
  1036. data/spec/fixtures/xml/schema/xsd/isotc211/19135/-1/pir/1.1/extended.xsd +1076 -0
  1037. data/spec/fixtures/xml/schema/xsd/isotc211/19135/-1/pir/1.1/hierarchy.xsd +58 -0
  1038. data/spec/fixtures/xml/schema/xsd/isotc211/19135/-1/pir/1.1/pir.xsd +15 -0
  1039. data/spec/fixtures/xml/schema/xsd/isotc211/19135/-1/pir/1.1.0/core.xsd +344 -0
  1040. data/spec/fixtures/xml/schema/xsd/isotc211/19135/-1/pir/1.1.0/extended.xsd +1076 -0
  1041. data/spec/fixtures/xml/schema/xsd/isotc211/19135/-1/pir/1.1.0/hierarchy.xsd +58 -0
  1042. data/spec/fixtures/xml/schema/xsd/isotc211/19135/-1/pir/1.1.0/pir.xsd +15 -0
  1043. data/spec/fixtures/xml/schema/xsd/isotc211/19135/-2/pre/1.0/abstract.xsd +42 -0
  1044. data/spec/fixtures/xml/schema/xsd/isotc211/19135/-2/pre/1.0/pre.xsd +4 -0
  1045. data/spec/fixtures/xml/schema/xsd/isotc211/19135/-2/pre/1.2.0/abstract.xsd +44 -0
  1046. data/spec/fixtures/xml/schema/xsd/isotc211/19135/-2/pre/1.2.0/pre.xsd +11 -0
  1047. data/spec/fixtures/xml/schema/xsd/isotc211/19135/-2/reg/1.0/reg.xsd +8 -0
  1048. data/spec/fixtures/xml/schema/xsd/isotc211/19135/-2/reg/1.0/registration.xsd +562 -0
  1049. data/spec/fixtures/xml/schema/xsd/isotc211/19135/-2/reg/1.2.0/reg.xsd +22 -0
  1050. data/spec/fixtures/xml/schema/xsd/isotc211/19135/-2/reg/1.2.0/registration.xsd +590 -0
  1051. data/spec/fixtures/xml/schema/xsd/isotc211/19136/-/gml/1.0/basicTypes.xsd +275 -0
  1052. data/spec/fixtures/xml/schema/xsd/isotc211/19136/-/gml/1.0/coordinateOperations.xsd +534 -0
  1053. data/spec/fixtures/xml/schema/xsd/isotc211/19136/-/gml/1.0/coordinateReferenceSystems.xsd +379 -0
  1054. data/spec/fixtures/xml/schema/xsd/isotc211/19136/-/gml/1.0/coordinateSystems.xsd +303 -0
  1055. data/spec/fixtures/xml/schema/xsd/isotc211/19136/-/gml/1.0/coverage.xsd +298 -0
  1056. data/spec/fixtures/xml/schema/xsd/isotc211/19136/-/gml/1.0/datums.xsd +293 -0
  1057. data/spec/fixtures/xml/schema/xsd/isotc211/19136/-/gml/1.0/defaultStyle.xsd +462 -0
  1058. data/spec/fixtures/xml/schema/xsd/isotc211/19136/-/gml/1.0/deprecatedTypes.xsd +1139 -0
  1059. data/spec/fixtures/xml/schema/xsd/isotc211/19136/-/gml/1.0/dictionary.xsd +95 -0
  1060. data/spec/fixtures/xml/schema/xsd/isotc211/19136/-/gml/1.0/direction.xsd +90 -0
  1061. data/spec/fixtures/xml/schema/xsd/isotc211/19136/-/gml/1.0/dynamicFeature.xsd +114 -0
  1062. data/spec/fixtures/xml/schema/xsd/isotc211/19136/-/gml/1.0/feature.xsd +99 -0
  1063. data/spec/fixtures/xml/schema/xsd/isotc211/19136/-/gml/1.0/geometryAggregates.xsd +203 -0
  1064. data/spec/fixtures/xml/schema/xsd/isotc211/19136/-/gml/1.0/geometryBasic0d1d.xsd +283 -0
  1065. data/spec/fixtures/xml/schema/xsd/isotc211/19136/-/gml/1.0/geometryBasic2d.xsd +130 -0
  1066. data/spec/fixtures/xml/schema/xsd/isotc211/19136/-/gml/1.0/geometryComplexes.xsd +101 -0
  1067. data/spec/fixtures/xml/schema/xsd/isotc211/19136/-/gml/1.0/geometryPrimitives.xsd +852 -0
  1068. data/spec/fixtures/xml/schema/xsd/isotc211/19136/-/gml/1.0/gml.xsd +25 -0
  1069. data/spec/fixtures/xml/schema/xsd/isotc211/19136/-/gml/1.0/gmlBase.xsd +191 -0
  1070. data/spec/fixtures/xml/schema/xsd/isotc211/19136/-/gml/1.0/grids.xsd +70 -0
  1071. data/spec/fixtures/xml/schema/xsd/isotc211/19136/-/gml/1.0/measures.xsd +74 -0
  1072. data/spec/fixtures/xml/schema/xsd/isotc211/19136/-/gml/1.0/observation.xsd +100 -0
  1073. data/spec/fixtures/xml/schema/xsd/isotc211/19136/-/gml/1.0/referenceSystems.xsd +78 -0
  1074. data/spec/fixtures/xml/schema/xsd/isotc211/19136/-/gml/1.0/temporal.xsd +274 -0
  1075. data/spec/fixtures/xml/schema/xsd/isotc211/19136/-/gml/1.0/temporalReferenceSystems.xsd +194 -0
  1076. data/spec/fixtures/xml/schema/xsd/isotc211/19136/-/gml/1.0/temporalTopology.xsd +124 -0
  1077. data/spec/fixtures/xml/schema/xsd/isotc211/19136/-/gml/1.0/topology.xsd +391 -0
  1078. data/spec/fixtures/xml/schema/xsd/isotc211/19136/-/gml/1.0/units.xsd +168 -0
  1079. data/spec/fixtures/xml/schema/xsd/isotc211/19136/-/gml/1.0/valueObjects.xsd +210 -0
  1080. data/spec/fixtures/xml/schema/xsd/isotc211/19136/-1/gmw/1.1/gmlWrapperTypes.xsd +160 -0
  1081. data/spec/fixtures/xml/schema/xsd/isotc211/19136/-1/gmw/1.1/gmw.xsd +27 -0
  1082. data/spec/fixtures/xml/schema/xsd/isotc211/19136/-1/gmw/1.1.0/gmlWrapperTypes.xsd +160 -0
  1083. data/spec/fixtures/xml/schema/xsd/isotc211/19136/-1/gmw/1.1.0/gmw.xsd +27 -0
  1084. data/spec/fixtures/xml/schema/xsd/isotc211/19139/-/cat/1.2/cat.xsd +18 -0
  1085. data/spec/fixtures/xml/schema/xsd/isotc211/19139/-/cat/1.2/catalogues.xsd +63 -0
  1086. data/spec/fixtures/xml/schema/xsd/isotc211/19139/-/cat/1.2/codelistItem.xsd +64 -0
  1087. data/spec/fixtures/xml/schema/xsd/isotc211/19139/-/cat/1.2/crsItem.xsd +200 -0
  1088. data/spec/fixtures/xml/schema/xsd/isotc211/19139/-/cat/1.2/uomItem.xsd +49 -0
  1089. data/spec/fixtures/xml/schema/xsd/isotc211/19139/-/cat/1.2.0/cat.xsd +18 -0
  1090. data/spec/fixtures/xml/schema/xsd/isotc211/19139/-/cat/1.2.0/catalogues.xsd +63 -0
  1091. data/spec/fixtures/xml/schema/xsd/isotc211/19139/-/cat/1.2.0/codelistItem.xsd +64 -0
  1092. data/spec/fixtures/xml/schema/xsd/isotc211/19139/-/cat/1.2.0/crsItem.xsd +200 -0
  1093. data/spec/fixtures/xml/schema/xsd/isotc211/19139/-/cat/1.2.0/uomItem.xsd +49 -0
  1094. data/spec/fixtures/xml/schema/xsd/isotc211/19139/-/gco/1.0/basicTypes.xsd +439 -0
  1095. data/spec/fixtures/xml/schema/xsd/isotc211/19139/-/gco/1.0/gco.xsd +18 -0
  1096. data/spec/fixtures/xml/schema/xsd/isotc211/19139/-/gco/1.0/gcoBase.xsd +71 -0
  1097. data/spec/fixtures/xml/schema/xsd/isotc211/19139/-/gmd/1.0/applicationSchema.xsd +50 -0
  1098. data/spec/fixtures/xml/schema/xsd/isotc211/19139/-/gmd/1.0/citation.xsd +283 -0
  1099. data/spec/fixtures/xml/schema/xsd/isotc211/19139/-/gmd/1.0/constraints.xsd +114 -0
  1100. data/spec/fixtures/xml/schema/xsd/isotc211/19139/-/gmd/1.0/content.xsd +197 -0
  1101. data/spec/fixtures/xml/schema/xsd/isotc211/19139/-/gmd/1.0/dataQuality.xsd +563 -0
  1102. data/spec/fixtures/xml/schema/xsd/isotc211/19139/-/gmd/1.0/distribution.xsd +210 -0
  1103. data/spec/fixtures/xml/schema/xsd/isotc211/19139/-/gmd/1.0/extent.xsd +216 -0
  1104. data/spec/fixtures/xml/schema/xsd/isotc211/19139/-/gmd/1.0/freeText.xsd +130 -0
  1105. data/spec/fixtures/xml/schema/xsd/isotc211/19139/-/gmd/1.0/gmd.xsd +18 -0
  1106. data/spec/fixtures/xml/schema/xsd/isotc211/19139/-/gmd/1.0/identification.xsd +356 -0
  1107. data/spec/fixtures/xml/schema/xsd/isotc211/19139/-/gmd/1.0/maintenance.xsd +95 -0
  1108. data/spec/fixtures/xml/schema/xsd/isotc211/19139/-/gmd/1.0/metadataApplication.xsd +183 -0
  1109. data/spec/fixtures/xml/schema/xsd/isotc211/19139/-/gmd/1.0/metadataEntity.xsd +78 -0
  1110. data/spec/fixtures/xml/schema/xsd/isotc211/19139/-/gmd/1.0/metadataExtension.xsd +107 -0
  1111. data/spec/fixtures/xml/schema/xsd/isotc211/19139/-/gmd/1.0/portrayalCatalogue.xsd +44 -0
  1112. data/spec/fixtures/xml/schema/xsd/isotc211/19139/-/gmd/1.0/referenceSystem.xsd +108 -0
  1113. data/spec/fixtures/xml/schema/xsd/isotc211/19139/-/gmd/1.0/spatialRepresentation.xsd +246 -0
  1114. data/spec/fixtures/xml/schema/xsd/isotc211/19139/-/gmx/1.0/catalogues.xsd +121 -0
  1115. data/spec/fixtures/xml/schema/xsd/isotc211/19139/-/gmx/1.0/codelistItem.xsd +179 -0
  1116. data/spec/fixtures/xml/schema/xsd/isotc211/19139/-/gmx/1.0/crsItem.xsd +1041 -0
  1117. data/spec/fixtures/xml/schema/xsd/isotc211/19139/-/gmx/1.0/extendedTypes.xsd +83 -0
  1118. data/spec/fixtures/xml/schema/xsd/isotc211/19139/-/gmx/1.0/gmx.xsd +18 -0
  1119. data/spec/fixtures/xml/schema/xsd/isotc211/19139/-/gmx/1.0/gmxUsage.xsd +136 -0
  1120. data/spec/fixtures/xml/schema/xsd/isotc211/19139/-/gmx/1.0/uomItem.xsd +173 -0
  1121. data/spec/fixtures/xml/schema/xsd/isotc211/19139/-/gsr/1.0/gsr.xsd +18 -0
  1122. data/spec/fixtures/xml/schema/xsd/isotc211/19139/-/gsr/1.0/spatialReferencing.xsd +34 -0
  1123. data/spec/fixtures/xml/schema/xsd/isotc211/19139/-/gss/1.0/geometry.xsd +45 -0
  1124. data/spec/fixtures/xml/schema/xsd/isotc211/19139/-/gss/1.0/gss.xsd +18 -0
  1125. data/spec/fixtures/xml/schema/xsd/isotc211/19139/-/gts/1.0/gts.xsd +18 -0
  1126. data/spec/fixtures/xml/schema/xsd/isotc211/19139/-/gts/1.0/temporalObjects.xsd +44 -0
  1127. data/spec/fixtures/xml/schema/xsd/isotc211/19155/gpi/1.0/gpi.xsd +16 -0
  1128. data/spec/fixtures/xml/schema/xsd/isotc211/19155/gpi/1.0/placeIdentifier.xsd +75 -0
  1129. data/spec/fixtures/xml/schema/xsd/isotc211/19155/gpi/1.0/sampleGMLApplicationSchema.xsd +83 -0
  1130. data/spec/fixtures/xml/schema/xsd/isotc211/19157/-/dqc/1.2/abstract.xsd +44 -0
  1131. data/spec/fixtures/xml/schema/xsd/isotc211/19157/-/dqc/1.2/dqc.xsd +16 -0
  1132. data/spec/fixtures/xml/schema/xsd/isotc211/19157/-/dqc/1.2.0/abstract.xsd +44 -0
  1133. data/spec/fixtures/xml/schema/xsd/isotc211/19157/-/dqc/1.2.0/dqc.xsd +16 -0
  1134. data/spec/fixtures/xml/schema/xsd/isotc211/19157/-/dqm/1.2/dqm.xsd +19 -0
  1135. data/spec/fixtures/xml/schema/xsd/isotc211/19157/-/dqm/1.2/qualityMeasures.xsd +332 -0
  1136. data/spec/fixtures/xml/schema/xsd/isotc211/19157/-/dqm/1.2.0/dqm.xsd +19 -0
  1137. data/spec/fixtures/xml/schema/xsd/isotc211/19157/-/dqm/1.2.0/qualityMeasures.xsd +332 -0
  1138. data/spec/fixtures/xml/schema/xsd/isotc211/19157/-/mdq/1.2/dataQualityElement.xsd +583 -0
  1139. data/spec/fixtures/xml/schema/xsd/isotc211/19157/-/mdq/1.2/dataQualityEvaluation.xsd +199 -0
  1140. data/spec/fixtures/xml/schema/xsd/isotc211/19157/-/mdq/1.2/dataQualityImagery.xsd +75 -0
  1141. data/spec/fixtures/xml/schema/xsd/isotc211/19157/-/mdq/1.2/dataQualityResult.xsd +213 -0
  1142. data/spec/fixtures/xml/schema/xsd/isotc211/19157/-/mdq/1.2/mdq.xsd +22 -0
  1143. data/spec/fixtures/xml/schema/xsd/isotc211/19157/-/mdq/1.2/metaquality.xsd +93 -0
  1144. data/spec/fixtures/xml/schema/xsd/isotc211/19157/-/mdq/1.2.0/dataQualityElement.xsd +583 -0
  1145. data/spec/fixtures/xml/schema/xsd/isotc211/19157/-/mdq/1.2.0/dataQualityEvaluation.xsd +199 -0
  1146. data/spec/fixtures/xml/schema/xsd/isotc211/19157/-/mdq/1.2.0/dataQualityImagery.xsd +75 -0
  1147. data/spec/fixtures/xml/schema/xsd/isotc211/19157/-/mdq/1.2.0/dataQualityResult.xsd +213 -0
  1148. data/spec/fixtures/xml/schema/xsd/isotc211/19157/-/mdq/1.2.0/mdq.xsd +22 -0
  1149. data/spec/fixtures/xml/schema/xsd/isotc211/19157/-/mdq/1.2.0/metaquality.xsd +93 -0
  1150. data/spec/fixtures/xml/schema/xsd/isotc211/19157/-1/dqc/1.0.0/dataQualityCommon.xsd +33 -0
  1151. data/spec/fixtures/xml/schema/xsd/isotc211/19157/-1/dqc/1.0.0/dqc.xsd +14 -0
  1152. data/spec/fixtures/xml/schema/xsd/isotc211/19157/-1/dqc/1.0.1/dataQualityCommon.xsd +43 -0
  1153. data/spec/fixtures/xml/schema/xsd/isotc211/19157/-1/dqc/1.0.1/dqc.xsd +17 -0
  1154. data/spec/fixtures/xml/schema/xsd/isotc211/19157/-1/dqm/1.0.0/dataQualityMeasure.xsd +376 -0
  1155. data/spec/fixtures/xml/schema/xsd/isotc211/19157/-1/dqm/1.0.0/dqm.xsd +11 -0
  1156. data/spec/fixtures/xml/schema/xsd/isotc211/19157/-1/dqm/1.0.1/dataQualityMeasure.xsd +367 -0
  1157. data/spec/fixtures/xml/schema/xsd/isotc211/19157/-1/dqm/1.0.1/dqm.xsd +11 -0
  1158. data/spec/fixtures/xml/schema/xsd/isotc211/19157/-1/mdq/1.0.0/dataQuality.xsd +570 -0
  1159. data/spec/fixtures/xml/schema/xsd/isotc211/19157/-1/mdq/1.0.0/dataQualityEvaluation.xsd +227 -0
  1160. data/spec/fixtures/xml/schema/xsd/isotc211/19157/-1/mdq/1.0.0/dataQualityResult.xsd +191 -0
  1161. data/spec/fixtures/xml/schema/xsd/isotc211/19157/-1/mdq/1.0.0/mdq.xsd +14 -0
  1162. data/spec/fixtures/xml/schema/xsd/isotc211/19157/-1/mdq/1.0.0/metaquality.xsd +106 -0
  1163. data/spec/fixtures/xml/schema/xsd/isotc211/19157/-1/mdq/1.0.1/dataQuality.xsd +581 -0
  1164. data/spec/fixtures/xml/schema/xsd/isotc211/19157/-1/mdq/1.0.1/dataQualityEvaluation.xsd +227 -0
  1165. data/spec/fixtures/xml/schema/xsd/isotc211/19157/-1/mdq/1.0.1/dataQualityResult.xsd +198 -0
  1166. data/spec/fixtures/xml/schema/xsd/isotc211/19157/-1/mdq/1.0.1/mdq.xsd +14 -0
  1167. data/spec/fixtures/xml/schema/xsd/isotc211/19157/-1/mdq/1.0.1/metaquality.xsd +102 -0
  1168. data/spec/fixtures/xml/schema/xsd/isotc211/19157/-2/dqc/1.0/abstract.xsd +43 -0
  1169. data/spec/fixtures/xml/schema/xsd/isotc211/19157/-2/dqc/1.0/dqc.xsd +15 -0
  1170. data/spec/fixtures/xml/schema/xsd/isotc211/19157/-2/dqm/1.0/dqm.xsd +15 -0
  1171. data/spec/fixtures/xml/schema/xsd/isotc211/19157/-2/dqm/1.0/qualityMeasures.xsd +303 -0
  1172. data/spec/fixtures/xml/schema/xsd/isotc211/19157/-2/mdq/1.0/dataQualityElement.xsd +554 -0
  1173. data/spec/fixtures/xml/schema/xsd/isotc211/19157/-2/mdq/1.0/dataQualityEvaluation.xsd +182 -0
  1174. data/spec/fixtures/xml/schema/xsd/isotc211/19157/-2/mdq/1.0/dataQualityImagery.xsd +72 -0
  1175. data/spec/fixtures/xml/schema/xsd/isotc211/19157/-2/mdq/1.0/dataQualityResult.xsd +140 -0
  1176. data/spec/fixtures/xml/schema/xsd/isotc211/19157/-2/mdq/1.0/mdq.xsd +21 -0
  1177. data/spec/fixtures/xml/schema/xsd/isotc211/19157/-2/mdq/1.0/metaquality.xsd +89 -0
  1178. data/spec/fixtures/xml/schema/xsd/isotc211/19160/-4/patdl/2.7.3/PATDL.v.2.7.3.xsd +517 -0
  1179. data/spec/fixtures/xml/schema/xsd/isotc211/19163/-1/igd/1.1/IE_Imagery.xsd +520 -0
  1180. data/spec/fixtures/xml/schema/xsd/isotc211/19163/-1/igd/1.1/IE_ImageryAndGriddedData.xsd +222 -0
  1181. data/spec/fixtures/xml/schema/xsd/isotc211/19163/-1/igd/1.1/IE_ThematicGriddedData.xsd +117 -0
  1182. data/spec/fixtures/xml/schema/xsd/isotc211/19163/-1/igd/1.1/igd.xsd +14 -0
  1183. data/spec/fixtures/xml/schema/xsd/isotc211/19163/-1/igd/1.1.0/IE_Imagery.xsd +520 -0
  1184. data/spec/fixtures/xml/schema/xsd/isotc211/19163/-1/igd/1.1.0/IE_ImageryAndGriddedData.xsd +222 -0
  1185. data/spec/fixtures/xml/schema/xsd/isotc211/19163/-1/igd/1.1.0/IE_ThematicGriddedData.xsd +117 -0
  1186. data/spec/fixtures/xml/schema/xsd/isotc211/19163/-1/igd/1.1.0/igd.xsd +14 -0
  1187. data/spec/fixtures/xml/schema/xsd/isotc211/19163/-1/igd/1.1.1/IE_Imagery.xsd +518 -0
  1188. data/spec/fixtures/xml/schema/xsd/isotc211/19163/-1/igd/1.1.1/IE_ImageryAndGriddedData.xsd +213 -0
  1189. data/spec/fixtures/xml/schema/xsd/isotc211/19163/-1/igd/1.1.1/IE_ThematicGriddedData.xsd +116 -0
  1190. data/spec/fixtures/xml/schema/xsd/isotc211/19163/-1/igd/1.1.1/igd.xsd +15 -0
  1191. data/spec/fixtures/xml/schema/xsd/isotc211/19165/-1/gpm/1.0.0/geospatialPreservationMetadata.xsd +872 -0
  1192. data/spec/fixtures/xml/schema/xsd/isotc211/19165/-1/gpm/1.0.0/gpm.xsd +11 -0
  1193. data/spec/fixtures/xml/schema/xsd/isotc211/19165/gpm/1.0/geospatialPreservationMetadata.xsd +385 -0
  1194. data/spec/fixtures/xml/schema/xsd/isotc211/19165/gpm/1.0/gpm.xsd +8 -0
  1195. data/spec/fixtures/xml/schema/xsd/metaschema-datatypes.xsd +263 -0
  1196. data/spec/fixtures/xml/schema/xsd/metaschema-markup-line.xsd +9 -0
  1197. data/spec/fixtures/xml/schema/xsd/metaschema-markup-multiline.xsd +135 -0
  1198. data/spec/fixtures/xml/schema/xsd/metaschema-meta-constraints.xsd +39 -0
  1199. data/spec/fixtures/xml/schema/xsd/metaschema-prose-base.xsd +82 -0
  1200. data/spec/fixtures/xml/schema/xsd/metaschema-prose-module.xsd +5 -0
  1201. data/spec/fixtures/xml/schema/xsd/metaschema.xsd +1344 -0
  1202. data/spec/fixtures/xml/schema/xsd/omml_schema.xsd +1528 -0
  1203. data/spec/fixtures/xml/schema/xsd/smil20/rdf.xsd +16 -0
  1204. data/spec/fixtures/xml/schema/xsd/smil20/smil20-AccessKeyTiming.xsd +33 -0
  1205. data/spec/fixtures/xml/schema/xsd/smil20/smil20-AudioLayout.xsd +32 -0
  1206. data/spec/fixtures/xml/schema/xsd/smil20/smil20-BasicAnimation.xsd +35 -0
  1207. data/spec/fixtures/xml/schema/xsd/smil20/smil20-BasicContentControl.xsd +49 -0
  1208. data/spec/fixtures/xml/schema/xsd/smil20/smil20-BasicInlineTiming.xsd +34 -0
  1209. data/spec/fixtures/xml/schema/xsd/smil20/smil20-BasicLayout.xsd +34 -0
  1210. data/spec/fixtures/xml/schema/xsd/smil20/smil20-BasicLinking.xsd +34 -0
  1211. data/spec/fixtures/xml/schema/xsd/smil20/smil20-BasicMedia.xsd +39 -0
  1212. data/spec/fixtures/xml/schema/xsd/smil20/smil20-BasicTimeContainers.xsd +37 -0
  1213. data/spec/fixtures/xml/schema/xsd/smil20/smil20-BasicTransitions.xsd +36 -0
  1214. data/spec/fixtures/xml/schema/xsd/smil20/smil20-BrushMedia.xsd +32 -0
  1215. data/spec/fixtures/xml/schema/xsd/smil20/smil20-CustomTestAttributes.xsd +33 -0
  1216. data/spec/fixtures/xml/schema/xsd/smil20/smil20-EventTiming.xsd +33 -0
  1217. data/spec/fixtures/xml/schema/xsd/smil20/smil20-ExclTimeContainers.xsd +37 -0
  1218. data/spec/fixtures/xml/schema/xsd/smil20/smil20-FillDefault.xsd +32 -0
  1219. data/spec/fixtures/xml/schema/xsd/smil20/smil20-HierarchicalLayout.xsd +46 -0
  1220. data/spec/fixtures/xml/schema/xsd/smil20/smil20-HostLanguage.xsd +85 -0
  1221. data/spec/fixtures/xml/schema/xsd/smil20/smil20-InlineTransitions.xsd +35 -0
  1222. data/spec/fixtures/xml/schema/xsd/smil20/smil20-IntegrationSet.xsd +72 -0
  1223. data/spec/fixtures/xml/schema/xsd/smil20/smil20-LinkingAttributes.xsd +40 -0
  1224. data/spec/fixtures/xml/schema/xsd/smil20/smil20-MediaAccessibility.xsd +34 -0
  1225. data/spec/fixtures/xml/schema/xsd/smil20/smil20-MediaClipMarkers.xsd +35 -0
  1226. data/spec/fixtures/xml/schema/xsd/smil20/smil20-MediaClipping.xsd +35 -0
  1227. data/spec/fixtures/xml/schema/xsd/smil20/smil20-MediaDescription.xsd +35 -0
  1228. data/spec/fixtures/xml/schema/xsd/smil20/smil20-MediaMarkerTiming.xsd +33 -0
  1229. data/spec/fixtures/xml/schema/xsd/smil20/smil20-MediaParam.xsd +34 -0
  1230. data/spec/fixtures/xml/schema/xsd/smil20/smil20-Metainformation.xsd +33 -0
  1231. data/spec/fixtures/xml/schema/xsd/smil20/smil20-MinMaxTiming.xsd +33 -0
  1232. data/spec/fixtures/xml/schema/xsd/smil20/smil20-MultiArcTiming.xsd +33 -0
  1233. data/spec/fixtures/xml/schema/xsd/smil20/smil20-MultiWindowLayout.xsd +32 -0
  1234. data/spec/fixtures/xml/schema/xsd/smil20/smil20-ObjectLinking.xsd +33 -0
  1235. data/spec/fixtures/xml/schema/xsd/smil20/smil20-PrefetchControl.xsd +31 -0
  1236. data/spec/fixtures/xml/schema/xsd/smil20/smil20-RepeatTiming.xsd +34 -0
  1237. data/spec/fixtures/xml/schema/xsd/smil20/smil20-RepeatValueTiming.xsd +33 -0
  1238. data/spec/fixtures/xml/schema/xsd/smil20/smil20-RestartDefault.xsd +32 -0
  1239. data/spec/fixtures/xml/schema/xsd/smil20/smil20-RestartTiming.xsd +32 -0
  1240. data/spec/fixtures/xml/schema/xsd/smil20/smil20-SkipContentControl.xsd +32 -0
  1241. data/spec/fixtures/xml/schema/xsd/smil20/smil20-SplineAnimation.xsd +34 -0
  1242. data/spec/fixtures/xml/schema/xsd/smil20/smil20-Structure.xsd +34 -0
  1243. data/spec/fixtures/xml/schema/xsd/smil20/smil20-SyncBehavior.xsd +33 -0
  1244. data/spec/fixtures/xml/schema/xsd/smil20/smil20-SyncBehaviorDefault.xsd +33 -0
  1245. data/spec/fixtures/xml/schema/xsd/smil20/smil20-SyncMaster.xsd +32 -0
  1246. data/spec/fixtures/xml/schema/xsd/smil20/smil20-SyncbaseTiming.xsd +33 -0
  1247. data/spec/fixtures/xml/schema/xsd/smil20/smil20-TimeContainerAttributes.xsd +35 -0
  1248. data/spec/fixtures/xml/schema/xsd/smil20/smil20-TimeManipulations.xsd +35 -0
  1249. data/spec/fixtures/xml/schema/xsd/smil20/smil20-TransitionModifiers.xsd +37 -0
  1250. data/spec/fixtures/xml/schema/xsd/smil20/smil20-WallclockTiming.xsd +33 -0
  1251. data/spec/fixtures/xml/schema/xsd/smil20/smil20-animate.xsd +229 -0
  1252. data/spec/fixtures/xml/schema/xsd/smil20/smil20-content.xsd +148 -0
  1253. data/spec/fixtures/xml/schema/xsd/smil20/smil20-language.xsd +834 -0
  1254. data/spec/fixtures/xml/schema/xsd/smil20/smil20-layout.xsd +211 -0
  1255. data/spec/fixtures/xml/schema/xsd/smil20/smil20-linking.xsd +117 -0
  1256. data/spec/fixtures/xml/schema/xsd/smil20/smil20-media.xsd +175 -0
  1257. data/spec/fixtures/xml/schema/xsd/smil20/smil20-meta.xsd +44 -0
  1258. data/spec/fixtures/xml/schema/xsd/smil20/smil20-struct.xsd +47 -0
  1259. data/spec/fixtures/xml/schema/xsd/smil20/smil20-timemanip.xsd +34 -0
  1260. data/spec/fixtures/xml/schema/xsd/smil20/smil20-timing.xsd +344 -0
  1261. data/spec/fixtures/xml/schema/xsd/smil20/smil20-transitions.xsd +138 -0
  1262. data/spec/fixtures/xml/schema/xsd/smil20/smil20-utility.xsd +57 -0
  1263. data/spec/fixtures/xml/schema/xsd/smil20/smil20.xsd +86 -0
  1264. data/spec/fixtures/xml/schema/xsd/smil20/xml-mod.xsd +25 -0
  1265. data/spec/fixtures/xml/schema/xsd/sweCommon/2.0.1/advanced_encodings.xsd +186 -0
  1266. data/spec/fixtures/xml/schema/xsd/sweCommon/2.0.1/basic_types.xsd +147 -0
  1267. data/spec/fixtures/xml/schema/xsd/sweCommon/2.0.1/block_components.xsd +163 -0
  1268. data/spec/fixtures/xml/schema/xsd/sweCommon/2.0.1/choice_components.xsd +56 -0
  1269. data/spec/fixtures/xml/schema/xsd/sweCommon/2.0.1/examples/security.xsd +15 -0
  1270. data/spec/fixtures/xml/schema/xsd/sweCommon/2.0.1/record_components.xsd +95 -0
  1271. data/spec/fixtures/xml/schema/xsd/sweCommon/2.0.1/simple_components.xsd +536 -0
  1272. data/spec/fixtures/xml/schema/xsd/sweCommon/2.0.1/simple_encodings.xsd +93 -0
  1273. data/spec/fixtures/xml/schema/xsd/sweCommon/2.0.1/swe.xsd +14 -0
  1274. data/spec/fixtures/xml/schema/xsd/test_schema.lxr +0 -0
  1275. data/spec/fixtures/xml/schema/xsd/test_schema.xsd +24 -0
  1276. data/spec/fixtures/xml/schema/xsd/unitsml-v1.0-csd03.xsd +1333 -0
  1277. data/spec/fixtures/xml/schema/xsd/unitsml-v1.0-csd04.xsd +1334 -0
  1278. data/spec/fixtures/xml/schema/xsd/validation_config.yml +14 -0
  1279. data/spec/fixtures/xml/special_char.xml +3 -4
  1280. data/spec/fixtures/xml/user.xsd +14 -10
  1281. data/spec/lutaml/key_value/transformation/collection_serializer_spec.rb +213 -0
  1282. data/spec/lutaml/key_value/transformation/rule_compiler_spec.rb +229 -0
  1283. data/spec/lutaml/key_value/transformation/value_serializer_spec.rb +216 -0
  1284. data/spec/lutaml/key_value/transformation_spec.rb +292 -0
  1285. data/spec/lutaml/model/attribute_collection_spec.rb +9 -6
  1286. data/spec/lutaml/model/attribute_form_default_spec.rb +252 -0
  1287. data/spec/lutaml/model/attribute_spec.rb +328 -38
  1288. data/spec/lutaml/model/cached_type_resolver_spec.rb +362 -0
  1289. data/spec/lutaml/model/cdata_spec.rb +180 -102
  1290. data/spec/lutaml/model/choice_spec.rb +37 -7
  1291. data/spec/lutaml/model/cli_spec.rb +452 -0
  1292. data/spec/lutaml/model/collection_index_spec.rb +347 -0
  1293. data/spec/lutaml/model/collection_mutation_spec.rb +124 -0
  1294. data/spec/lutaml/model/collection_spec.rb +580 -155
  1295. data/spec/lutaml/model/collection_validation_spec.rb +736 -0
  1296. data/spec/lutaml/model/comparable_model_spec.rb +75 -0
  1297. data/spec/lutaml/model/compiled_rule_spec.rb +364 -0
  1298. data/spec/lutaml/model/consolidation_spec.rb +295 -0
  1299. data/spec/lutaml/model/context_registry_spec.rb +269 -0
  1300. data/spec/lutaml/model/custom_bibtex_adapter_spec.rb +21 -7
  1301. data/spec/lutaml/model/custom_collection_spec.rb +321 -27
  1302. data/spec/lutaml/model/custom_model_spec.rb +13 -10
  1303. data/spec/lutaml/model/custom_serialization_spec.rb +12 -14
  1304. data/spec/lutaml/model/custom_vobject_adapter_spec.rb +36 -16
  1305. data/spec/lutaml/model/default_register_spec.rb +852 -0
  1306. data/spec/lutaml/model/defaults_spec.rb +57 -6
  1307. data/spec/lutaml/model/delegation_spec.rb +184 -110
  1308. data/spec/lutaml/model/derived_attribute_serialization_spec.rb +33 -0
  1309. data/spec/lutaml/model/dynamic_attribute_spec.rb +112 -0
  1310. data/spec/lutaml/model/encoding_spec.rb +281 -0
  1311. data/spec/lutaml/model/enum_spec.rb +46 -2
  1312. data/spec/lutaml/model/except_spec.rb +240 -0
  1313. data/spec/lutaml/model/finalization_cache_spec.rb +88 -0
  1314. data/spec/lutaml/model/global_context_spec.rb +421 -0
  1315. data/spec/lutaml/model/global_register_spec.rb +153 -36
  1316. data/spec/lutaml/model/group_spec.rb +193 -54
  1317. data/spec/lutaml/model/hash/adapter_spec.rb +5 -3
  1318. data/spec/lutaml/model/import_registry_spec.rb +295 -0
  1319. data/spec/lutaml/model/included_spec.rb +10 -17
  1320. data/spec/lutaml/model/inheritance_spec.rb +6 -6
  1321. data/spec/lutaml/model/json_adapter_spec.rb +13 -6
  1322. data/spec/lutaml/model/json_spec.rb +33 -0
  1323. data/spec/lutaml/model/key_value_data_model/key_value_element_spec.rb +320 -0
  1324. data/spec/lutaml/model/key_value_mapping_spec.rb +12 -2
  1325. data/spec/lutaml/model/lazy_collection_spec.rb +208 -0
  1326. data/spec/lutaml/model/liquefiable_spec.rb +263 -24
  1327. data/spec/lutaml/model/logger_spec.rb +68 -0
  1328. data/spec/lutaml/model/map_all_spec.rb +36 -11
  1329. data/spec/lutaml/model/map_content_spec.rb +4 -4
  1330. data/spec/lutaml/model/mapping_rule_perf_guard_spec.rb +71 -0
  1331. data/spec/lutaml/model/mixed_content_spec.rb +481 -171
  1332. data/spec/lutaml/model/model_transformer_spec.rb +678 -0
  1333. data/spec/lutaml/model/multiple_mapping_spec.rb +71 -39
  1334. data/spec/lutaml/model/namespace_versioning_spec.rb +390 -0
  1335. data/spec/lutaml/model/one_entry_cache_spec.rb +114 -0
  1336. data/spec/lutaml/model/ordered_content_spec.rb +115 -24
  1337. data/spec/lutaml/model/polymorphic_spec.rb +29 -6
  1338. data/spec/lutaml/model/processing_instruction_spec.rb +375 -0
  1339. data/spec/lutaml/model/{register/key_value_spec.rb → register_key_value_spec.rb} +57 -5
  1340. data/spec/lutaml/model/register_spec.rb +235 -5
  1341. data/spec/lutaml/model/render_empty_spec.rb +143 -6
  1342. data/spec/lutaml/model/render_nil_spec.rb +15 -10
  1343. data/spec/lutaml/model/root_mappings_spec.rb +16 -6
  1344. data/spec/lutaml/model/rule_value_extractor_spec.rb +13 -44
  1345. data/spec/lutaml/model/runtime_compatibility_spec.rb +36 -0
  1346. data/spec/lutaml/model/schema/generator/definitions_collection_spec.rb +4 -0
  1347. data/spec/lutaml/model/schema/json_schema_spec.rb +7 -1
  1348. data/spec/lutaml/model/schema/relaxng_schema_spec.rb +1 -1
  1349. data/spec/lutaml/model/schema/renderer_spec.rb +128 -0
  1350. data/spec/lutaml/model/schema/xsd_schema_spec.rb +1 -1
  1351. data/spec/lutaml/model/sequence_spec.rb +460 -15
  1352. data/spec/lutaml/model/serializable_spec.rb +212 -12
  1353. data/spec/lutaml/model/serializable_validation_spec.rb +3 -2
  1354. data/spec/lutaml/model/serialize_perf_guard_spec.rb +100 -0
  1355. data/spec/lutaml/model/services/default_value_resolver_spec.rb +162 -0
  1356. data/spec/lutaml/model/simple_model_spec.rb +4 -4
  1357. data/spec/lutaml/model/toml_adapter_spec.rb +11 -4
  1358. data/spec/lutaml/model/toml_spec.rb +46 -2
  1359. data/spec/lutaml/model/transformation_builder_spec.rb +283 -0
  1360. data/spec/lutaml/model/transformation_spec.rb +165 -236
  1361. data/spec/lutaml/model/type/base64_binary_spec.rb +202 -0
  1362. data/spec/lutaml/model/type/date_spec.rb +132 -0
  1363. data/spec/lutaml/model/type/date_time_spec.rb +54 -2
  1364. data/spec/lutaml/model/type/decimal_spec.rb +1 -1
  1365. data/spec/lutaml/model/type/duration_spec.rb +185 -0
  1366. data/spec/lutaml/model/type/hex_binary_spec.rb +225 -0
  1367. data/spec/lutaml/model/type/integer_spec.rb +1 -1
  1368. data/spec/lutaml/model/type/qname_spec.rb +246 -0
  1369. data/spec/lutaml/model/type/reference_integration_spec.rb +532 -0
  1370. data/spec/lutaml/model/type/reference_spec.rb +293 -0
  1371. data/spec/lutaml/model/type/symbol_spec.rb +322 -0
  1372. data/spec/lutaml/model/type/time_spec.rb +6 -5
  1373. data/spec/lutaml/model/type/time_without_date_spec.rb +1 -1
  1374. data/spec/lutaml/model/type/uninitialized_class_spec.rb +110 -0
  1375. data/spec/lutaml/model/type/uri_spec.rb +176 -0
  1376. data/spec/lutaml/model/type/value_xml_mapping_spec.rb +162 -0
  1377. data/spec/lutaml/model/type_context_spec.rb +370 -0
  1378. data/spec/lutaml/model/type_registry_spec.rb +313 -0
  1379. data/spec/lutaml/model/type_resolver_spec.rb +278 -0
  1380. data/spec/lutaml/model/type_spec.rb +7 -8
  1381. data/spec/lutaml/model/type_substitution_spec.rb +172 -0
  1382. data/spec/lutaml/model/utils_spec.rb +39 -24
  1383. data/spec/lutaml/model/value_map_spec.rb +2 -2
  1384. data/spec/lutaml/model/value_transformation_comprehensive_spec.rb +676 -0
  1385. data/spec/lutaml/model/with_child_mapping_spec.rb +1 -1
  1386. data/spec/lutaml/model/xml_decoupling_spec.rb +435 -0
  1387. data/spec/lutaml/model/xsd_form_default_patterns_spec.rb +664 -0
  1388. data/spec/lutaml/model/xsd_patterns_spec.rb +278 -0
  1389. data/spec/lutaml/model/xsd_type_spec.rb +345 -0
  1390. data/spec/lutaml/model/xsd_type_validation_spec.rb +442 -0
  1391. data/spec/lutaml/model/yamls/standard_adapter_spec.rb +2 -2
  1392. data/spec/lutaml/xml/adapter/nokogiri_adapter_spec.rb +130 -0
  1393. data/spec/lutaml/xml/adapter/oga_adapter_spec.rb +135 -0
  1394. data/spec/lutaml/xml/adapter/ox_adapter_spec.rb +101 -0
  1395. data/spec/lutaml/xml/adapter/rexml_adapter_spec.rb +101 -0
  1396. data/spec/lutaml/xml/adapter/xml_namespace_spec.rb +531 -0
  1397. data/spec/lutaml/xml/builder/builder_spec.rb +216 -0
  1398. data/spec/lutaml/xml/compiled_rule_namespace_spec.rb +405 -0
  1399. data/spec/lutaml/xml/conformance/xml_namespaces_spec.rb +580 -0
  1400. data/spec/lutaml/xml/conformance/xml_schema_instance_spec.rb +266 -0
  1401. data/spec/lutaml/xml/data_model_spec.rb +300 -0
  1402. data/spec/lutaml/xml/decisions/decision_engine_spec.rb +242 -0
  1403. data/spec/lutaml/xml/decisions/decision_spec.rb +217 -0
  1404. data/spec/lutaml/xml/decisions/element_prefix_resolver_spec.rb +198 -0
  1405. data/spec/lutaml/xml/declaration_planner_spec.rb +524 -0
  1406. data/spec/lutaml/xml/default_namespace_spec.rb +190 -0
  1407. data/spec/lutaml/{model/xml → xml}/derived_attributes_spec.rb +2 -2
  1408. data/spec/lutaml/xml/doctype_preservation_spec.rb +323 -0
  1409. data/spec/lutaml/xml/doubly_defined_namespace_spec.rb +415 -0
  1410. data/spec/lutaml/xml/dual_namespace_element_spec.rb +181 -0
  1411. data/spec/lutaml/xml/element_spec.rb +28 -0
  1412. data/spec/lutaml/xml/encoding_normalizer_spec.rb +215 -0
  1413. data/spec/lutaml/xml/enhanced_mapping_spec.rb +692 -0
  1414. data/spec/lutaml/xml/entity_fragmentation_spec.rb +583 -0
  1415. data/spec/lutaml/xml/format_chooser_spec.rb +0 -0
  1416. data/spec/lutaml/xml/fpi_namespace_spec.rb +145 -0
  1417. data/spec/lutaml/{model/xml/namespace_spec.rb → xml/general_namespace_spec.rb} +6 -5
  1418. data/spec/lutaml/xml/mapping_finalization_guard_spec.rb +83 -0
  1419. data/spec/lutaml/xml/mapping_rule_spec.rb +98 -0
  1420. data/spec/lutaml/xml/mapping_spec.rb +1147 -0
  1421. data/spec/lutaml/xml/model_transform_guard_spec.rb +126 -0
  1422. data/spec/lutaml/{model/xml → xml}/namespace/nested_with_explicit_namespace_spec.rb +8 -5
  1423. data/spec/lutaml/xml/namespace/w3c_reserved_warning_spec.rb +152 -0
  1424. data/spec/lutaml/xml/namespace_alias_prefix_root_spec.rb +130 -0
  1425. data/spec/lutaml/xml/namespace_alias_spec.rb +263 -0
  1426. data/spec/lutaml/xml/namespace_aware_parsing_spec.rb +219 -0
  1427. data/spec/lutaml/xml/namespace_backward_compatibility_spec.rb +48 -0
  1428. data/spec/lutaml/xml/namespace_bound_element_roundtrip_spec.rb +433 -0
  1429. data/spec/lutaml/xml/namespace_constant_spec.rb +383 -0
  1430. data/spec/lutaml/xml/namespace_force_prefix_spec.rb +113 -0
  1431. data/spec/lutaml/xml/namespace_format_preservation_spec.rb +49 -0
  1432. data/spec/lutaml/xml/namespace_inheritance_deep_spec.rb +162 -0
  1433. data/spec/lutaml/xml/namespace_inheritance_override_spec.rb +316 -0
  1434. data/spec/lutaml/xml/namespace_inheritance_resolver_spec.rb +0 -0
  1435. data/spec/lutaml/xml/namespace_inheritance_spec.rb +966 -0
  1436. data/spec/lutaml/xml/namespace_integration_spec.rb +277 -0
  1437. data/spec/lutaml/xml/namespace_missing_prefix_spec.rb +178 -0
  1438. data/spec/lutaml/xml/namespace_no_hoisting_spec.rb +172 -0
  1439. data/spec/lutaml/xml/namespace_placement_spec.rb +265 -0
  1440. data/spec/lutaml/xml/namespace_preservation_spec.rb +427 -0
  1441. data/spec/lutaml/xml/namespace_principles_spec.rb +909 -0
  1442. data/spec/lutaml/xml/namespace_resolution_strategy_spec.rb +273 -0
  1443. data/spec/lutaml/xml/namespace_scope_declare_spec.rb +205 -0
  1444. data/spec/lutaml/xml/namespace_scope_spec.rb +389 -0
  1445. data/spec/lutaml/xml/namespace_scope_vcard_spec.rb +616 -0
  1446. data/spec/lutaml/xml/namespace_spec.rb +712 -0
  1447. data/spec/lutaml/xml/namespace_three_phase_spec.rb +310 -0
  1448. data/spec/lutaml/xml/nil_optional_element_namespace_spec.rb +84 -0
  1449. data/spec/lutaml/xml/ooxml_namespace_spec.rb +177 -0
  1450. data/spec/lutaml/xml/ordered_method_spec.rb +109 -0
  1451. data/spec/lutaml/xml/prefix_control_spec.rb +286 -0
  1452. data/spec/lutaml/{model/register/xml_spec.rb → xml/register_spec.rb} +75 -21
  1453. data/spec/lutaml/xml/reusable_mapping_spec.rb +148 -0
  1454. data/spec/lutaml/xml/reused_elements_namespace_spec.rb +85 -0
  1455. data/spec/lutaml/{model/xml → xml}/root_mappings/nested_child_mappings_spec.rb +53 -0
  1456. data/spec/lutaml/{model/schema/xml_compiler → xml/schema/compiler}/attribute_group_spec.rb +9 -3
  1457. data/spec/lutaml/{model/schema/xml_compiler → xml/schema/compiler}/attribute_spec.rb +11 -7
  1458. data/spec/lutaml/{model/schema/xml_compiler → xml/schema/compiler}/choice_spec.rb +5 -2
  1459. data/spec/lutaml/{model/schema/xml_compiler → xml/schema/compiler}/complex_content_restriction_spec.rb +7 -2
  1460. data/spec/lutaml/{model/schema/xml_compiler → xml/schema/compiler}/complex_content_spec.rb +5 -1
  1461. data/spec/lutaml/{model/schema/xml_compiler → xml/schema/compiler}/complex_type_spec.rb +49 -20
  1462. data/spec/lutaml/{model/schema/xml_compiler → xml/schema/compiler}/element_spec.rb +9 -4
  1463. data/spec/lutaml/{model/schema/xml_compiler → xml/schema/compiler}/group_spec.rb +9 -5
  1464. data/spec/lutaml/{model/schema/xml_compiler → xml/schema/compiler}/restriction_spec.rb +1 -0
  1465. data/spec/lutaml/{model/schema/xml_compiler → xml/schema/compiler}/sequence_spec.rb +10 -4
  1466. data/spec/lutaml/{model/schema/xml_compiler → xml/schema/compiler}/simple_content_spec.rb +9 -3
  1467. data/spec/lutaml/{model/schema/xml_compiler → xml/schema/compiler}/simple_type_spec.rb +10 -7
  1468. data/spec/lutaml/{model/schema/xml_compiler_spec.rb → xml/schema/compiler_spec.rb} +219 -94
  1469. data/spec/lutaml/xml/schema/xsd/errors/error_context_spec.rb +65 -0
  1470. data/spec/lutaml/xml/schema/xsd/errors/suggestion_spec.rb +77 -0
  1471. data/spec/lutaml/xml/schema/xsd/file_validation_result_spec.rb +131 -0
  1472. data/spec/lutaml/xml/schema/xsd/glob_spec.rb +318 -0
  1473. data/spec/lutaml/xml/schema/xsd/liquid_methods/attribute_and_group_spec.rb +76 -0
  1474. data/spec/lutaml/xml/schema/xsd/liquid_methods/complex_type_spec.rb +159 -0
  1475. data/spec/lutaml/xml/schema/xsd/liquid_methods/containers_spec.rb +104 -0
  1476. data/spec/lutaml/xml/schema/xsd/liquid_methods/element_spec.rb +139 -0
  1477. data/spec/lutaml/xml/schema/xsd/liquid_methods/schema_spec.rb +75 -0
  1478. data/spec/lutaml/xml/schema/xsd/liquid_methods/simple_content_spec.rb +79 -0
  1479. data/spec/lutaml/xml/schema/xsd/namespace_uri_remapping_spec.rb +246 -0
  1480. data/spec/lutaml/xml/schema/xsd/schema_helper_methods_spec.rb +237 -0
  1481. data/spec/lutaml/xml/schema/xsd/schema_mapping_spec.rb +742 -0
  1482. data/spec/lutaml/xml/schema/xsd/schema_validator_spec.rb +228 -0
  1483. data/spec/lutaml/xml/schema/xsd/spec_helper.rb +26 -0
  1484. data/spec/lutaml/xml/schema/xsd/validation_error_spec.rb +189 -0
  1485. data/spec/lutaml/xml/schema/xsd/validation_result_spec.rb +276 -0
  1486. data/spec/lutaml/xml/schema/xsd/xsd_spec.rb +51 -0
  1487. data/spec/lutaml/xml/schema_primer_spec.rb +393 -0
  1488. data/spec/lutaml/xml/serializable_namespace_spec.rb +125 -0
  1489. data/spec/lutaml/xml/transformation/custom_method_wrapper_spec.rb +48 -0
  1490. data/spec/lutaml/xml/transformation_spec.rb +439 -0
  1491. data/spec/lutaml/xml/type_namespace/collector_spec.rb +212 -0
  1492. data/spec/lutaml/xml/type_namespace/planner_spec.rb +270 -0
  1493. data/spec/lutaml/xml/type_namespace_examples_spec.rb +521 -0
  1494. data/spec/lutaml/xml/type_namespace_integration_spec.rb +332 -0
  1495. data/spec/lutaml/xml/type_namespace_prefix_spec.rb +370 -0
  1496. data/spec/lutaml/xml/type_namespace_resolver_spec.rb +0 -0
  1497. data/spec/lutaml/xml/type_namespace_roundtrip_spec.rb +580 -0
  1498. data/spec/lutaml/xml/w3c_types_spec.rb +376 -0
  1499. data/spec/lutaml/{model → xml}/xml_adapter_spec.rb +64 -17
  1500. data/spec/lutaml/xml/xml_declaration_spec.rb +568 -0
  1501. data/spec/lutaml/xml/xml_element_guard_spec.rb +138 -0
  1502. data/spec/lutaml/{model/xml → xml}/xml_element_spec.rb +1 -1
  1503. data/spec/lutaml/xml/xml_lang_spec.rb +441 -0
  1504. data/spec/lutaml/xml/xml_space_spec.rb +247 -0
  1505. data/spec/lutaml/xml/xml_space_type_spec.rb +161 -0
  1506. data/spec/lutaml/xml/xml_spec.rb +122 -0
  1507. data/spec/parent_root_spec.rb +63 -0
  1508. data/spec/person_spec.rb +9 -9
  1509. data/spec/spec_helper.rb +64 -6
  1510. data/spec/support/test_adapter_config.rb +101 -0
  1511. data/spec/support/test_namespaces.rb +185 -0
  1512. data/spec/support/trace_helper.rb +0 -0
  1513. data/spec/support/xml/schema_helper.rb +15 -0
  1514. data/spec/support/xml/xsd/code_example_validator.rb +393 -0
  1515. data/spec/support/xml_mapping_namespaces.rb +176 -0
  1516. metadata +1465 -100
  1517. data/docs/custom_registers.adoc +0 -228
  1518. data/lib/lutaml/model/hash_adapter/mapping.rb +0 -19
  1519. data/lib/lutaml/model/hash_adapter/mapping_rule.rb +0 -9
  1520. data/lib/lutaml/model/hash_adapter/transform.rb +0 -8
  1521. data/lib/lutaml/model/hash_adapter.rb +0 -21
  1522. data/lib/lutaml/model/json/mapping.rb +0 -19
  1523. data/lib/lutaml/model/json/mapping_rule.rb +0 -9
  1524. data/lib/lutaml/model/json/multi_json_adapter.rb +0 -18
  1525. data/lib/lutaml/model/json/standard_adapter.rb +0 -25
  1526. data/lib/lutaml/model/json/transform.rb +0 -8
  1527. data/lib/lutaml/model/jsonl/mapping.rb +0 -19
  1528. data/lib/lutaml/model/jsonl/mapping_rule.rb +0 -9
  1529. data/lib/lutaml/model/jsonl/transform.rb +0 -19
  1530. data/lib/lutaml/model/schema/xsd_schema.rb +0 -62
  1531. data/lib/lutaml/model/toml/mapping_rule.rb +0 -9
  1532. data/lib/lutaml/model/toml/toml_rb_adapter.rb +0 -18
  1533. data/lib/lutaml/model/toml/tomlib_adapter.rb +0 -19
  1534. data/lib/lutaml/model/toml/transform.rb +0 -8
  1535. data/lib/lutaml/model/xml/builder/nokogiri.rb +0 -101
  1536. data/lib/lutaml/model/xml/builder/oga.rb +0 -183
  1537. data/lib/lutaml/model/xml/builder/ox.rb +0 -121
  1538. data/lib/lutaml/model/xml/document.rb +0 -477
  1539. data/lib/lutaml/model/xml/element.rb +0 -32
  1540. data/lib/lutaml/model/xml/mapping.rb +0 -471
  1541. data/lib/lutaml/model/xml/mapping_rule.rb +0 -149
  1542. data/lib/lutaml/model/xml/nokogiri_adapter.rb +0 -234
  1543. data/lib/lutaml/model/xml/oga/document.rb +0 -20
  1544. data/lib/lutaml/model/xml/oga/element.rb +0 -123
  1545. data/lib/lutaml/model/xml/oga_adapter.rb +0 -172
  1546. data/lib/lutaml/model/xml/ox_adapter.rb +0 -229
  1547. data/lib/lutaml/model/xml/transform.rb +0 -8
  1548. data/lib/lutaml/model/xml/xml_attribute.rb +0 -37
  1549. data/lib/lutaml/model/xml/xml_element.rb +0 -167
  1550. data/lib/lutaml/model/xml/xml_namespace.rb +0 -49
  1551. data/lib/lutaml/model/xml.rb +0 -31
  1552. data/lib/lutaml/model/xml_adapter/element.rb +0 -18
  1553. data/lib/lutaml/model/xml_adapter/nokogiri_adapter.rb +0 -15
  1554. data/lib/lutaml/model/xml_adapter/oga_adapter.rb +0 -21
  1555. data/lib/lutaml/model/xml_adapter/ox_adapter.rb +0 -18
  1556. data/lib/lutaml/model/xml_adapter.rb +0 -7
  1557. data/lib/lutaml/model/yaml/mapping.rb +0 -19
  1558. data/lib/lutaml/model/yaml/mapping_rule.rb +0 -9
  1559. data/lib/lutaml/model/yaml/standard_adapter.rb +0 -28
  1560. data/lib/lutaml/model/yaml/transform.rb +0 -8
  1561. data/lib/lutaml/model/yamls/mapping.rb +0 -19
  1562. data/lib/lutaml/model/yamls/mapping_rule.rb +0 -9
  1563. data/lib/lutaml/model/yamls/transform.rb +0 -19
  1564. data/spec/benchmarks/xml_parsing_benchmark_spec.rb +0 -74
  1565. data/spec/fixtures/xml/advanced_test_schema.xsd +0 -134
  1566. data/spec/lutaml/model/namespace_spec.rb +0 -57
  1567. data/spec/lutaml/model/xml_adapter/nokogiri_adapter_spec.rb +0 -56
  1568. data/spec/lutaml/model/xml_adapter/oga_adapter_spec.rb +0 -60
  1569. data/spec/lutaml/model/xml_adapter/ox_adapter_spec.rb +0 -61
  1570. data/spec/lutaml/model/xml_adapter/xml_namespace_spec.rb +0 -368
  1571. data/spec/lutaml/model/xml_mapping_rule_spec.rb +0 -158
  1572. data/spec/lutaml/model/xml_mapping_spec.rb +0 -1318
  1573. data/spec/lutaml/model/xml_spec.rb +0 -63
@@ -0,0 +1,1803 @@
1
+ ---
2
+ title: Common patterns
3
+ nav_order: 5
4
+ parent: XML Mappings Guide
5
+ ---
6
+
7
+ = Common patterns
8
+
9
+ == Basic element and attribute mapping
10
+
11
+ === Simple model with elements
12
+
13
+ .Basic ceramic model with element mappings
14
+ [example]
15
+ ====
16
+ [source,ruby]
17
+ ----
18
+ class Ceramic < Lutaml::Model::Serializable
19
+ attribute :name, :string
20
+ attribute :description, :string
21
+ attribute :temperature, :integer
22
+
23
+ xml do
24
+ root 'ceramic'
25
+ map_element 'name', to: :name
26
+ map_attribute 'temperature', to: :temperature
27
+ map_content to: :description
28
+ end
29
+ end
30
+ ----
31
+
32
+ [source,xml]
33
+ ----
34
+ <ceramic temperature="1200">
35
+ <name>Porcelain Vase</name>
36
+ with celadon glaze.
37
+ </ceramic>
38
+ ----
39
+
40
+ [source,ruby]
41
+ ----
42
+ > Ceramic.from_xml(xml)
43
+ > #<Ceramic @name="Porcelain Vase",
44
+ @description=" with celadon glaze.",
45
+ @temperature=1200>
46
+ ----
47
+ ====
48
+
49
+ === Nested models
50
+
51
+ .Model with nested object
52
+ [example]
53
+ ====
54
+ [source,ruby]
55
+ ----
56
+ class Glaze < Lutaml::Model::Serializable
57
+ attribute :color, :string
58
+ attribute :temperature, :integer
59
+
60
+ xml do
61
+ root 'Glaze'
62
+ map_element 'color', to: :color
63
+ map_element 'temperature', to: :temperature
64
+ end
65
+ end
66
+
67
+ class Ceramic < Lutaml::Model::Serializable
68
+ attribute :type, :string
69
+ attribute :glaze, Glaze
70
+
71
+ xml do
72
+ root 'Ceramic'
73
+ map_element 'Type', to: :type
74
+ map_element 'Glaze', to: :glaze
75
+ end
76
+ end
77
+ ----
78
+
79
+ [source,xml]
80
+ ----
81
+ <Ceramic>
82
+ <Type>Porcelain</Type>
83
+ <Glaze>
84
+ <color>Clear</color>
85
+ <temperature>1050</temperature>
86
+ </Glaze>
87
+ </Ceramic>
88
+ ----
89
+ ====
90
+
91
+ == Namespace patterns
92
+
93
+ === Single namespace
94
+
95
+ .Model with single namespace
96
+ [example]
97
+ ====
98
+ [source,ruby]
99
+ ----
100
+ class Ceramic < Lutaml::Model::Serializable
101
+ attribute :type, :string
102
+ attribute :glaze, :string
103
+
104
+ xml do
105
+ root 'Ceramic'
106
+ namespace 'http://example.com/ceramic'
107
+ map_element 'Type', to: :type
108
+ map_element 'Glaze', to: :glaze
109
+ end
110
+ end
111
+ ----
112
+
113
+ [source,xml]
114
+ ----
115
+ <Ceramic xmlns='http://example.com/ceramic'>
116
+ <Type>Porcelain</Type>
117
+ <Glaze>Clear</Glaze>
118
+ </Ceramic>
119
+ ----
120
+ ====
121
+
122
+ === Prefixed namespace
123
+
124
+ .Model with prefixed namespace
125
+ [example]
126
+ ====
127
+ [source,ruby]
128
+ ----
129
+ class Ceramic < Lutaml::Model::Serializable
130
+ attribute :type, :string
131
+ attribute :glaze, :string
132
+
133
+ xml do
134
+ root 'Ceramic'
135
+ namespace 'http://example.com/ceramic', 'cer'
136
+ map_element 'Type', to: :type
137
+ map_element 'Glaze', to: :glaze
138
+ end
139
+ end
140
+ ----
141
+
142
+ [source,xml]
143
+ ----
144
+ <cer:Ceramic xmlns:cer='http://example.com/ceramic'>
145
+ <cer:Type>Porcelain</cer:Type>
146
+ <cer:Glaze>Clear</cer:Glaze>
147
+ </cer:Ceramic>
148
+ ----
149
+ ====
150
+
151
+ === Multi-namespace with XmlNamespace class
152
+
153
+ .Model using multiple namespaces with XmlNamespace classes
154
+ [example]
155
+ ====
156
+ [source,ruby]
157
+ ----
158
+ class CeramicNamespace < Lutaml::Model::XmlNamespace
159
+ uri 'https://example.com/ceramic'
160
+ prefix_default 'cer'
161
+ end
162
+
163
+ class GlazeNamespace < Lutaml::Model::XmlNamespace
164
+ uri 'https://example.com/glaze'
165
+ prefix_default 'glz'
166
+ end
167
+
168
+ class Ceramic < Lutaml::Model::Serializable
169
+ attribute :type, :string
170
+ attribute :glaze, :string
171
+
172
+ xml do
173
+ element 'ceramic'
174
+ namespace CeramicNamespace
175
+
176
+ map_element 'type', to: :type
177
+ map_element 'glaze', to: :glaze,
178
+ namespace: GlazeNamespace
179
+ end
180
+ end
181
+ ----
182
+
183
+ [source,xml]
184
+ ----
185
+ <cer:ceramic xmlns:cer="https://example.com/ceramic"
186
+ xmlns:glz="https://example.com/glaze">
187
+ <type>Porcelain</type>
188
+ <glz:glaze>Celadon</glz:glaze>
189
+ </cer:ceramic>
190
+ ----
191
+ ====
192
+
193
+ === Namespace inheritance pattern
194
+
195
+ .Element explicitly inheriting parent namespace
196
+ [example]
197
+ ====
198
+ [source,ruby]
199
+ ----
200
+ class CeramicNamespace < Lutaml::Model::XmlNamespace
201
+ uri 'https://example.com/ceramic'
202
+ prefix_default 'cer'
203
+ element_form_default :unqualified
204
+ end
205
+
206
+ class SpecialType < Lutaml::Model::Serializable
207
+ attribute :value, :string
208
+
209
+ xml do
210
+ element 'specialType'
211
+ namespace CeramicNamespace # Inherit parent namespace
212
+ map_content to: :value
213
+ end
214
+ end
215
+
216
+ class Ceramic < Lutaml::Model::Serializable
217
+ attribute :type, :string
218
+ attribute :special_type, SpecialType
219
+
220
+ xml do
221
+ element 'ceramic'
222
+ namespace CeramicNamespace
223
+
224
+ map_element 'type', to: :type # Unqualified (follows element_form_default)
225
+ map_element 'specialType', to: :special_type # Uses SpecialType's namespace
226
+ end
227
+ end
228
+ ----
229
+
230
+ [source,xml]
231
+ ----
232
+ <cer:ceramic xmlns:cer="https://example.com/ceramic">
233
+ <type>Porcelain</type>
234
+ <cer:specialType>Fine</cer:specialType>
235
+ </cer:ceramic>
236
+ ----
237
+ ====
238
+
239
+ == Rich content patterns
240
+
241
+ === Mixed content
242
+
243
+ .Model with mixed content (text + elements) -- round-trip example
244
+ [example]
245
+ ====
246
+ [source,ruby]
247
+ ----
248
+ class MathExpression < Lutaml::Model::Serializable
249
+ attribute :content, :string
250
+
251
+ xml do
252
+ element "math"
253
+ map_content to: :content
254
+ end
255
+ end
256
+
257
+ class Paragraph < Lutaml::Model::Serializable
258
+ attribute :text, :string, collection: true # collection: true required
259
+ attribute :bold, :string, collection: true
260
+ attribute :stem, MathExpression, collection: true
261
+
262
+ xml do
263
+ element 'p'
264
+ mixed_content # Enable mixed content + ordered round-trip
265
+
266
+ map_content to: :text
267
+ map_element 'bold', to: :bold
268
+ map_element 'stem', to: :stem
269
+ end
270
+ end
271
+ ----
272
+
273
+ [source,xml]
274
+ ----
275
+ <p>Temperature <stem>T</stem> minus <stem>T<sub>90</sub></stem></p>
276
+ ----
277
+
278
+ [source,ruby]
279
+ ----
280
+ parsed = Paragraph.from_xml(xml)
281
+
282
+ # Access text segments and elements separately
283
+ parsed.text # => ["Temperature ", " minus "]
284
+ parsed.stem.map(&:content) # => ["T", "T90"]
285
+
286
+ # Serialize back -- text and elements appear in their original positions
287
+ parsed.to_xml
288
+ # => "<p>Temperature <stem>T</stem> minus <stem>T<sub>90</sub></stem></p>"
289
+
290
+ # Iterate in document order to process text and elements interleaved
291
+ parsed.each_mixed_content do |node|
292
+ case node
293
+ when String
294
+ puts "Text: #{node.inspect}"
295
+ when MathExpression
296
+ puts "Math: #{node.content}"
297
+ end
298
+ end
299
+ # Output:
300
+ # Text: "Temperature "
301
+ # Math: T
302
+ # Text: " minus "
303
+ # Math: T90
304
+ ----
305
+ ====
306
+ [NOTE]
307
+ .map_content requires collection: true for mixed content
308
+ ====
309
+ For mixed content, `map_content` must target an attribute with `collection: true` because XML like:
310
+ [source,xml]
311
+ ----
312
+ <hello><element1>hi</element1> ho <element2>he</element2>? Yes!</hello>
313
+ ----
314
+ has multiple text segments between elements. Each segment becomes an entry in the content collection.
315
+
316
+ Without `mixed_content`, serialization groups all text first then all elements
317
+ (or vice versa), losing the original interleaving. This is the most common
318
+ cause of XML round-trip failures in document-processing applications.
319
+
320
+ === Builder interface for mixed content
321
+
322
+ When constructing models with `mixed_content`, the builder interface provides a DSL for
323
+ recording insertion order. The builder tracks element order via `element_order` for
324
+ serialization.
325
+
326
+ ==== Model definitions
327
+
328
+ [source,ruby]
329
+ ----
330
+ class Person < Lutaml::Model::Serializable
331
+ attribute :name, :string
332
+
333
+ xml do
334
+ element "person"
335
+ map_content to: :name
336
+ end
337
+ end
338
+
339
+ class Group < Lutaml::Model::Serializable
340
+ attribute :member, Person, collection: true
341
+ attribute :member_key, :string, collection: true
342
+ attribute :description, :string, collection: true
343
+
344
+ xml do
345
+ element "group"
346
+ mixed_content
347
+ map_element "member", to: :member
348
+ map_element "member_key", to: :member_key
349
+ map_content to: :description
350
+ end
351
+ end
352
+ ----
353
+
354
+ ==== NO MAGIC: Explicit receiver
355
+
356
+ .Builder with explicit receiver
357
+ [example]
358
+ ====
359
+ [source,ruby]
360
+ ----
361
+ group = Group.new do |g|
362
+ members.each do |m|
363
+ g.member(m[:person])
364
+ g.member_key(m[:key])
365
+ g.description("\n " + m[:description] + "\n")
366
+ end
367
+ end
368
+ ----
369
+ ====
370
+
371
+ ==== MAGIC: instance_eval (no receiver)
372
+
373
+ .Builder with instance_eval - no receiver needed
374
+ [example]
375
+ ====
376
+ [source,ruby]
377
+ ----
378
+ group = Group.new do
379
+ members.each do |m|
380
+ member(m[:person])
381
+ member_key(m[:key])
382
+ description("\n " + m[:description] + "\n")
383
+ end
384
+ end
385
+ ----
386
+ ====
387
+
388
+ [NOTE]
389
+ .Both syntaxes track order identically
390
+ ====
391
+ The `element_order` array records entries in the order they were added, preserving
392
+ the sequence for XML serialization.
393
+
394
+ ==== Why whitespace is intentional content
395
+
396
+ In mixed content XML, whitespace between elements *is* content:
397
+
398
+ [source,xml]
399
+ ----
400
+ <group>
401
+ <member>John Hodges</member>
402
+ <member_key>john</member_key>
403
+ He is a good man.
404
+ <member>Thomas Mellon</member>
405
+ <member_key>thomas</member_key>
406
+ He was a strong man.
407
+ </group>
408
+ ----
409
+
410
+ The builder records whitespace strings as first-class content entries:
411
+
412
+ [source,ruby]
413
+ ----
414
+ description("\n " + m[:description] + "\n")
415
+ # ↑ ↑
416
+ # before whitespace after whitespace
417
+ ----
418
+ ====
419
+
420
+ === Ordered content
421
+
422
+ .Model preserving element order
423
+ [example]
424
+ ====
425
+ [source,ruby]
426
+ ----
427
+ class RootOrderedContent < Lutaml::Model::Serializable
428
+ attribute :bold, :string
429
+ attribute :italic, :string
430
+ attribute :underline, :string
431
+
432
+ xml do
433
+ element "RootOrderedContent"
434
+ ordered # Preserve element order
435
+ map_element :bold, to: :bold
436
+ map_element :italic, to: :italic
437
+ map_element :underline, to: :underline
438
+ end
439
+ end
440
+ ----
441
+
442
+ [source,xml]
443
+ ----
444
+ <RootOrderedContent>
445
+ <underline>Moon</underline>
446
+ <italic>384,400 km</italic>
447
+ <bold>bell</bold>
448
+ </RootOrderedContent>
449
+ ----
450
+
451
+ When serialized back, the order is preserved:
452
+
453
+ [source,ruby]
454
+ ----
455
+ > instance = RootOrderedContent.from_xml(xml)
456
+ > instance.to_xml
457
+ > #<RootOrderedContent>
458
+ <underline>Moon</underline>
459
+ <italic>384,400 km</italic>
460
+ <bold>bell</bold>
461
+ </RootOrderedContent>
462
+ ----
463
+ ====
464
+
465
+ === Iterating mixed content with `each_mixed_content`
466
+
467
+ When working with mixed content (text interspersed with elements) or ordered content
468
+ (elements in a specific sequence), you often need to iterate in document order to
469
+ process or transform the content. The `each_mixed_content` method provides an
470
+ iterator that yields text nodes and typed model objects in their original document order.
471
+
472
+ [NOTE]
473
+ ====
474
+ `each_mixed_content` is available on any model instance that has `mixed_content` or
475
+ `ordered` enabled in its XML mapping. It returns an empty Enumerator if neither is set.
476
+ ====
477
+
478
+ .Iterating over mixed content in document order
479
+ [example]
480
+ ====
481
+ [source,ruby]
482
+ ----
483
+ class Docbook::Elements::Para < Lutaml::Model::Serializable
484
+ attribute :content, :string
485
+ attribute :emphasis, :string, collection: true
486
+ attribute :code, :string, collection: true
487
+
488
+ xml do
489
+ element "para"
490
+ mixed_content
491
+ map_content to: :content
492
+ map_element "emphasis", to: :emphasis
493
+ map_element "code", to: :code
494
+ end
495
+ end
496
+ ----
497
+
498
+ [source,xml]
499
+ ----
500
+ <para>Hello <emphasis role="bold">world</emphasis> and <code>example</code>!</para>
501
+ ----
502
+
503
+ [source,ruby]
504
+ ----
505
+ para = Docbook::Elements::Para.from_xml(xml)
506
+
507
+ # Iterate in document order, yielding text and elements
508
+ para.each_mixed_content do |node|
509
+ case node
510
+ when String
511
+ puts "Text: #{node.inspect}"
512
+ when String # emphasis/code are stored as strings in this model
513
+ puts "Inline element content: #{node.inspect}"
514
+ end
515
+ end
516
+ # => "Text: \"Hello \""
517
+ # => "Inline element content: \"world\""
518
+ # => "Text: \" and \""
519
+ # => "Inline element content: \"example\""
520
+ # => "Text: \"!\""
521
+ ----
522
+ ====
523
+
524
+ .Generating HTML from mixed content
525
+ [example]
526
+ ====
527
+ A common use case is converting DocBook or similar XML to HTML:
528
+
529
+ [source,ruby]
530
+ ----
531
+ class HtmlConverter
532
+ def convert_para(para)
533
+ html = "<p>"
534
+
535
+ para.each_mixed_content do |node|
536
+ case node
537
+ when String
538
+ html += escape_html(node)
539
+ when Docbook::Elements::Emphasis
540
+ role = node.role == "bold" ? "strong" : "em"
541
+ html += "<#{role}>#{escape_html(node.content)}</#{role}>"
542
+ end
543
+ end
544
+
545
+ html += "</p>"
546
+ html
547
+ end
548
+
549
+ private
550
+
551
+ def escape_html(text)
552
+ text.gsub("&", "&amp;")
553
+ .gsub("<", "&lt;")
554
+ .gsub(">", "&gt;")
555
+ end
556
+ end
557
+ ----
558
+ ====
559
+
560
+ .Return value and chaining
561
+
562
+ `each_mixed_content` returns:
563
+
564
+ * `self` when called with a block (for chaining)
565
+ * An `Enumerator` when called without a block -- supports `with_index`, `select`, `map`, etc.
566
+
567
+ [source,ruby]
568
+ ----
569
+ # With block
570
+ para.each_mixed_content { |node| process(node) }
571
+
572
+ # Without block - returns Enumerator
573
+ enum = para.each_mixed_content
574
+ enum.select { |node| node.is_a?(String) }
575
+ enum.each { |node| process(node) }
576
+
577
+ # With index - useful for positional processing
578
+ para.each_mixed_content.with_index do |node, index|
579
+ puts "#{index}: #{node.inspect}"
580
+ end
581
+ # 0: "Temperature "
582
+ # 1: #<MathExpression content="T">
583
+ # 2: " minus "
584
+ # 3: #<MathExpression content="T90">
585
+ ----
586
+
587
+ [NOTE]
588
+ ====
589
+ Whitespace-only text fragments are automatically skipped by `each_mixed_content`.
590
+ This matches typical XML processing behavior where insignificant whitespace is ignored.
591
+ ====
592
+
593
+ [IMPORTANT]
594
+ .`each_mixed_content` is XML-specific
595
+ ====
596
+ For JSON and YAML formats, rich text uses a *recursive tree pattern* instead of the
597
+ mixed content model used by XML. Each node in the tree knows its type and contains
598
+ its own children. Since the tree IS the content structure, you can iterate using
599
+ natural tree traversal methods.
600
+
601
+ See the <<Recursive tree pattern for JSON/YAML,next section>> for details.
602
+ ====
603
+
604
+ [[recursive-tree-pattern]]
605
+ === Recursive tree pattern for JSON/YAML
606
+
607
+ Unlike XML's mixed content model (which requires `each_mixed_content` to correlate
608
+ text fragments with element collections), JSON and YAML represent rich text using a
609
+ recursive tree structure. Each node knows its type, and container nodes hold a
610
+ `children` array containing child nodes.
611
+
612
+ [IMPORTANT]
613
+ .These are different data models
614
+ ====
615
+ XML mixed content and JSON/YAML recursive tree are fundamentally different data
616
+ structures. They cannot be represented by the same Ruby model class because:
617
+
618
+ * **XML**: `content` is a String, `emphasis` is a collection
619
+ * **JSON/YAML**: `content` is a collection of nodes, each with `children`
620
+
621
+ Instead, define separate models for each format family.
622
+ ====
623
+
624
+ .Recursive tree structure for rich text
625
+ [source,json]
626
+ ----
627
+ {
628
+ "type": "para",
629
+ "content": [
630
+ { "type": "text", "value": "Hello " },
631
+ { "type": "emphasis", "role": "bold", "children": [
632
+ { "type": "text", "value": "world" }
633
+ ]},
634
+ { "type": "text", "value": "!" }
635
+ ]
636
+ }
637
+ ----
638
+
639
+ [NOTE]
640
+ ====
641
+ In this pattern:
642
+ - Each node has a `type` field indicating what kind of node it is
643
+ - Container nodes (like `emphasis`) have a `children` array
644
+ - Leaf nodes (like `text`) have a `value` field
645
+ - The tree structure itself preserves order - no separate tracking needed
646
+ ====
647
+
648
+ .XML Model (Mixed Content)
649
+ [example]
650
+ ====
651
+ For XML, use `mixed_content` with separate `content` attribute and element collections:
652
+
653
+ [source,ruby]
654
+ ----
655
+ class Docbook::Elements::Para < Lutaml::Model::Serializable
656
+ attribute :content, :string
657
+ attribute :emphasis, Docbook::Elements::Emphasis, collection: true
658
+
659
+ xml do
660
+ element "para"
661
+ mixed_content
662
+ map_content to: :content
663
+ map_element "emphasis", to: :emphasis
664
+ xml_space :preserve
665
+ end
666
+ end
667
+
668
+ class Docbook::Elements::Emphasis < Lutaml::Model::Serializable
669
+ attribute :role, :string
670
+ attribute :content, :string
671
+
672
+ xml do
673
+ element "emphasis"
674
+ map_attribute "role", to: :role
675
+ map_content to: :content
676
+ end
677
+ end
678
+ ----
679
+
680
+ [source,xml]
681
+ ----
682
+ <para>Hello <emphasis role="bold">world</emphasis>!</para>
683
+ ----
684
+ ====
685
+
686
+ .JSON/YAML Model (Recursive Tree)
687
+ [example]
688
+ ====
689
+ For JSON/YAML, use a polymorphic node structure where inline elements have `children`:
690
+
691
+ [source,ruby]
692
+ ----
693
+ # Base class for all rich text nodes
694
+ class RichText::Node < Lutaml::Model::Serializable
695
+ end
696
+
697
+ # Leaf node for text
698
+ class RichText::TextNode < Lutaml::Model::Serializable
699
+ attribute :value, :string
700
+
701
+ json do
702
+ map "value", to: :value
703
+ end
704
+
705
+ yaml do
706
+ map "value", to: :value
707
+ end
708
+ end
709
+
710
+ # Inline element with children
711
+ class RichText::Emphasis < Lutaml::Model::Serializable
712
+ attribute :role, :string
713
+ attribute :children, RichText::Node, collection: true
714
+
715
+ json do
716
+ map "type", to: :type
717
+ map "role", to: :role
718
+ map "children", to: :children
719
+ end
720
+
721
+ yaml do
722
+ map "type", to: :type
723
+ map "role", to: :role
724
+ map "children", to: :children
725
+ end
726
+
727
+ def type
728
+ "emphasis"
729
+ end
730
+ end
731
+
732
+ # Container with content
733
+ class RichText::Para < Lutaml::Model::Serializable
734
+ attribute :type, :string
735
+ attribute :content, RichText::Node, collection: true
736
+
737
+ json do
738
+ map "type", to: :type
739
+ map "content", to: :content
740
+ end
741
+
742
+ yaml do
743
+ map "type", to: :type
744
+ map "content", to: :content
745
+ end
746
+
747
+ def type
748
+ "para"
749
+ end
750
+ end
751
+ ----
752
+
753
+ [source,json]
754
+ ----
755
+ {
756
+ "type": "para",
757
+ "content": [
758
+ { "type": "text", "value": "Hello " },
759
+ { "type": "emphasis", "role": "bold", "children": [
760
+ { "type": "text", "value": "world" }
761
+ ]},
762
+ { "type": "text", "value": "!" }
763
+ ]
764
+ }
765
+ ----
766
+ ====
767
+
768
+ .Processing rich text by format
769
+
770
+ [source,ruby]
771
+ ----
772
+ # XML: Use each_mixed_content
773
+ xml_para = Docbook::Elements::Para.from_xml(xml_input)
774
+ xml_para.each_mixed_content do |node|
775
+ case node
776
+ when String
777
+ print node # Text fragments
778
+ when Docbook::Elements::Emphasis
779
+ print "<#{node.role}>#{node.content}</#{node.role}>"
780
+ end
781
+ end
782
+
783
+ # JSON/YAML: Use natural tree traversal
784
+ json_para = RichText::Para.from_json(json_input)
785
+
786
+ def process_node(node)
787
+ case node
788
+ when RichText::TextNode
789
+ print node.value
790
+ when RichText::Emphasis
791
+ print "<#{node.role}>"
792
+ node.children.each { |child| process_node(child) }
793
+ print "</#{node.role}>"
794
+ end
795
+ end
796
+
797
+ json_para.content.each { |node| process_node(node) }
798
+ ----
799
+
800
+ .Comparison: XML vs JSON/YAML for rich text
801
+
802
+ [cols="1,2,2"]
803
+ |===
804
+ | Aspect | XML Mixed Content | JSON/YAML Recursive Tree
805
+
806
+ | Ruby model attributes
807
+ | `content` (String), `emphasis` (collection)
808
+ | `content` (collection of Nodes), `children` (collection)
809
+
810
+ | Text storage
811
+ | Single `content` string attribute
812
+ | Separate `TextNode` objects with `value`
813
+
814
+ | Element nesting
815
+ | Flat - elements stored in collections
816
+ | Recursive - elements have `children` array
817
+
818
+ | Order tracking
819
+ | Via `element_order` + `each_mixed_content`
820
+ | Implicit in tree structure
821
+
822
+ | Iteration method
823
+ | `each_mixed_content`
824
+ | `node.children.each { |child| ... }`
825
+
826
+ | Whitespace
827
+ | Use `xml_space :preserve`
828
+ | Preserved naturally by tree structure
829
+ |===
830
+
831
+ .Dual-format serialization: Same content, different models
832
+
833
+ These are *separate model classes* by design, not one model that does both.
834
+ Each format family (XML vs JSON/YAML) requires a different data structure:
835
+
836
+ [source,ruby]
837
+ ----
838
+ # ============================================
839
+ # XML MODEL: Mixed Content Pattern
840
+ # ============================================
841
+ # Structure: content (String) + emphasis (collection)
842
+ # Use each_mixed_content to iterate in document order
843
+
844
+ class Docbook::Elements::Para < Lutaml::Model::Serializable
845
+ attribute :content, :string
846
+ attribute :emphasis, Docbook::Elements::Emphasis, collection: true
847
+
848
+ xml do
849
+ element "para"
850
+ mixed_content
851
+ map_content to: :content
852
+ map_element "emphasis", to: :emphasis
853
+ xml_space :preserve
854
+ end
855
+ end
856
+
857
+ class Docbook::Elements::Emphasis < Lutaml::Model::Serializable
858
+ attribute :role, :string
859
+ attribute :content, :string
860
+
861
+ xml do
862
+ element "emphasis"
863
+ map_attribute "role", to: :role
864
+ map_content to: :content
865
+ end
866
+ end
867
+
868
+ # ============================================
869
+ # JSON/YAML MODEL: Recursive Tree Pattern
870
+ # ============================================
871
+ # Structure: content (collection of Nodes) + children (in each node)
872
+ # Use natural tree traversal: node.children.each { ... }
873
+
874
+ class RichText::Node < Lutaml::Model::Serializable
875
+ # Base class for polymorphic node types
876
+ end
877
+
878
+ class RichText::TextNode < Lutaml::Model::Serializable
879
+ attribute :type, :string
880
+ attribute :value, :string
881
+
882
+ def type
883
+ "text"
884
+ end
885
+ end
886
+
887
+ class RichText::Emphasis < Lutaml::Model::Serializable
888
+ attribute :type, :string
889
+ attribute :role, :string
890
+ attribute :children, RichText::Node, collection: true
891
+
892
+ def type
893
+ "emphasis"
894
+ end
895
+ end
896
+
897
+ class RichText::Para < Lutaml::Model::Serializable
898
+ attribute :type, :string
899
+ attribute :content, RichText::Node, collection: true
900
+
901
+ def type
902
+ "para"
903
+ end
904
+ end
905
+
906
+ # Define JSON/YAML mappings separately
907
+ class RichText::TextNode
908
+ json do map "value", to: :value end
909
+ yaml do map "value", to: :value end
910
+ end
911
+
912
+ class RichText::Emphasis
913
+ json do
914
+ map "type", to: :type
915
+ map "role", to: :role
916
+ map "children", to: :children
917
+ end
918
+ yaml do
919
+ map "type", to: :type
920
+ map "role", to: :role
921
+ map "children", to: :children
922
+ end
923
+ end
924
+
925
+ class RichText::Para
926
+ json do
927
+ map "type", to: :type
928
+ map "content", to: :content
929
+ end
930
+ yaml do
931
+ map "type", to: :type
932
+ map "content", to: :content
933
+ end
934
+ end
935
+ ----
936
+
937
+ .Serialization examples
938
+
939
+ [source,ruby]
940
+ ----
941
+ # XML: Build model and serialize
942
+ xml_para = Docbook::Elements::Para.new(
943
+ content: "Hello ",
944
+ emphasis: [
945
+ Docbook::Elements::Emphasis.new(role: "bold", content: "world")
946
+ ]
947
+ )
948
+ xml_para.content += "!" # Append to string
949
+
950
+ puts xml_para.to_xml
951
+ # => <para xml:space="preserve">Hello <emphasis role="bold">world</emphasis>!</para>
952
+
953
+ # JSON: Build model and serialize
954
+ json_para = RichText::Para.new(
955
+ content: [
956
+ RichText::TextNode.new(value: "Hello "),
957
+ RichText::Emphasis.new(
958
+ role: "bold",
959
+ children: [RichText::TextNode.new(value: "world")]
960
+ ),
961
+ RichText::TextNode.new(value: "!")
962
+ ]
963
+ )
964
+
965
+ puts json_para.to_json
966
+ # => {"type":"para","content":[
967
+ # {"type":"text","value":"Hello "},
968
+ # {"type":"emphasis","role":"bold","children":[
969
+ # {"type":"text","value":"world"}
970
+ # ]},
971
+ # {"type":"text","value":"!"}
972
+ # ]}
973
+
974
+ # YAML also works:
975
+ puts json_para.to_yaml
976
+ ----
977
+ ====
978
+
979
+ .Whitespace handling for XML
980
+
981
+ For XML mixed content, use `xml_space :preserve` to maintain whitespace:
982
+
983
+ [source,ruby]
984
+ ----
985
+ class Docbook::Elements::Para < Lutaml::Model::Serializable
986
+ attribute :content, :string
987
+ attribute :emphasis, Docbook::Elements::Emphasis, collection: true
988
+
989
+ xml do
990
+ element "para"
991
+ mixed_content
992
+ xml_space :preserve # <-- Critical for rich text
993
+ map_content to: :content
994
+ map_element "emphasis", to: :emphasis
995
+ end
996
+ end
997
+ ----
998
+ ====
999
+
1000
+ == Sequence patterns
1001
+
1002
+ === Basic sequence
1003
+
1004
+ .Model with strict element ordering
1005
+ [example]
1006
+ ====
1007
+ [source,ruby]
1008
+ ----
1009
+ class Kiln < Lutaml::Model::Serializable
1010
+ attribute :id, :string
1011
+ attribute :name, :string
1012
+ attribute :type, :string
1013
+ attribute :color, :string
1014
+
1015
+ xml do
1016
+ sequence do
1017
+ map_element :id, to: :id
1018
+ map_element :name, to: :name
1019
+ map_element :type, to: :type
1020
+ map_element :color, to: :color
1021
+ end
1022
+ end
1023
+ end
1024
+ ----
1025
+
1026
+ [source,xml]
1027
+ ----
1028
+ <collection>
1029
+ <kiln>
1030
+ <id>1</id>
1031
+ <name>Nick</name>
1032
+ <type>Hard</type>
1033
+ <color>Black</color>
1034
+ </kiln>
1035
+ </collection>
1036
+ ----
1037
+
1038
+ If elements appear out of order, an error is raised.
1039
+ ====
1040
+
1041
+ === Sequence with namespace
1042
+
1043
+ .Combining sequence with namespace and XmlNamespace class
1044
+ [example]
1045
+ ====
1046
+ [source,ruby]
1047
+ ----
1048
+ class ContactNamespace < Lutaml::Model::XmlNamespace
1049
+ uri 'https://example.com/schemas/contact/v1'
1050
+ prefix_default 'contact'
1051
+ element_form_default :qualified
1052
+ end
1053
+
1054
+ class Person < Lutaml::Model::Serializable
1055
+ attribute :name, :string
1056
+ attribute :email, :string
1057
+
1058
+ xml do
1059
+ element "person"
1060
+ namespace ContactNamespace
1061
+
1062
+ sequence do
1063
+ map_element "name", to: :name
1064
+ map_element "email", to: :email
1065
+ end
1066
+ end
1067
+ end
1068
+ ----
1069
+
1070
+ [source,xml]
1071
+ ----
1072
+ <contact:person xmlns:contact="https://example.com/schemas/contact/v1">
1073
+ <contact:name>John Doe</contact:name>
1074
+ <contact:email>john@example.com</contact:email>
1075
+ </contact:person>
1076
+ ----
1077
+ ====
1078
+
1079
+ == Type-only models (no element)
1080
+
1081
+ === Embedded type pattern
1082
+
1083
+ .Type-only model used within parent
1084
+ [example]
1085
+ ====
1086
+ [source,ruby]
1087
+ ----
1088
+ # Type-only model - no element() or root() call
1089
+ class Address < Lutaml::Model::Serializable
1090
+ attribute :street, :string
1091
+ attribute :city, :string
1092
+ attribute :postal_code, :string
1093
+
1094
+ xml do
1095
+ # No element declaration - this is a type-only model
1096
+ sequence do
1097
+ map_element 'street', to: :street
1098
+ map_element 'city', to: :city
1099
+ map_element 'postalCode', to: :postal_code
1100
+ end
1101
+ end
1102
+ end
1103
+
1104
+ # Parent model using the type
1105
+ class Contact < Lutaml::Model::Serializable
1106
+ attribute :name, :string
1107
+ attribute :address, Address
1108
+
1109
+ xml do
1110
+ element 'contact'
1111
+
1112
+ sequence do
1113
+ map_element 'name', to: :name
1114
+ map_element 'address', to: :address
1115
+ end
1116
+ end
1117
+ end
1118
+ ----
1119
+
1120
+ [source,xml]
1121
+ ----
1122
+ <contact>
1123
+ <name>John Doe</name>
1124
+ <address>
1125
+ <street>123 Main St</street>
1126
+ <city>Metropolis</city>
1127
+ <postalCode>12345</postalCode>
1128
+ </address>
1129
+ </contact>
1130
+ ----
1131
+ ====
1132
+
1133
+ == CDATA patterns
1134
+
1135
+ === Forcing CDATA output
1136
+
1137
+ .Using cdata option to preserve special characters
1138
+ [example]
1139
+ ====
1140
+ [source,ruby]
1141
+ ----
1142
+ class Example < Lutaml::Model::Serializable
1143
+ attribute :name, :string
1144
+ attribute :description, :string
1145
+ attribute :title, :string
1146
+ attribute :note, :string
1147
+
1148
+ xml do
1149
+ root 'example'
1150
+ map_element :name, to: :name, cdata: true
1151
+ map_content to: :description, cdata: true
1152
+ map_element :title, to: :title, cdata: false
1153
+ map_element :note, to: :note, cdata: false
1154
+ end
1155
+ end
1156
+ ----
1157
+
1158
+ [source,xml]
1159
+ ----
1160
+ <example>
1161
+ <name><![CDATA[John]]></name>
1162
+ <![CDATA[here is the description]]>
1163
+ <title>Lutaml</title>
1164
+ <note>Careful</note>
1165
+ </example>
1166
+ ----
1167
+ ====
1168
+
1169
+ == XSD generation patterns
1170
+
1171
+ === Basic XSD generation
1172
+
1173
+ .Generating XSD from model
1174
+ [example]
1175
+ ====
1176
+ [source,ruby]
1177
+ ----
1178
+ class Contact < Lutaml::Model::Serializable
1179
+ attribute :name, :string
1180
+ attribute :email, :string
1181
+
1182
+ xml do
1183
+ element 'contact'
1184
+ map_element 'name', to: :name
1185
+ map_element 'email', to: :email
1186
+ end
1187
+ end
1188
+
1189
+ # Generate XSD
1190
+ xsd = Lutaml::Model::Schema.to_xml(Contact)
1191
+ puts xsd
1192
+ ----
1193
+ ====
1194
+
1195
+ === XSD with namespace and documentation
1196
+
1197
+ .Complete XSD generation with metadata
1198
+ [example]
1199
+ ====
1200
+ [source,ruby]
1201
+ ----
1202
+ class ContactNamespace < Lutaml::Model::XmlNamespace
1203
+ uri 'https://example.com/schemas/contact/v1'
1204
+ schema_location 'https://example.com/schemas/contact/v1/contact.xsd'
1205
+ prefix_default 'contact'
1206
+ element_form_default :qualified
1207
+ version '1.0'
1208
+ documentation "Contact information schema"
1209
+ end
1210
+
1211
+ class Contact < Lutaml::Model::Serializable
1212
+ attribute :name, :string
1213
+ attribute :email, :string
1214
+
1215
+ xml do
1216
+ element 'contact'
1217
+ namespace ContactNamespace
1218
+ documentation "A contact record"
1219
+
1220
+ sequence do
1221
+ map_element 'name', to: :name
1222
+ map_element 'email', to: :email
1223
+ end
1224
+ end
1225
+ end
1226
+
1227
+ # Generate XSD with options
1228
+ xsd = Lutaml::Model::Schema.to_xml(
1229
+ Contact,
1230
+ namespace: ContactNamespace.uri,
1231
+ prefix: ContactNamespace.prefix_default,
1232
+ output_dir: 'schemas',
1233
+ create_files: true
1234
+ )
1235
+ ----
1236
+ ====
1237
+
1238
+ == Qualification patterns
1239
+
1240
+ === Qualified elements pattern
1241
+
1242
+ .All elements namespace-qualified
1243
+ [example]
1244
+ ====
1245
+ [source,ruby]
1246
+ ----
1247
+ class CeramicNamespace < Lutaml::Model::XmlNamespace
1248
+ uri 'https://example.com/ceramic'
1249
+ prefix_default 'cer'
1250
+ element_form_default :qualified # All local elements qualified
1251
+ end
1252
+
1253
+ class Ceramic < Lutaml::Model::Serializable
1254
+ attribute :type, :string
1255
+ attribute :color, :string
1256
+
1257
+ xml do
1258
+ element 'ceramic'
1259
+ namespace CeramicNamespace
1260
+
1261
+ map_element 'type', to: :type
1262
+ map_element 'color', to: :color
1263
+ end
1264
+ end
1265
+ ----
1266
+
1267
+ [source,xml]
1268
+ ----
1269
+ <cer:ceramic xmlns:cer="https://example.com/ceramic">
1270
+ <cer:type>Porcelain</cer:type>
1271
+ <cer:color>White</cer:color>
1272
+ </cer:ceramic>
1273
+ ----
1274
+ ====
1275
+
1276
+ === Selective qualification
1277
+
1278
+ .Override qualification for specific elements
1279
+ [example]
1280
+ ====
1281
+ [source,ruby]
1282
+ ----
1283
+ class CeramicNamespace < Lutaml::Model::XmlNamespace
1284
+ uri 'https://example.com/ceramic'
1285
+ prefix_default 'cer'
1286
+ element_form_default :unqualified # Default: unqualified
1287
+ end
1288
+
1289
+ class Ceramic < Lutaml::Model::Serializable
1290
+ attribute :type, :string
1291
+ attribute :glaze, :string
1292
+ attribute :id, :string
1293
+
1294
+ xml do
1295
+ element 'ceramic'
1296
+ namespace CeramicNamespace
1297
+
1298
+ # Override to qualified
1299
+ map_element 'type', to: :type, form: :qualified
1300
+ # Use default (unqualified)
1301
+ map_element 'glaze', to: :glaze
1302
+ # Force attribute qualified
1303
+ map_attribute 'id', to: :id, form: :qualified
1304
+ end
1305
+ end
1306
+ ----
1307
+
1308
+ [source,xml]
1309
+ ----
1310
+ <cer:ceramic xmlns:cer="https://example.com/ceramic" cer:id="C001">
1311
+ <cer:type>Porcelain</cer:type>
1312
+ <glaze>Clear</glaze>
1313
+ </cer:ceramic>
1314
+ ----
1315
+ ====
1316
+
1317
+ == Collection patterns
1318
+
1319
+ === Element collections
1320
+
1321
+ .Model with element collection
1322
+ [example]
1323
+ ====
1324
+ [source,ruby]
1325
+ ----
1326
+ class CeramicCollection < Lutaml::Model::Serializable
1327
+ attribute :items, Ceramic, collection: true
1328
+
1329
+ xml do
1330
+ root 'ceramics'
1331
+ map_element 'ceramic', to: :items
1332
+ end
1333
+ end
1334
+ ----
1335
+
1336
+ [source,xml]
1337
+ ----
1338
+ <ceramics>
1339
+ <ceramic>...</ceramic>
1340
+ <ceramic>...</ceramic>
1341
+ <ceramic>...</ceramic>
1342
+ </ceramics>
1343
+ ----
1344
+ ====
1345
+
1346
+ === Attribute collections with delimiter
1347
+
1348
+ .XML attribute containing delimited values
1349
+ [example]
1350
+ ====
1351
+ [source,ruby]
1352
+ ----
1353
+ class TitleCollection < Lutaml::Model::Collection
1354
+ instances :items, :string
1355
+
1356
+ xml do
1357
+ root "titles"
1358
+ map_attribute "title", to: :items, delimiter: "; "
1359
+ end
1360
+ end
1361
+ ----
1362
+
1363
+ [source,xml]
1364
+ ----
1365
+ <titles title="Title One; Title Two; Title Three"/>
1366
+ ----
1367
+
1368
+ [source,ruby]
1369
+ ----
1370
+ collection = TitleCollection.from_xml(xml)
1371
+ collection.items
1372
+ # => ["Title One", "Title Two", "Title Three"]
1373
+ ----
1374
+ ====
1375
+
1376
+ == Character encoding patterns
1377
+
1378
+ === Per-instance encoding
1379
+
1380
+ .Setting encoding on model instance
1381
+ [example]
1382
+ ====
1383
+ [source,ruby]
1384
+ ----
1385
+ class JapaneseCeramic < Lutaml::Model::Serializable
1386
+ attribute :glaze_type, :string
1387
+ attribute :description, :string
1388
+
1389
+ xml do
1390
+ root 'JapaneseCeramic'
1391
+ map_attribute 'glazeType', to: :glaze_type
1392
+ map_element 'description', to: :description
1393
+ end
1394
+ end
1395
+
1396
+ # Create instance with UTF-8 data
1397
+ instance = JapaneseCeramic.new(
1398
+ glaze_type: "志野釉",
1399
+ description: "東京国立博物館コレクション"
1400
+ )
1401
+
1402
+ # Set character encoding to Shift_JIS
1403
+ instance.encoding = "Shift_JIS"
1404
+
1405
+ # Serialize with specified encoding
1406
+ serialization_output = instance.to_xml
1407
+ ----
1408
+ ====
1409
+
1410
+ === Per-export encoding
1411
+
1412
+ .Setting encoding during serialization
1413
+ [example]
1414
+ ====
1415
+ [source,ruby]
1416
+ ----
1417
+ ceramic_instance = Ceramic.new(
1418
+ potter: "John & Jane",
1419
+ description: " A ∑ series of ∏ porcelain µ vases."
1420
+ )
1421
+
1422
+ # Using default encoding of UTF-8
1423
+ ceramic_instance.to_xml
1424
+ # => <ceramic><potter>John &amp; Jane</potter> A ∑ series...</ceramic>
1425
+
1426
+ # Using ASCII encoding
1427
+ ceramic_instance.to_xml(encoding: "ASCII")
1428
+ # => <ceramic><potter>John &amp; Jane</potter> A &#8721; series...</ceramic>
1429
+ ----
1430
+ ====
1431
+
1432
+ == Import patterns with sequence
1433
+
1434
+ === Importing mappings in sequence
1435
+
1436
+ .Using import_model_mappings inside sequence
1437
+ [example]
1438
+ ====
1439
+ [source,ruby]
1440
+ ----
1441
+ class Address < Lutaml::Model::Serializable
1442
+ attribute :street, :string
1443
+ attribute :city, :string
1444
+ attribute :zip, :string
1445
+
1446
+ xml do
1447
+ no_root
1448
+
1449
+ map_element :street, to: :street
1450
+ map_element :city, to: :city
1451
+ map_element :zip, to: :zip
1452
+ end
1453
+ end
1454
+
1455
+ class Person < Lutaml::Model::Serializable
1456
+ attribute :name, :string
1457
+ import_model_attributes Address
1458
+
1459
+ xml do
1460
+ root "Person"
1461
+
1462
+ map_element :name, to: :name
1463
+ sequence do
1464
+ import_model_mappings Address
1465
+ end
1466
+ end
1467
+ end
1468
+ ----
1469
+
1470
+ [source,xml]
1471
+ ----
1472
+ <Person>
1473
+ <name>John Doe</name>
1474
+ <street>123 Main St</street>
1475
+ <city>Metropolis</city>
1476
+ <zip>12345</zip>
1477
+ </Person>
1478
+ ----
1479
+ ====
1480
+
1481
+ == XSD type override patterns
1482
+
1483
+ === Using xsd_type for IDs
1484
+
1485
+ .Specify XSD types for ID/IDREF
1486
+ [example]
1487
+ ====
1488
+ [source,ruby]
1489
+ ----
1490
+ class Product < Lutaml::Model::Serializable
1491
+ attribute :product_id, :string, xsd_type: 'xs:ID'
1492
+ attribute :category_ref, :string, xsd_type: 'xs:IDREF'
1493
+
1494
+ xml do
1495
+ element 'product'
1496
+ map_attribute 'id', to: :product_id
1497
+ map_attribute 'categoryRef', to: :category_ref
1498
+ end
1499
+ end
1500
+
1501
+ # Generated XSD:
1502
+ # <xs:attribute name="id" type="xs:ID"/>
1503
+ # <xs:attribute name="categoryRef" type="xs:IDREF"/>
1504
+ ----
1505
+ ====
1506
+
1507
+ === Using xsd_type for custom types
1508
+
1509
+ .Override automatic XSD type inference
1510
+ [example]
1511
+ ====
1512
+ [source,ruby]
1513
+ ----
1514
+ class Document < Lutaml::Model::Serializable
1515
+ attribute :language, :string, xsd_type: 'xs:language'
1516
+ attribute :content_type, :string, xsd_type: 'xs:token'
1517
+
1518
+ xml do
1519
+ element 'document'
1520
+ map_attribute 'lang', to: :language
1521
+ map_attribute 'contentType', to: :content_type
1522
+ end
1523
+ end
1524
+ ----
1525
+ ====
1526
+
1527
+ == Type-level namespace pattern
1528
+
1529
+ === Type with own namespace
1530
+
1531
+ .Custom type declaring its namespace
1532
+ [example]
1533
+ ====
1534
+ [source,ruby]
1535
+ ----
1536
+ # Define namespace for email types
1537
+ class EmailNamespace < Lutaml::Model::XmlNamespace
1538
+ uri 'https://example.com/types/email'
1539
+ prefix_default 'email'
1540
+ end
1541
+
1542
+ # Define type with namespace
1543
+ class EmailType < Lutaml::Model::Type::String
1544
+ xml do
1545
+ namespace EmailNamespace # <1>
1546
+ xsd_type 'EmailAddress' # <2>
1547
+ end
1548
+
1549
+ def self.cast(value)
1550
+ email = super(value)
1551
+ unless email.match?(/\A[\w+\-.]+@[a-z\d\-]+(\.[a-z\d\-]+)*\.[a-z]+\z/i)
1552
+ raise Lutaml::Model::TypeError, "Invalid email: #{email}"
1553
+ end
1554
+ email.downcase
1555
+ end
1556
+ end
1557
+
1558
+ class Contact < Lutaml::Model::Serializable
1559
+ attribute :email, EmailType
1560
+
1561
+ xml do
1562
+ element 'contact'
1563
+ namespace 'https://example.com/contact', 'c'
1564
+
1565
+ map_element 'email', to: :email # Uses EmailNamespace from EmailType
1566
+ end
1567
+ end
1568
+
1569
+ contact = Contact.new(email: "USER@EXAMPLE.COM")
1570
+ puts contact.to_xml
1571
+ # => <c:contact xmlns:c="https://example.com/contact"
1572
+ # xmlns:email="https://example.com/types/email">
1573
+ # <email:email>user@example.com</email:email>
1574
+ # </c:contact>
1575
+
1576
+ # Round-trip deserialization works
1577
+ parsed = Contact.from_xml(contact.to_xml)
1578
+ parsed.email # => "user@example.com"
1579
+ ----
1580
+ <1> Namespace directive associates EmailNamespace with this type
1581
+ <2> XSD type name for schema generation
1582
+ ====
1583
+
1584
+ === Multi-namespace document with Type namespaces
1585
+
1586
+ .Dublin Core metadata in document
1587
+ [example]
1588
+ ====
1589
+ [source,ruby]
1590
+ ----
1591
+ # Define namespaces
1592
+ class DocumentNamespace < Lutaml::Model::XmlNamespace
1593
+ uri 'https://example.com/document'
1594
+ prefix_default 'doc'
1595
+ end
1596
+
1597
+ class DublinCoreNamespace < Lutaml::Model::XmlNamespace
1598
+ uri 'http://purl.org/dc/elements/1.1/'
1599
+ prefix_default 'dc'
1600
+ end
1601
+
1602
+ # Define DC types with namespaces
1603
+ class DcTitleType < Lutaml::Model::Type::String
1604
+ xml do
1605
+ namespace DublinCoreNamespace
1606
+ xsd_type 'titleType'
1607
+ end
1608
+ end
1609
+
1610
+ class DcCreatorType < Lutaml::Model::Type::String
1611
+ xml do
1612
+ namespace DublinCoreNamespace
1613
+ xsd_type 'creatorType'
1614
+ end
1615
+ end
1616
+
1617
+ # Use in document model
1618
+ class Document < Lutaml::Model::Serializable
1619
+ namespace DocumentNamespace
1620
+
1621
+ attribute :title, DcTitleType
1622
+ attribute :creator, DcCreatorType
1623
+ attribute :content, :string
1624
+
1625
+ xml do
1626
+ root 'document'
1627
+
1628
+ map_element 'title', to: :title # Uses DublinCoreNamespace
1629
+ map_element 'creator', to: :creator # Uses DublinCoreNamespace
1630
+ map_element 'content', to: :content # No type namespace
1631
+ end
1632
+ end
1633
+
1634
+ doc = Document.new(
1635
+ title: 'Example Document',
1636
+ creator: 'John Doe',
1637
+ content: 'Document content'
1638
+ )
1639
+
1640
+ puts doc.to_xml
1641
+ # => <doc:document
1642
+ # xmlns:doc="https://example.com/document"
1643
+ # xmlns:dc="http://purl.org/dc/elements/1.1/">
1644
+ # <dc:title>Example Document</dc:title>
1645
+ # <dc:creator>John Doe</dc:creator>
1646
+ # <content>Document content</content>
1647
+ # </doc:document>
1648
+
1649
+ # Round-trip works correctly
1650
+ parsed = Document.from_xml(doc.to_xml)
1651
+ parsed == doc # => true
1652
+ ----
1653
+ ====
1654
+
1655
+ === Multi-namespace document with consolidated declarations
1656
+
1657
+ .Using namespace_scope for cleaner multi-namespace XML
1658
+ [example]
1659
+ ====
1660
+ [source,ruby]
1661
+ ----
1662
+ # Define namespaces
1663
+ class VcardNamespace < Lutaml::Model::XmlNamespace
1664
+ uri "urn:ietf:params:xml:ns:vcard-4.0"
1665
+ prefix_default "vcard"
1666
+ end
1667
+
1668
+ class DcNamespace < Lutaml::Model::XmlNamespace
1669
+ uri "http://purl.org/dc/elements/1.1/"
1670
+ prefix_default "dc"
1671
+ end
1672
+
1673
+ class DctermsNamespace < Lutaml::Model::XmlNamespace
1674
+ uri "http://purl.org/dc/terms/"
1675
+ prefix_default "dcterms"
1676
+ end
1677
+
1678
+ # Define types with namespaces
1679
+ class DcTitleType < Lutaml::Model::Type::String
1680
+ xml do
1681
+ namespace DcNamespace
1682
+ end
1683
+ end
1684
+
1685
+ class DctermsCreatedType < Lutaml::Model::Type::DateTime
1686
+ xml do
1687
+ namespace DctermsNamespace
1688
+ end
1689
+ end
1690
+
1691
+ class VcardVersion < Lutaml::Model::Type::String
1692
+ xml do
1693
+ namespace VcardNamespace
1694
+ end
1695
+ end
1696
+
1697
+ # Use namespace_scope to consolidate declarations
1698
+ class Vcard < Lutaml::Model::Serializable
1699
+ namespace VcardNamespace
1700
+
1701
+ attribute :version, VcardVersion
1702
+ attribute :title, DcTitleType
1703
+ attribute :full_name, :string
1704
+ attribute :created, DctermsCreatedType
1705
+
1706
+ xml do
1707
+ root "vCard"
1708
+ namespace_scope [VcardNamespace, DcNamespace, DctermsNamespace] <1>
1709
+
1710
+ map_element "version", to: :version
1711
+ map_element "title", to: :title
1712
+ map_element "fn", to: :full_name
1713
+ map_element "created", to: :created
1714
+ end
1715
+ end
1716
+
1717
+ vcard = Vcard.new(
1718
+ version: "4.0",
1719
+ title: "Contact: Dr. John Doe",
1720
+ full_name: "Dr. John Doe",
1721
+ created: DateTime.parse("2024-06-01T12:00:00Z")
1722
+ )
1723
+
1724
+ puts vcard.to_xml
1725
+ # => <vcard:vCard xmlns:vcard="urn:ietf:params:xml:ns:vcard-4.0"
1726
+ # xmlns:dc="http://purl.org/dc/elements/1.1/"
1727
+ # xmlns:dcterms="http://purl.org/dc/terms/">
1728
+ # <vcard:version>4.0</vcard:version>
1729
+ # <dc:title>Contact: Dr. John Doe</dc:title>
1730
+ # <vcard:fn>Dr. John Doe</vcard:fn>
1731
+ # <dcterms:created>2024-06-01T12:00:00+00:00</dcterms:created>
1732
+ # </vcard:vCard>
1733
+
1734
+ # Round-trip deserialization works
1735
+ parsed = Vcard.from_xml(vcard.to_xml)
1736
+ parsed == vcard # => true
1737
+ ----
1738
+ <1> All three namespaces declared at root for cleaner output
1739
+ ====
1740
+
1741
+ == schemaLocation pattern
1742
+
1743
+ === Automatic xsi:schemaLocation
1744
+
1745
+ .Using schema_location metadata attribute
1746
+ [example]
1747
+ ====
1748
+ [source,ruby]
1749
+ ----
1750
+ class CeramicNamespace < Lutaml::Model::XmlNamespace
1751
+ uri 'http://example.com/ceramic'
1752
+ prefix_default 'cera'
1753
+ element_form_default :qualified
1754
+ end
1755
+
1756
+ class ColorNamespace < Lutaml::Model::XmlNamespace
1757
+ uri 'http://example.com/color'
1758
+ prefix_default 'clr'
1759
+ end
1760
+
1761
+ class Ceramic < Lutaml::Model::Serializable
1762
+ attribute :type, :string
1763
+ attribute :glaze, :string
1764
+ attribute :color, :string
1765
+
1766
+ xml do
1767
+ root 'Ceramic'
1768
+ namespace CeramicNamespace
1769
+ map_element 'Type', to: :type # Inherits parent namespace (qualified)
1770
+ map_element 'Glaze', to: :glaze
1771
+ map_attribute 'color', to: :color # Per W3C, attributes don't inherit namespace
1772
+ end
1773
+ end
1774
+
1775
+ xml_content = <<~XML
1776
+ <cera:Ceramic
1777
+ xmlns:cera="http://example.com/ceramic"
1778
+ xmlns:clr="http://example.com/color"
1779
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1780
+ clr:color="navy-blue"
1781
+ xsi:schemaLocation="
1782
+ http://example.com/ceramic http://example.com/ceramic.xsd
1783
+ http://example.com/color http://example.com/color.xsd
1784
+ ">
1785
+ <cera:Type>Porcelain</cera:Type>
1786
+ <Glaze>Clear</Glaze>
1787
+ </cera:Ceramic>
1788
+ XML
1789
+
1790
+ c = Ceramic.from_xml(xml_content)
1791
+ schema_loc = c.schema_location # Automatically captured
1792
+
1793
+ # Round-trip with schema location preserved
1794
+ new_c = Ceramic.new(
1795
+ type: "Porcelain",
1796
+ glaze: "Clear",
1797
+ color: "navy-blue",
1798
+ schema_location: schema_loc
1799
+ )
1800
+ puts new_c.to_xml
1801
+ # xsi:schemaLocation automatically included
1802
+ ----
1803
+ ====