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