lutaml-model 0.7.7 → 0.8.15
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 +10 -0
- data/.github/workflows/dependent-tests.yml +9 -0
- data/.github/workflows/docs.yml +59 -0
- data/.github/workflows/downstream-performance.yml +153 -0
- data/.github/workflows/opal.yml +31 -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/.rspec-opal +5 -0
- data/.rubocop.yml +32 -2
- data/.rubocop_todo.yml +463 -88
- data/Gemfile +15 -9
- data/README.adoc +14117 -6914
- data/RELEASE_NOTES.adoc +53 -2
- 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/document-validation.adoc +303 -0
- data/docs/_guides/index.adoc +94 -0
- data/docs/_guides/jsonld-serialization.adoc +219 -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/_guides/opal.adoc +221 -0
- data/docs/_guides/rdf-serialization.adoc +430 -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/turtle-serialization.adoc +237 -0
- 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 +1861 -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 +996 -0
- data/docs/_guides/xml_mappings/08_troubleshooting.adoc +1023 -0
- data/docs/_migrations/0-1-0-migrate-from-shale.adoc +304 -0
- data/docs/_migrations/0-8-0-namespace-restructuring.adoc +1662 -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 +1670 -0
- data/docs/_pages/comparison-with-shale.adoc +139 -0
- data/docs/_pages/configuration.adoc +311 -0
- data/docs/_pages/consolidation-mapping.adoc +252 -0
- data/docs/_pages/importable_models.adoc +592 -0
- data/docs/_pages/index.adoc +47 -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 +351 -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 +48 -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/rdf-namespaces.adoc +243 -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 +1359 -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 +110 -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 +17 -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 +17 -0
- data/lib/lutaml/json/adapter/mapping_rule.rb +9 -0
- data/lib/lutaml/json/adapter/multi_json_adapter.rb +40 -0
- data/lib/lutaml/json/adapter/oj_adapter.rb +40 -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 +17 -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/jsonld/adapter.rb +23 -0
- data/lib/lutaml/jsonld/context.rb +69 -0
- data/lib/lutaml/jsonld/term_definition.rb +39 -0
- data/lib/lutaml/jsonld/transform.rb +251 -0
- data/lib/lutaml/jsonld.rb +23 -0
- data/lib/lutaml/key_value/adapter/hash/document.rb +13 -0
- data/lib/lutaml/key_value/adapter/hash/mapping.rb +17 -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 +22 -0
- data/lib/lutaml/key_value/adapter/json/mapping_rule.rb +14 -0
- data/lib/lutaml/key_value/adapter/json/multi_json_adapter.rb +45 -0
- data/lib/lutaml/key_value/adapter/json/oj_adapter.rb +45 -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 +17 -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 +26 -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 +17 -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 +17 -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/key_value/mapping.rb +290 -0
- 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} +114 -68
- data/lib/lutaml/key_value/transformation/collection_serializer.rb +589 -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 +1081 -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 +405 -0
- data/lib/lutaml/model/adapter_scope.rb +64 -0
- data/lib/lutaml/model/attribute.rb +536 -123
- data/lib/lutaml/model/attribute_validator.rb +290 -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 +145 -0
- data/lib/lutaml/model/choice.rb +230 -13
- data/lib/lutaml/model/cli.rb +75 -121
- data/lib/lutaml/model/collection.rb +511 -44
- data/lib/lutaml/model/collection_handler.rb +106 -0
- data/lib/lutaml/model/comparable_model.rb +21 -13
- 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/deep_dupable.rb +16 -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/liquid_drop_already_registered_error.rb +11 -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/no_root_mapping_error.rb +6 -5
- data/lib/lutaml/model/error/no_root_namespace_error.rb +6 -5
- data/lib/lutaml/model/error/ordered_content_mapping_error.rb +17 -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/type_only_mapping_error.rb +13 -0
- data/lib/lutaml/model/error/type_only_namespace_error.rb +12 -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 +181 -9
- data/lib/lutaml/model/global_context.rb +447 -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 +112 -18
- data/lib/lutaml/model/liquid/indexed_access.rb +33 -0
- data/lib/lutaml/model/liquid/mapping.rb +30 -0
- data/lib/lutaml/model/liquid.rb +10 -0
- data/lib/lutaml/model/mapping/listener.rb +126 -0
- data/lib/lutaml/model/mapping/mapping.rb +113 -1
- data/lib/lutaml/model/mapping/mapping_rule.rb +188 -23
- 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 +4 -2
- 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 +148 -0
- data/lib/lutaml/model/runtime_compatibility.rb +94 -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 -4
- 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 +261 -87
- 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 +104 -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/deserialization_context.rb +50 -0
- data/lib/lutaml/model/serialize/enum_handling.rb +124 -0
- data/lib/lutaml/model/serialize/format_conversion.rb +353 -0
- data/lib/lutaml/model/serialize/initialization.rb +432 -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 +172 -578
- data/lib/lutaml/model/services/base.rb +2 -0
- 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 +23 -36
- data/lib/lutaml/model/services/transformer.rb +95 -19
- 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 +181 -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 +99 -19
- 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 +19 -22
- 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 +285 -0
- data/lib/lutaml/model/type_registry.rb +165 -0
- data/lib/lutaml/model/type_resolver.rb +180 -0
- data/lib/lutaml/model/type_substitution.rb +117 -0
- data/lib/lutaml/model/uninitialized_class.rb +12 -6
- data/lib/lutaml/model/utils.rb +144 -19
- data/lib/lutaml/model/validation/concerns/has_issues.rb +27 -0
- data/lib/lutaml/model/validation/context.rb +36 -0
- data/lib/lutaml/model/validation/issue.rb +62 -0
- data/lib/lutaml/model/validation/layer_result.rb +34 -0
- data/lib/lutaml/model/validation/profile.rb +66 -0
- data/lib/lutaml/model/validation/registry.rb +60 -0
- data/lib/lutaml/model/validation/remediation.rb +33 -0
- data/lib/lutaml/model/validation/remediation_result.rb +20 -0
- data/lib/lutaml/model/validation/report.rb +39 -0
- data/lib/lutaml/model/validation/rule.rb +59 -0
- data/lib/lutaml/model/validation.rb +59 -9
- data/lib/lutaml/model/validation_framework.rb +77 -0
- 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 +243 -25
- data/lib/lutaml/rdf/error.rb +7 -0
- data/lib/lutaml/rdf/iri.rb +44 -0
- data/lib/lutaml/rdf/language_tagged.rb +11 -0
- data/lib/lutaml/rdf/literal.rb +62 -0
- data/lib/lutaml/rdf/mapping.rb +86 -0
- data/lib/lutaml/rdf/mapping_rule.rb +52 -0
- data/lib/lutaml/rdf/member_rule.rb +55 -0
- data/lib/lutaml/rdf/namespace.rb +58 -0
- data/lib/lutaml/rdf/namespace_set.rb +69 -0
- data/lib/lutaml/rdf/namespaces/dcterms_namespace.rb +12 -0
- data/lib/lutaml/rdf/namespaces/owl_namespace.rb +12 -0
- data/lib/lutaml/rdf/namespaces/rdf_namespace.rb +14 -0
- data/lib/lutaml/rdf/namespaces/rdfs_namespace.rb +12 -0
- data/lib/lutaml/rdf/namespaces/skos_namespace.rb +12 -0
- data/lib/lutaml/rdf/namespaces/xsd_namespace.rb +12 -0
- data/lib/lutaml/rdf/namespaces.rb +14 -0
- data/lib/lutaml/rdf/transform.rb +45 -0
- data/lib/lutaml/rdf.rb +19 -0
- data/lib/lutaml/{model/toml → toml/adapter}/document.rb +3 -4
- data/lib/lutaml/toml/adapter/mapping.rb +26 -0
- 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/turtle/adapter.rb +35 -0
- data/lib/lutaml/turtle/mapping.rb +7 -0
- data/lib/lutaml/turtle/transform.rb +249 -0
- data/lib/lutaml/turtle.rb +22 -0
- data/lib/lutaml/xml/adapter/adapter_helpers.rb +108 -0
- data/lib/lutaml/xml/adapter/base_adapter.rb +249 -0
- data/lib/lutaml/xml/adapter/namespace_data.rb +56 -0
- data/lib/lutaml/xml/adapter/namespace_uri_collector.rb +71 -0
- data/lib/lutaml/xml/adapter/nokogiri_adapter.rb +16 -0
- data/lib/lutaml/xml/adapter/oga_adapter.rb +16 -0
- data/lib/lutaml/xml/adapter/ox_adapter.rb +16 -0
- data/lib/lutaml/xml/adapter/plan_based_builder.rb +929 -0
- data/lib/lutaml/xml/adapter/rexml_adapter.rb +21 -0
- data/lib/lutaml/xml/adapter/xml_parser.rb +86 -0
- data/lib/lutaml/xml/adapter/xml_serializer.rb +311 -0
- data/lib/lutaml/xml/adapter.rb +23 -0
- data/lib/lutaml/xml/adapter_element.rb +215 -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 +253 -0
- data/lib/lutaml/xml/builder/nokogiri.rb +10 -0
- data/lib/lutaml/xml/builder/oga.rb +13 -0
- data/lib/lutaml/xml/builder/ox.rb +13 -0
- data/lib/lutaml/xml/builder/rexml.rb +13 -0
- data/lib/lutaml/xml/builder.rb +17 -0
- data/lib/lutaml/xml/configurable.rb +215 -0
- data/lib/lutaml/xml/data_model.rb +279 -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 +115 -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 +1848 -0
- data/lib/lutaml/xml/doctype_extractor.rb +51 -0
- data/lib/lutaml/xml/document.rb +385 -0
- data/lib/lutaml/xml/element.rb +102 -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 +1479 -0
- data/lib/lutaml/xml/mapping_rule.rb +578 -0
- data/lib/lutaml/xml/model_transform.rb +984 -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 +179 -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 +110 -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 +270 -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 +376 -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 +202 -0
- data/lib/lutaml/xml/schema/xsd/schema_validator.rb +259 -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 +166 -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 +16 -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 +380 -0
- data/lib/lutaml/xml/serialization/instance_methods.rb +298 -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 +241 -0
- data/lib/lutaml/xml/transformation/element_builder.rb +588 -0
- data/lib/lutaml/xml/transformation/ordered_applier.rb +373 -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 +137 -0
- data/lib/lutaml/xml/transformation.rb +379 -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 +153 -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 +460 -0
- data/lib/lutaml/xml/xml_namespace.rb +72 -0
- data/lib/lutaml/xml/xml_orderable.rb +17 -0
- data/lib/lutaml/xml.rb +290 -0
- data/lib/lutaml/{model/yaml → yaml/adapter}/document.rb +3 -3
- data/lib/lutaml/yaml/adapter/mapping.rb +17 -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 +30 -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 +10 -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/integration/edge_cases_spec.rb +109 -0
- data/spec/lutaml/integration/multi_format_spec.rb +106 -0
- data/spec/lutaml/integration/round_trip_spec.rb +170 -0
- data/spec/lutaml/jsonld/adapter_spec.rb +46 -0
- data/spec/lutaml/jsonld/context_spec.rb +114 -0
- data/spec/lutaml/jsonld/term_definition_spec.rb +55 -0
- data/spec/lutaml/jsonld/transform_spec.rb +597 -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 +10 -7
- data/spec/lutaml/model/attribute_default_cache_spec.rb +58 -0
- data/spec/lutaml/model/attribute_form_default_spec.rb +252 -0
- data/spec/lutaml/model/attribute_spec.rb +335 -56
- 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 +324 -30
- 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 +187 -120
- 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 +203 -64
- 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 +281 -26
- data/spec/lutaml/model/liquid/indexed_access_spec.rb +135 -0
- data/spec/lutaml/model/liquid_compatibility_spec.rb +442 -0
- 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/opal_smoke_spec.rb +117 -0
- data/spec/lutaml/model/optimization_spec.rb +228 -0
- data/spec/lutaml/model/ordered_content_spec.rb +116 -25
- 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_methods_spec.rb +149 -0
- 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/services/transformer_spec.rb +43 -0
- data/spec/lutaml/model/simple_model_spec.rb +4 -4
- data/spec/lutaml/model/store_spec.rb +315 -0
- data/spec/lutaml/model/toml_adapter_spec.rb +11 -4
- data/spec/lutaml/model/toml_spec.rb +46 -2
- data/spec/lutaml/model/transform_cache_spec.rb +104 -0
- data/spec/lutaml/model/transform_dynamic_attributes_spec.rb +41 -0
- 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/uninitialized_class_deep_dup_spec.rb +39 -0
- data/spec/lutaml/model/uninitialized_class_spec.rb +14 -2
- data/spec/lutaml/model/utils_spec.rb +39 -24
- data/spec/lutaml/model/validation/concerns/has_issues_spec.rb +76 -0
- data/spec/lutaml/model/validation/context_spec.rb +60 -0
- data/spec/lutaml/model/validation/issue_spec.rb +77 -0
- data/spec/lutaml/model/validation/layer_result_spec.rb +66 -0
- data/spec/lutaml/model/validation/profile_spec.rb +134 -0
- data/spec/lutaml/model/validation/registry_spec.rb +94 -0
- data/spec/lutaml/model/validation/remediation_result_spec.rb +23 -0
- data/spec/lutaml/model/validation/remediation_spec.rb +72 -0
- data/spec/lutaml/model/validation/report_spec.rb +58 -0
- data/spec/lutaml/model/validation/rule_spec.rb +134 -0
- data/spec/lutaml/model/validation/uninitialized_class_validate_spec.rb +29 -0
- data/spec/lutaml/model/validation/validation_error_spec.rb +29 -0
- data/spec/lutaml/model/validation/validation_framework_spec.rb +110 -0
- 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 +277 -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/rdf/graph_serialization_spec.rb +137 -0
- data/spec/lutaml/rdf/iri_spec.rb +73 -0
- data/spec/lutaml/rdf/literal_spec.rb +98 -0
- data/spec/lutaml/rdf/mapping_rule_spec.rb +97 -0
- data/spec/lutaml/rdf/mapping_spec.rb +298 -0
- data/spec/lutaml/rdf/member_rule_spec.rb +160 -0
- data/spec/lutaml/rdf/namespace_set_spec.rb +115 -0
- data/spec/lutaml/rdf/namespace_spec.rb +241 -0
- data/spec/lutaml/rdf/rdf_transform_spec.rb +148 -0
- data/spec/lutaml/turtle/adapter_spec.rb +47 -0
- data/spec/lutaml/turtle/mapping_spec.rb +123 -0
- data/spec/lutaml/turtle/transform_spec.rb +732 -0
- data/spec/lutaml/xml/adapter/base_adapter_regression_spec.rb +151 -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/order_spec.rb +150 -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/clear_parse_state_spec.rb +146 -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/content_model_validation_spec.rb +159 -0
- data/spec/lutaml/xml/data_model_spec.rb +282 -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 +413 -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 +693 -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/indent_spec.rb +109 -0
- data/spec/lutaml/xml/line_ending_spec.rb +66 -0
- 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 +1152 -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/opal_xml_spec.rb +145 -0
- data/spec/lutaml/xml/ordered_method_spec.rb +109 -0
- data/spec/lutaml/xml/pipeline_integration_spec.rb +145 -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} +268 -137
- 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 +330 -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 +777 -0
- data/spec/lutaml/xml/schema/xsd/schema_validator_spec.rb +228 -0
- data/spec/lutaml/xml/schema/xsd/spec_helper.rb +27 -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 +247 -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 +173 -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/opal.rb +6 -0
- 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 +1576 -101
- 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/mapping/key_value_mapping.rb +0 -227
- data/lib/lutaml/model/schema/xsd_schema.rb +0 -62
- data/lib/lutaml/model/toml/mapping.rb +0 -27
- 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/liquid_templates/_ceramics.liquid +0 -3
- 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,1754 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: XmlNamespace class reference
|
|
3
|
+
nav_order: 4
|
|
4
|
+
parent: XML Mappings Guide
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
= XmlNamespace class reference
|
|
8
|
+
|
|
9
|
+
== Overview
|
|
10
|
+
|
|
11
|
+
The `XmlNamespace` class provides
|
|
12
|
+
declarative namespace metadata following W3C XML Namespace and XSD
|
|
13
|
+
specifications.
|
|
14
|
+
|
|
15
|
+
Benefits:
|
|
16
|
+
|
|
17
|
+
* Reusable namespace definitions across models
|
|
18
|
+
* Full XSD generation support
|
|
19
|
+
* Control over qualification behavior
|
|
20
|
+
* Documentation and versioning
|
|
21
|
+
* Multi-schema support via imports/includes
|
|
22
|
+
|
|
23
|
+
== Creating namespace classes
|
|
24
|
+
|
|
25
|
+
Inherit from `Lutaml::Model::XmlNamespace`
|
|
26
|
+
and use DSL methods:
|
|
27
|
+
|
|
28
|
+
[source,ruby]
|
|
29
|
+
----
|
|
30
|
+
class MyNamespace < Lutaml::Model::XmlNamespace
|
|
31
|
+
uri 'namespace-uri' # Required
|
|
32
|
+
schema_location 'schema-url' # Optional
|
|
33
|
+
prefix_default 'prefix' # Optional
|
|
34
|
+
element_form_default :qualified # Optional
|
|
35
|
+
attribute_form_default :unqualified # Optional
|
|
36
|
+
version '1.0' # Optional
|
|
37
|
+
documentation 'Schema description' # Optional
|
|
38
|
+
imports OtherNamespace # Optional
|
|
39
|
+
includes 'schema-file.xsd' # Optional
|
|
40
|
+
end
|
|
41
|
+
----
|
|
42
|
+
|
|
43
|
+
== DSL methods reference
|
|
44
|
+
|
|
45
|
+
=== `uri`
|
|
46
|
+
|
|
47
|
+
Sets the namespace URI that uniquely identifies this namespace.
|
|
48
|
+
|
|
49
|
+
Syntax:
|
|
50
|
+
|
|
51
|
+
[source,ruby]
|
|
52
|
+
----
|
|
53
|
+
uri 'namespace-uri-string'
|
|
54
|
+
----
|
|
55
|
+
|
|
56
|
+
This is the fundamental identifier used in `xmlns` declarations.
|
|
57
|
+
|
|
58
|
+
.Setting namespace URI
|
|
59
|
+
[example]
|
|
60
|
+
====
|
|
61
|
+
[source,ruby]
|
|
62
|
+
----
|
|
63
|
+
class CeramicNamespace < Lutaml::Model::XmlNamespace
|
|
64
|
+
uri 'https://example.com/schemas/ceramic/v1'
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# Results in XML: xmlns="https://example.com/schemas/ceramic/v1"
|
|
68
|
+
# Or with prefix: xmlns:cer="https://example.com/schemas/ceramic/v1"
|
|
69
|
+
----
|
|
70
|
+
====
|
|
71
|
+
|
|
72
|
+
=== `schema_location`
|
|
73
|
+
|
|
74
|
+
Sets the URL where the XSD schema file can be found.
|
|
75
|
+
|
|
76
|
+
Syntax:
|
|
77
|
+
|
|
78
|
+
[source,ruby]
|
|
79
|
+
----
|
|
80
|
+
schema_location 'schema-url-or-path'
|
|
81
|
+
----
|
|
82
|
+
|
|
83
|
+
Used in `xsi:schemaLocation` attributes for schema validation.
|
|
84
|
+
|
|
85
|
+
.Setting schema location
|
|
86
|
+
[example]
|
|
87
|
+
====
|
|
88
|
+
[source,ruby]
|
|
89
|
+
----
|
|
90
|
+
class CeramicNamespace < Lutaml::Model::XmlNamespace
|
|
91
|
+
uri 'https://example.com/schemas/ceramic/v1'
|
|
92
|
+
schema_location 'https://example.com/schemas/ceramic/v1/ceramic.xsd'
|
|
93
|
+
end
|
|
94
|
+
----
|
|
95
|
+
====
|
|
96
|
+
|
|
97
|
+
=== `prefix_default`
|
|
98
|
+
|
|
99
|
+
Sets the default prefix for this namespace.
|
|
100
|
+
|
|
101
|
+
Syntax:
|
|
102
|
+
|
|
103
|
+
[source,ruby]
|
|
104
|
+
----
|
|
105
|
+
prefix_default 'prefix' # or :prefix (symbol)
|
|
106
|
+
----
|
|
107
|
+
|
|
108
|
+
The prefix can be overridden at runtime when creating namespace instances.
|
|
109
|
+
|
|
110
|
+
.Setting default prefix
|
|
111
|
+
[example]
|
|
112
|
+
====
|
|
113
|
+
[source,ruby]
|
|
114
|
+
----
|
|
115
|
+
class CeramicNamespace < Lutaml::Model::XmlNamespace
|
|
116
|
+
uri 'https://example.com/schemas/ceramic/v1'
|
|
117
|
+
prefix_default 'cer'
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# Default usage: xmlns:cer="https://..."
|
|
121
|
+
# Runtime override: xmlns:ceramic="https://..."
|
|
122
|
+
----
|
|
123
|
+
====
|
|
124
|
+
|
|
125
|
+
=== `element_form_default`
|
|
126
|
+
|
|
127
|
+
Controls whether locally declared elements must be namespace-qualified by
|
|
128
|
+
default.
|
|
129
|
+
|
|
130
|
+
Syntax:
|
|
131
|
+
|
|
132
|
+
[source,ruby]
|
|
133
|
+
----
|
|
134
|
+
element_form_default :qualified # or :unqualified (default)
|
|
135
|
+
----
|
|
136
|
+
|
|
137
|
+
Values:
|
|
138
|
+
|
|
139
|
+
`:qualified`::: Local elements must include namespace prefix
|
|
140
|
+
`:unqualified`::: Local elements have no namespace prefix (default)
|
|
141
|
+
|
|
142
|
+
.Setting element qualification default
|
|
143
|
+
[example]
|
|
144
|
+
====
|
|
145
|
+
[source,ruby]
|
|
146
|
+
----
|
|
147
|
+
class CeramicNamespace < Lutaml::Model::XmlNamespace
|
|
148
|
+
uri 'https://example.com/schemas/ceramic/v1'
|
|
149
|
+
prefix_default 'cer'
|
|
150
|
+
element_form_default :qualified
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
# With :qualified, child elements get: <cer:type>...</cer:type>
|
|
154
|
+
# With :unqualified, child elements get: <type>...</type>
|
|
155
|
+
----
|
|
156
|
+
====
|
|
157
|
+
|
|
158
|
+
=== `attribute_form_default`
|
|
159
|
+
|
|
160
|
+
Controls whether locally declared attributes must be namespace-qualified by
|
|
161
|
+
default.
|
|
162
|
+
|
|
163
|
+
Syntax:
|
|
164
|
+
|
|
165
|
+
[source,ruby]
|
|
166
|
+
----
|
|
167
|
+
attribute_form_default :qualified # or :unqualified (default)
|
|
168
|
+
----
|
|
169
|
+
|
|
170
|
+
Values:
|
|
171
|
+
|
|
172
|
+
`:qualified`::: Local attributes must include namespace prefix
|
|
173
|
+
`:unqualified`::: Local attributes have no namespace prefix (default)
|
|
174
|
+
|
|
175
|
+
NOTE: Per W3C conventions, attributes are typically unqualified.
|
|
176
|
+
|
|
177
|
+
.Setting attribute qualification default
|
|
178
|
+
[example]
|
|
179
|
+
====
|
|
180
|
+
[source,ruby]
|
|
181
|
+
----
|
|
182
|
+
class CeramicNamespace < Lutaml::Model::XmlNamespace
|
|
183
|
+
uri 'https://example.com/schemas/ceramic/v1'
|
|
184
|
+
prefix_default 'cer'
|
|
185
|
+
attribute_form_default :unqualified # Typically left unqualified
|
|
186
|
+
end
|
|
187
|
+
----
|
|
188
|
+
====
|
|
189
|
+
|
|
190
|
+
=== `imports`
|
|
191
|
+
|
|
192
|
+
Declares dependencies on other namespaces via XSD `import` directive.
|
|
193
|
+
|
|
194
|
+
Syntax:
|
|
195
|
+
|
|
196
|
+
[source,ruby]
|
|
197
|
+
----
|
|
198
|
+
imports OtherNamespace1, OtherNamespace2, ...
|
|
199
|
+
----
|
|
200
|
+
|
|
201
|
+
Used when referencing types from other namespaces.
|
|
202
|
+
|
|
203
|
+
.Importing other namespaces
|
|
204
|
+
[example]
|
|
205
|
+
====
|
|
206
|
+
[source,ruby]
|
|
207
|
+
----
|
|
208
|
+
class AddressNamespace < Lutaml::Model::XmlNamespace
|
|
209
|
+
uri 'https://example.com/schemas/address/v1'
|
|
210
|
+
prefix_default 'addr'
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
class ContactNamespace < Lutaml::Model::XmlNamespace
|
|
214
|
+
uri 'https://example.com/schemas/contact/v1'
|
|
215
|
+
prefix_default 'contact'
|
|
216
|
+
imports AddressNamespace # Import address namespace
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
# Generates in XSD:
|
|
220
|
+
# <xs:import namespace="https://example.com/schemas/address/v1"
|
|
221
|
+
# schemaLocation="..." />
|
|
222
|
+
----
|
|
223
|
+
====
|
|
224
|
+
|
|
225
|
+
=== `includes`
|
|
226
|
+
|
|
227
|
+
Declares schema components from the same namespace via XSD `include`
|
|
228
|
+
directive.
|
|
229
|
+
|
|
230
|
+
Syntax:
|
|
231
|
+
|
|
232
|
+
[source,ruby]
|
|
233
|
+
----
|
|
234
|
+
includes 'schema-file.xsd', 'another-file.xsd', ...
|
|
235
|
+
----
|
|
236
|
+
|
|
237
|
+
Used for modular schema organization within the same namespace.
|
|
238
|
+
|
|
239
|
+
.Including schema files
|
|
240
|
+
[example]
|
|
241
|
+
====
|
|
242
|
+
[source,ruby]
|
|
243
|
+
----
|
|
244
|
+
class ContactNamespace < Lutaml::Model::XmlNamespace
|
|
245
|
+
uri 'https://example.com/schemas/contact/v1'
|
|
246
|
+
prefix_default 'contact'
|
|
247
|
+
includes 'contact-common.xsd', 'contact-extensions.xsd'
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
# Generates in XSD:
|
|
251
|
+
# <xs:include schemaLocation="contact-common.xsd" />
|
|
252
|
+
# <xs:include schemaLocation="contact-extensions.xsd" />
|
|
253
|
+
----
|
|
254
|
+
====
|
|
255
|
+
|
|
256
|
+
=== `version`
|
|
257
|
+
|
|
258
|
+
Sets the schema version for documentation and tracking.
|
|
259
|
+
|
|
260
|
+
Syntax:
|
|
261
|
+
|
|
262
|
+
[source,ruby]
|
|
263
|
+
----
|
|
264
|
+
version 'version-string'
|
|
265
|
+
----
|
|
266
|
+
|
|
267
|
+
.Setting schema version
|
|
268
|
+
[example]
|
|
269
|
+
====
|
|
270
|
+
[source,ruby]
|
|
271
|
+
----
|
|
272
|
+
class ContactNamespace < Lutaml::Model::XmlNamespace
|
|
273
|
+
uri 'https://example.com/schemas/contact/v1'
|
|
274
|
+
version '1.0.0'
|
|
275
|
+
end
|
|
276
|
+
|
|
277
|
+
# Used in XSD: <xs:schema version="1.0.0">
|
|
278
|
+
----
|
|
279
|
+
====
|
|
280
|
+
|
|
281
|
+
=== `documentation`
|
|
282
|
+
|
|
283
|
+
Provides human-readable description for XSD annotation.
|
|
284
|
+
|
|
285
|
+
Syntax:
|
|
286
|
+
|
|
287
|
+
[source,ruby]
|
|
288
|
+
----
|
|
289
|
+
documentation 'description text'
|
|
290
|
+
----
|
|
291
|
+
|
|
292
|
+
.Adding documentation
|
|
293
|
+
[example]
|
|
294
|
+
====
|
|
295
|
+
[source,ruby]
|
|
296
|
+
----
|
|
297
|
+
class ContactNamespace < Lutaml::Model::XmlNamespace
|
|
298
|
+
uri 'https://example.com/schemas/contact/v1'
|
|
299
|
+
documentation "Contact information schema for Example Corp"
|
|
300
|
+
end
|
|
301
|
+
|
|
302
|
+
# Generates in XSD:
|
|
303
|
+
# <xs:annotation>
|
|
304
|
+
# <xs:documentation>Contact information schema for Example Corp</xs:documentation>
|
|
305
|
+
# </xs:annotation>
|
|
306
|
+
----
|
|
307
|
+
====
|
|
308
|
+
|
|
309
|
+
== Complete namespace example
|
|
310
|
+
|
|
311
|
+
.Fully configured XML namespace
|
|
312
|
+
[example]
|
|
313
|
+
====
|
|
314
|
+
[source,ruby]
|
|
315
|
+
----
|
|
316
|
+
# Define dependent namespace
|
|
317
|
+
class AddressNamespace < Lutaml::Model::XmlNamespace
|
|
318
|
+
uri 'https://example.com/schemas/address/v1'
|
|
319
|
+
schema_location 'https://example.com/schemas/address/v1/address.xsd'
|
|
320
|
+
prefix_default 'addr'
|
|
321
|
+
end
|
|
322
|
+
|
|
323
|
+
# Define main namespace with all features
|
|
324
|
+
class ContactNamespace < Lutaml::Model::XmlNamespace
|
|
325
|
+
uri 'https://example.com/schemas/contact/v1'
|
|
326
|
+
schema_location 'https://example.com/schemas/contact/v1/contact.xsd'
|
|
327
|
+
prefix_default 'contact'
|
|
328
|
+
element_form_default :qualified
|
|
329
|
+
attribute_form_default :unqualified
|
|
330
|
+
version '1.0'
|
|
331
|
+
documentation "Contact information schema for Example Corp"
|
|
332
|
+
|
|
333
|
+
imports AddressNamespace
|
|
334
|
+
includes 'contact-common.xsd', 'contact-types.xsd'
|
|
335
|
+
end
|
|
336
|
+
|
|
337
|
+
# Use namespace in model
|
|
338
|
+
class Person < Lutaml::Model::Serializable
|
|
339
|
+
attribute :name, :string
|
|
340
|
+
attribute :email, :string
|
|
341
|
+
|
|
342
|
+
xml do
|
|
343
|
+
element "person"
|
|
344
|
+
namespace ContactNamespace
|
|
345
|
+
|
|
346
|
+
sequence do
|
|
347
|
+
map_element "name", to: :name
|
|
348
|
+
map_element "email", to: :email
|
|
349
|
+
end
|
|
350
|
+
end
|
|
351
|
+
end
|
|
352
|
+
|
|
353
|
+
person = Person.new(name: "John Doe", email: "john@example.com")
|
|
354
|
+
puts person.to_xml
|
|
355
|
+
# => <contact:person xmlns:contact="https://example.com/schemas/contact/v1">
|
|
356
|
+
# <contact:name>John Doe</contact:name>
|
|
357
|
+
# <contact:email>john@example.com</contact:email>
|
|
358
|
+
# </contact:person>
|
|
359
|
+
----
|
|
360
|
+
====
|
|
361
|
+
|
|
362
|
+
== Runtime prefix override
|
|
363
|
+
|
|
364
|
+
Namespace prefixes can be overridden at runtime when building namespace
|
|
365
|
+
instances.
|
|
366
|
+
|
|
367
|
+
.Overriding namespace prefix at runtime
|
|
368
|
+
[example]
|
|
369
|
+
====
|
|
370
|
+
[source,ruby]
|
|
371
|
+
----
|
|
372
|
+
class ContactNamespace < Lutaml::Model::XmlNamespace
|
|
373
|
+
uri 'https://example.com/schemas/contact/v1'
|
|
374
|
+
prefix_default 'contact'
|
|
375
|
+
end
|
|
376
|
+
|
|
377
|
+
# Use default prefix
|
|
378
|
+
class Person < Lutaml::Model::Serializable
|
|
379
|
+
xml do
|
|
380
|
+
element "person"
|
|
381
|
+
namespace ContactNamespace # Uses 'contact' prefix
|
|
382
|
+
end
|
|
383
|
+
end
|
|
384
|
+
|
|
385
|
+
# Override prefix at mapping level
|
|
386
|
+
class ShortPerson < Lutaml::Model::Serializable
|
|
387
|
+
xml do
|
|
388
|
+
element "person"
|
|
389
|
+
namespace ContactNamespace, 'c' # Override to 'c' prefix
|
|
390
|
+
end
|
|
391
|
+
end
|
|
392
|
+
|
|
393
|
+
Person.new.to_xml
|
|
394
|
+
# => <contact:person xmlns:contact="...">...</contact:person>
|
|
395
|
+
|
|
396
|
+
ShortPerson.new.to_xml
|
|
397
|
+
# => <c:person xmlns:c="...">...</c:person>
|
|
398
|
+
----
|
|
399
|
+
====
|
|
400
|
+
|
|
401
|
+
[[additional-xsd-types]]
|
|
402
|
+
== Additional XSD types
|
|
403
|
+
|
|
404
|
+
Lutaml::Model supports additional XSD types for specialized data handling:
|
|
405
|
+
|
|
406
|
+
=== Duration type
|
|
407
|
+
|
|
408
|
+
The `:duration` type handles ISO 8601 duration values conforming to
|
|
409
|
+
`xs:duration`.
|
|
410
|
+
|
|
411
|
+
Duration format: `P[n]Y[n]M[n]DT[n]H[n]M[n]S`
|
|
412
|
+
|
|
413
|
+
Where,
|
|
414
|
+
|
|
415
|
+
`P`:: Required prefix indicating period
|
|
416
|
+
`[n]Y`:: Years (optional)
|
|
417
|
+
`[n]M`:: Months (optional, before T)
|
|
418
|
+
`[n]D`:: Days (optional)
|
|
419
|
+
`T`:: Time prefix (required if time components present)
|
|
420
|
+
`[n]H`:: Hours (optional)
|
|
421
|
+
`[n]M`:: Minutes (optional, after T)
|
|
422
|
+
`[n]S`:: Seconds (optional, can include decimals)
|
|
423
|
+
|
|
424
|
+
.Using the `:duration` type
|
|
425
|
+
[example]
|
|
426
|
+
====
|
|
427
|
+
[source,ruby]
|
|
428
|
+
----
|
|
429
|
+
class ProcessingTask < Lutaml::Model::Serializable
|
|
430
|
+
attribute :processing_time, :duration
|
|
431
|
+
|
|
432
|
+
xml do
|
|
433
|
+
element "task"
|
|
434
|
+
map_element "processingTime", to: :processing_time
|
|
435
|
+
end
|
|
436
|
+
end
|
|
437
|
+
|
|
438
|
+
# Valid durations
|
|
439
|
+
task1 = ProcessingTask.new(processing_time: "P1Y2M3D")
|
|
440
|
+
# 1 year, 2 months, 3 days
|
|
441
|
+
task2 = ProcessingTask.new(processing_time: "PT4H5M6S")
|
|
442
|
+
# 4 hours, 5 minutes, 6 seconds
|
|
443
|
+
task3 = ProcessingTask.new(processing_time: "P1Y2M3DT4H5M6S")
|
|
444
|
+
# Combined
|
|
445
|
+
task4 = ProcessingTask.new(processing_time: "PT0.5S")
|
|
446
|
+
# 0.5 seconds
|
|
447
|
+
|
|
448
|
+
puts task1.to_xml
|
|
449
|
+
# => <task><processingTime>P1Y2M3D</processingTime></task>
|
|
450
|
+
----
|
|
451
|
+
====
|
|
452
|
+
|
|
453
|
+
=== URI type
|
|
454
|
+
|
|
455
|
+
The `:uri` type handles Uniform Resource Identifiers conforming to
|
|
456
|
+
`xs:anyURI`.
|
|
457
|
+
|
|
458
|
+
.Using the `:uri` type
|
|
459
|
+
[example]
|
|
460
|
+
====
|
|
461
|
+
[source,ruby]
|
|
462
|
+
----
|
|
463
|
+
class Resource < Lutaml::Model::Serializable
|
|
464
|
+
attribute :homepage, :uri
|
|
465
|
+
attribute :schema_location, :uri
|
|
466
|
+
|
|
467
|
+
xml do
|
|
468
|
+
element "resource"
|
|
469
|
+
map_element "homepage", to: :homepage
|
|
470
|
+
map_attribute "schemaLocation", to: :schema_location
|
|
471
|
+
end
|
|
472
|
+
end
|
|
473
|
+
|
|
474
|
+
resource = Resource.new(
|
|
475
|
+
homepage: "https://example.com/page",
|
|
476
|
+
schema_location: "https://example.com/schema.xsd"
|
|
477
|
+
)
|
|
478
|
+
|
|
479
|
+
puts resource.to_xml
|
|
480
|
+
# => <resource schemaLocation="https://example.com/schema.xsd">
|
|
481
|
+
# <homepage>https://example.com/page</homepage>
|
|
482
|
+
# </resource>
|
|
483
|
+
----
|
|
484
|
+
====
|
|
485
|
+
|
|
486
|
+
=== QName type
|
|
487
|
+
|
|
488
|
+
The `:qname` type handles XML qualified names conforming to `xs:QName`.
|
|
489
|
+
|
|
490
|
+
A QName consists of an optional namespace prefix and a local name, separated
|
|
491
|
+
by a colon.
|
|
492
|
+
|
|
493
|
+
.Using the `:qname` type
|
|
494
|
+
[example]
|
|
495
|
+
====
|
|
496
|
+
[source,ruby]
|
|
497
|
+
----
|
|
498
|
+
class Reference < Lutaml::Model::Serializable
|
|
499
|
+
attribute :ref_type, :qname
|
|
500
|
+
attribute :target, :qname
|
|
501
|
+
|
|
502
|
+
xml do
|
|
503
|
+
element "reference"
|
|
504
|
+
map_attribute "type", to: :ref_type
|
|
505
|
+
map_element "target", to: :target
|
|
506
|
+
end
|
|
507
|
+
end
|
|
508
|
+
|
|
509
|
+
ref = Reference.new(
|
|
510
|
+
ref_type: "xsd:string",
|
|
511
|
+
target: "ns:elementName"
|
|
512
|
+
)
|
|
513
|
+
|
|
514
|
+
puts ref.to_xml
|
|
515
|
+
# => <reference type="xsd:string">
|
|
516
|
+
# <target>ns:elementName</target>
|
|
517
|
+
# </reference>
|
|
518
|
+
|
|
519
|
+
# Accessing QName components
|
|
520
|
+
qname = Lutaml::Model::Type::QName.new("prefix:localName")
|
|
521
|
+
puts qname.prefix # => "prefix"
|
|
522
|
+
puts qname.local_name # => "localName"
|
|
523
|
+
----
|
|
524
|
+
====
|
|
525
|
+
|
|
526
|
+
=== Base64Binary type
|
|
527
|
+
|
|
528
|
+
The `:base64_binary` type handles base64-encoded binary data conforming to
|
|
529
|
+
`xs:base64Binary`.
|
|
530
|
+
|
|
531
|
+
.Using the `:base64_binary` type
|
|
532
|
+
[example]
|
|
533
|
+
====
|
|
534
|
+
[source,ruby]
|
|
535
|
+
----
|
|
536
|
+
class Attachment < Lutaml::Model::Serializable
|
|
537
|
+
attribute :content, :base64_binary
|
|
538
|
+
attribute :filename, :string
|
|
539
|
+
|
|
540
|
+
xml do
|
|
541
|
+
element "attachment"
|
|
542
|
+
map_element "content", to: :content
|
|
543
|
+
map_attribute "filename", to: :filename
|
|
544
|
+
end
|
|
545
|
+
end
|
|
546
|
+
|
|
547
|
+
# Encoding binary data
|
|
548
|
+
binary_data = "Hello World"
|
|
549
|
+
encoded = Lutaml::Model::Type::Base64Binary.encode(binary_data)
|
|
550
|
+
|
|
551
|
+
attachment = Attachment.new(
|
|
552
|
+
content: encoded,
|
|
553
|
+
filename: "hello.txt"
|
|
554
|
+
)
|
|
555
|
+
|
|
556
|
+
puts attachment.to_xml
|
|
557
|
+
# => <attachment filename="hello.txt">
|
|
558
|
+
# <content>SGVsbG8gV29ybGQ=</content>
|
|
559
|
+
# </attachment>
|
|
560
|
+
|
|
561
|
+
# Decoding
|
|
562
|
+
decoded = Lutaml::Model::Type::Base64Binary.decode(attachment.content)
|
|
563
|
+
# => "Hello World"
|
|
564
|
+
----
|
|
565
|
+
====
|
|
566
|
+
|
|
567
|
+
=== HexBinary type
|
|
568
|
+
|
|
569
|
+
The `:hex_binary` type handles hexadecimal-encoded binary data conforming to
|
|
570
|
+
`xs:hexBinary`.
|
|
571
|
+
|
|
572
|
+
.Using the `:hex_binary` type
|
|
573
|
+
[example]
|
|
574
|
+
====
|
|
575
|
+
[source,ruby]
|
|
576
|
+
----
|
|
577
|
+
class Checksum < Lutaml::Model::Serializable
|
|
578
|
+
attribute :hash_value, :hex_binary
|
|
579
|
+
attribute :algorithm, :string
|
|
580
|
+
|
|
581
|
+
xml do
|
|
582
|
+
element "checksum"
|
|
583
|
+
map_element "value", to: :hash_value
|
|
584
|
+
map_attribute "algorithm", to: :algorithm
|
|
585
|
+
end
|
|
586
|
+
end
|
|
587
|
+
|
|
588
|
+
# Encoding binary data
|
|
589
|
+
binary_data = "Hello"
|
|
590
|
+
encoded = Lutaml::Model::Type::HexBinary.encode(binary_data)
|
|
591
|
+
|
|
592
|
+
checksum = Checksum.new(
|
|
593
|
+
hash_value: encoded,
|
|
594
|
+
algorithm: "SHA256"
|
|
595
|
+
)
|
|
596
|
+
|
|
597
|
+
puts checksum.to_xml
|
|
598
|
+
# => <checksum algorithm="SHA256">
|
|
599
|
+
# <value>48656c6c6f</value>
|
|
600
|
+
# </checksum>
|
|
601
|
+
|
|
602
|
+
# Decoding
|
|
603
|
+
decoded = Lutaml::Model::Type::HexBinary.decode(checksum.hash_value)
|
|
604
|
+
# => "Hello"
|
|
605
|
+
----
|
|
606
|
+
====
|
|
607
|
+
|
|
608
|
+
[[type-level-namespaces]]
|
|
609
|
+
== Type-level namespaces
|
|
610
|
+
|
|
611
|
+
=== Overview
|
|
612
|
+
|
|
613
|
+
Custom `Type::Value` classes and
|
|
614
|
+
`Serializable` models can declare their
|
|
615
|
+
namespace using the `xml_namespace` directive.
|
|
616
|
+
|
|
617
|
+
This enables automatic namespace qualification based on attribute types,
|
|
618
|
+
following W3C XML Namespace specifications.
|
|
619
|
+
|
|
620
|
+
Type-level namespaces work in **both serialization and deserialization**,
|
|
621
|
+
ensuring proper round-trip behavior with namespace-qualified elements and
|
|
622
|
+
attributes.
|
|
623
|
+
|
|
624
|
+
=== Use cases
|
|
625
|
+
|
|
626
|
+
Type-level namespaces are ideal for:
|
|
627
|
+
|
|
628
|
+
* **Standard vocabularies**: Dublin Core, FOAF, RSS/Atom properties
|
|
629
|
+
* **Custom XSD types**: Domain-specific types with their own namespaces
|
|
630
|
+
* **Multi-namespace documents**: Office Open XML, XHTML with embedded metadata
|
|
631
|
+
* **Reusable components**: Types shared across multiple models and schemas
|
|
632
|
+
|
|
633
|
+
=== Type::Value xml_namespace directive
|
|
634
|
+
|
|
635
|
+
Custom value types declare their namespace using class-level directives:
|
|
636
|
+
|
|
637
|
+
Syntax:
|
|
638
|
+
|
|
639
|
+
[source,ruby]
|
|
640
|
+
----
|
|
641
|
+
class CustomType < Lutaml::Model::Type::Value
|
|
642
|
+
xml_namespace CustomNamespace # <1>
|
|
643
|
+
xsd_type 'CustomType' # <2>
|
|
644
|
+
|
|
645
|
+
def self.cast(value)
|
|
646
|
+
# Type conversion logic
|
|
647
|
+
end
|
|
648
|
+
end
|
|
649
|
+
----
|
|
650
|
+
<1> Associates an `XmlNamespace` class with this type
|
|
651
|
+
<2> Sets the XSD type name for schema generation (optional)
|
|
652
|
+
|
|
653
|
+
Where,
|
|
654
|
+
|
|
655
|
+
`xml_namespace`:: Class-level directive that accepts an `XmlNamespace` class. This
|
|
656
|
+
namespace will be automatically applied when serializing or deserializing
|
|
657
|
+
elements and attributes of this type, unless overridden by explicit mapping
|
|
658
|
+
namespace.
|
|
659
|
+
|
|
660
|
+
`xsd_type`:: Class-level directive that sets the XSD type name used during
|
|
661
|
+
schema generation. If not specified, inherits `default_xsd_type` from the
|
|
662
|
+
parent class (e.g., `xs:string` for `Type::String`).
|
|
663
|
+
|
|
664
|
+
=== How Type namespaces work
|
|
665
|
+
|
|
666
|
+
==== During serialization (`to_xml`)
|
|
667
|
+
|
|
668
|
+
When an element or attribute uses a custom type with namespace:
|
|
669
|
+
|
|
670
|
+
1. Type's namespace is consulted if no explicit mapping namespace
|
|
671
|
+
2. Namespace URI and prefix are added to document root
|
|
672
|
+
3. Element/attribute is prefixed according to namespace resolution priority
|
|
673
|
+
4. Works with both simple types (`Type::Value`) and complex types (`Serializable`)
|
|
674
|
+
|
|
675
|
+
==== During deserialization (`from_xml`)
|
|
676
|
+
|
|
677
|
+
When parsing namespace-qualified XML:
|
|
678
|
+
|
|
679
|
+
1. Namespace-qualified elements/attributes are matched against type namespaces
|
|
680
|
+
2. Both prefixed (`dc:title`) and default namespace elements are recognized
|
|
681
|
+
3. Type casting occurs after namespace matching
|
|
682
|
+
4. Works seamlessly with inherited namespaces and explicit mappings
|
|
683
|
+
|
|
684
|
+
=== Simple example with deserialization
|
|
685
|
+
|
|
686
|
+
.Email type with namespace (complete round-trip)
|
|
687
|
+
[example]
|
|
688
|
+
====
|
|
689
|
+
[source,ruby]
|
|
690
|
+
----
|
|
691
|
+
class EmailNamespace < Lutaml::Model::XmlNamespace
|
|
692
|
+
uri 'https://example.com/types/email'
|
|
693
|
+
prefix_default 'email'
|
|
694
|
+
end
|
|
695
|
+
|
|
696
|
+
class EmailType < Lutaml::Model::Type::String
|
|
697
|
+
xml_namespace EmailNamespace
|
|
698
|
+
xsd_type 'EmailAddress'
|
|
699
|
+
|
|
700
|
+
def self.cast(value)
|
|
701
|
+
email = super(value)
|
|
702
|
+
unless email.match?(/\A[\w+\-.]+@[a-z\d\-]+(\.[a-z\d\-]+)*\.[a-z]+\z/i)
|
|
703
|
+
raise Lutaml::Model::TypeError, "Invalid email: #{email}"
|
|
704
|
+
end
|
|
705
|
+
email.downcase
|
|
706
|
+
end
|
|
707
|
+
end
|
|
708
|
+
|
|
709
|
+
class Contact < Lutaml::Model::Serializable
|
|
710
|
+
attribute :email, EmailType
|
|
711
|
+
|
|
712
|
+
xml do
|
|
713
|
+
element "contact"
|
|
714
|
+
map_element 'email', to: :email # Uses EmailNamespace automatically
|
|
715
|
+
end
|
|
716
|
+
end
|
|
717
|
+
|
|
718
|
+
# Serialization:
|
|
719
|
+
contact = Contact.new(email: "USER@EXAMPLE.COM")
|
|
720
|
+
xml = contact.to_xml
|
|
721
|
+
puts xml
|
|
722
|
+
# => <contact xmlns:email="https://example.com/types/email">
|
|
723
|
+
# <email:email>user@example.com</email:email>
|
|
724
|
+
# </contact>
|
|
725
|
+
|
|
726
|
+
# Deserialization:
|
|
727
|
+
parsed = Contact.from_xml(xml)
|
|
728
|
+
parsed.email # => "user@example.com" (type casting applied)
|
|
729
|
+
parsed == contact # => true (round-trip successful)
|
|
730
|
+
----
|
|
731
|
+
====
|
|
732
|
+
|
|
733
|
+
=== Serializable namespace directive
|
|
734
|
+
|
|
735
|
+
Models declare their namespace using the `namespace` directive:
|
|
736
|
+
|
|
737
|
+
Syntax:
|
|
738
|
+
|
|
739
|
+
[source,ruby]
|
|
740
|
+
----
|
|
741
|
+
class CustomModel < Lutaml::Model::Serializable
|
|
742
|
+
namespace CustomNamespace
|
|
743
|
+
|
|
744
|
+
attribute :value, :string
|
|
745
|
+
|
|
746
|
+
xml do
|
|
747
|
+
element "customElement"
|
|
748
|
+
map_element 'value', to: :value
|
|
749
|
+
end
|
|
750
|
+
end
|
|
751
|
+
----
|
|
752
|
+
|
|
753
|
+
=== Complete working example
|
|
754
|
+
|
|
755
|
+
.Dublin Core metadata with Type namespaces
|
|
756
|
+
[example]
|
|
757
|
+
====
|
|
758
|
+
[source,ruby]
|
|
759
|
+
----
|
|
760
|
+
# Define Dublin Core namespace
|
|
761
|
+
class DublinCoreNamespace < Lutaml::Model::XmlNamespace
|
|
762
|
+
uri 'http://purl.org/dc/elements/1.1/'
|
|
763
|
+
prefix_default 'dc'
|
|
764
|
+
end
|
|
765
|
+
|
|
766
|
+
# Define document namespace
|
|
767
|
+
class DocumentNamespace < Lutaml::Model::XmlNamespace
|
|
768
|
+
uri 'https://example.com/document'
|
|
769
|
+
prefix_default 'doc'
|
|
770
|
+
end
|
|
771
|
+
|
|
772
|
+
# Define custom type with Dublin Core namespace
|
|
773
|
+
class DcTitleType < Lutaml::Model::Type::String
|
|
774
|
+
xml_namespace DublinCoreNamespace
|
|
775
|
+
xsd_type 'titleType'
|
|
776
|
+
end
|
|
777
|
+
|
|
778
|
+
class DcCreatorType < Lutaml::Model::Type::String
|
|
779
|
+
xml_namespace DublinCoreNamespace
|
|
780
|
+
xsd_type 'creatorType'
|
|
781
|
+
end
|
|
782
|
+
|
|
783
|
+
# Use types in document model
|
|
784
|
+
class Document < Lutaml::Model::Serializable
|
|
785
|
+
namespace DocumentNamespace
|
|
786
|
+
|
|
787
|
+
attribute :title, DcTitleType
|
|
788
|
+
attribute :creator, DcCreatorType
|
|
789
|
+
attribute :content, :string # Regular attribute, no type namespace
|
|
790
|
+
|
|
791
|
+
xml do
|
|
792
|
+
element "document"
|
|
793
|
+
|
|
794
|
+
map_element 'title', to: :title # Becomes <dc:title> from Type
|
|
795
|
+
map_element 'creator', to: :creator # Becomes <dc:creator> from Type
|
|
796
|
+
map_element 'content', to: :content # No namespace (unqualified local)
|
|
797
|
+
end
|
|
798
|
+
end
|
|
799
|
+
|
|
800
|
+
# Serialization:
|
|
801
|
+
doc = Document.new(
|
|
802
|
+
title: 'Example Document',
|
|
803
|
+
creator: 'John Doe',
|
|
804
|
+
content: 'Document content here'
|
|
805
|
+
)
|
|
806
|
+
|
|
807
|
+
xml = doc.to_xml
|
|
808
|
+
puts xml
|
|
809
|
+
# Output:
|
|
810
|
+
# <doc:document
|
|
811
|
+
# xmlns:doc="https://example.com/document"
|
|
812
|
+
# xmlns:dc="http://purl.org/dc/elements/1.1/">
|
|
813
|
+
# <dc:title>Example Document</dc:title>
|
|
814
|
+
# <dc:creator>John Doe</dc:creator>
|
|
815
|
+
# <content>Document content here</content>
|
|
816
|
+
# </doc:document>
|
|
817
|
+
|
|
818
|
+
# Deserialization (round-trip):
|
|
819
|
+
parsed = Document.from_xml(xml)
|
|
820
|
+
parsed.title # => "Example Document"
|
|
821
|
+
parsed.creator # => "John Doe"
|
|
822
|
+
parsed.content # => "Document content here"
|
|
823
|
+
parsed == doc # => true
|
|
824
|
+
----
|
|
825
|
+
====
|
|
826
|
+
|
|
827
|
+
=== Namespace resolution priority
|
|
828
|
+
|
|
829
|
+
Namespace is determined by priority (highest to lowest):
|
|
830
|
+
|
|
831
|
+
==== For elements (`map_element`)
|
|
832
|
+
|
|
833
|
+
1. **Model-level namespace** (from the attribute's type class)
|
|
834
|
+
+
|
|
835
|
+
[source,ruby]
|
|
836
|
+
----
|
|
837
|
+
# Child model declares its own namespace
|
|
838
|
+
class Title < Lutaml::Model::Serializable
|
|
839
|
+
xml do
|
|
840
|
+
element 'title'
|
|
841
|
+
namespace DublinCoreNamespace
|
|
842
|
+
end
|
|
843
|
+
end
|
|
844
|
+
|
|
845
|
+
# Parent uses child's namespace
|
|
846
|
+
class Document < Lutaml::Model::Serializable
|
|
847
|
+
attribute :title, Title
|
|
848
|
+
map_element 'title', to: :title # Uses Title's namespace
|
|
849
|
+
end
|
|
850
|
+
----
|
|
851
|
+
|
|
852
|
+
2. **Type-level namespace** (from `Type::Value` class)
|
|
853
|
+
+
|
|
854
|
+
[source,ruby]
|
|
855
|
+
----
|
|
856
|
+
class TitleType < Lutaml::Model::Type::String
|
|
857
|
+
xml_namespace DublinCoreNamespace
|
|
858
|
+
end
|
|
859
|
+
attribute :title, TitleType
|
|
860
|
+
map_element 'title', to: :title # Uses DublinCoreNamespace
|
|
861
|
+
----
|
|
862
|
+
|
|
863
|
+
3. **Form default qualification** (from `element_form_default`)
|
|
864
|
+
+
|
|
865
|
+
If `:qualified`: inherits parent namespace +
|
|
866
|
+
If `:unqualified`: no namespace (default)
|
|
867
|
+
|
|
868
|
+
==== For attributes (`map_attribute`)
|
|
869
|
+
|
|
870
|
+
1. **Type-level namespace** (from `Type::Value` class)
|
|
871
|
+
+
|
|
872
|
+
[source,ruby]
|
|
873
|
+
----
|
|
874
|
+
class XsiTypeType < Lutaml::Model::Type::String
|
|
875
|
+
xml_namespace XsiNamespace
|
|
876
|
+
end
|
|
877
|
+
attribute :type, XsiTypeType
|
|
878
|
+
map_attribute 'type', to: :type # Uses XsiNamespace, becomes xsi:type
|
|
879
|
+
----
|
|
880
|
+
|
|
881
|
+
2. **No namespace** (W3C default)
|
|
882
|
+
+
|
|
883
|
+
Per W3C specifications: unprefixed attributes are NEVER in a namespace. +
|
|
884
|
+
Only explicitly qualified attributes have namespaces.
|
|
885
|
+
|
|
886
|
+
IMPORTANT: Per W3C specifications, unprefixed XML attributes do NOT inherit
|
|
887
|
+
their parent element's namespace. Only explicitly qualified attributes have
|
|
888
|
+
namespaces. This is critical for W3C compliance and correct round-tripping.
|
|
889
|
+
|
|
890
|
+
NOTE: Type-level namespaces work in both serialization (`to_xml`) and
|
|
891
|
+
deserialization (`from_xml`), ensuring proper round-trip behavior with
|
|
892
|
+
namespace-qualified elements and attributes.
|
|
893
|
+
|
|
894
|
+
==== Multi-namespace example
|
|
895
|
+
|
|
896
|
+
Type-level namespaces excel when working with multi-namespace documents:
|
|
897
|
+
|
|
898
|
+
.Office Open XML Core Properties with four namespaces
|
|
899
|
+
[example]
|
|
900
|
+
====
|
|
901
|
+
[source,ruby]
|
|
902
|
+
----
|
|
903
|
+
# 1. Define namespace classes
|
|
904
|
+
class CorePropertiesNamespace < Lutaml::Model::XmlNamespace
|
|
905
|
+
uri 'http://schemas.openxmlformats.org/package/2006/metadata/core-properties'
|
|
906
|
+
prefix_default 'cp'
|
|
907
|
+
end
|
|
908
|
+
|
|
909
|
+
class DublinCoreNamespace < Lutaml::Model::XmlNamespace
|
|
910
|
+
uri 'http://purl.org/dc/elements/1.1/'
|
|
911
|
+
prefix_default 'dc'
|
|
912
|
+
end
|
|
913
|
+
|
|
914
|
+
class DCTermsNamespace < Lutaml::Model::XmlNamespace
|
|
915
|
+
uri 'http://purl.org/dc/terms/'
|
|
916
|
+
prefix_default 'dcterms'
|
|
917
|
+
end
|
|
918
|
+
|
|
919
|
+
class XsiNamespace < Lutaml::Model::XmlNamespace
|
|
920
|
+
uri 'http://www.w3.org/2001/XMLSchema-instance'
|
|
921
|
+
prefix_default 'xsi'
|
|
922
|
+
end
|
|
923
|
+
|
|
924
|
+
# 2. Define Type::Value classes with namespaces
|
|
925
|
+
class DcTitleType < Lutaml::Model::Type::String
|
|
926
|
+
xml_namespace DublinCoreNamespace
|
|
927
|
+
xsd_type 'titleType'
|
|
928
|
+
end
|
|
929
|
+
|
|
930
|
+
class DcCreatorType < Lutaml::Model::Type::String
|
|
931
|
+
xml_namespace DublinCoreNamespace
|
|
932
|
+
xsd_type 'creatorType'
|
|
933
|
+
end
|
|
934
|
+
|
|
935
|
+
class CpLastModifiedByType < Lutaml::Model::Type::String
|
|
936
|
+
namespace CorePropertiesNamespace
|
|
937
|
+
end
|
|
938
|
+
|
|
939
|
+
class CpRevisionType < Lutaml::Model::Type::Integer
|
|
940
|
+
namespace CorePropertiesNamespace
|
|
941
|
+
end
|
|
942
|
+
|
|
943
|
+
class XsiTypeType < Lutaml::Model::Type::String
|
|
944
|
+
xml_namespace XsiNamespace
|
|
945
|
+
xsd_type 'type'
|
|
946
|
+
end
|
|
947
|
+
|
|
948
|
+
# 3. Define complex Model types with namespaces
|
|
949
|
+
class DctermsCreatedType < Lutaml::Model::Serializable
|
|
950
|
+
namespace DCTermsNamespace
|
|
951
|
+
|
|
952
|
+
attribute :value, :date_time
|
|
953
|
+
attribute :type, XsiTypeType
|
|
954
|
+
|
|
955
|
+
xml do
|
|
956
|
+
element "created"
|
|
957
|
+
# This becomes xsi:type from XsiTypeType
|
|
958
|
+
map_attribute 'type', to: :type
|
|
959
|
+
map_content to: :value
|
|
960
|
+
end
|
|
961
|
+
end
|
|
962
|
+
|
|
963
|
+
class DctermsModifiedType < Lutaml::Model::Serializable
|
|
964
|
+
namespace DCTermsNamespace
|
|
965
|
+
|
|
966
|
+
attribute :value, :date_time
|
|
967
|
+
attribute :type, XsiTypeType
|
|
968
|
+
|
|
969
|
+
xml do
|
|
970
|
+
element "modified"
|
|
971
|
+
map_attribute 'type', to: :type
|
|
972
|
+
map_content to: :value
|
|
973
|
+
end
|
|
974
|
+
end
|
|
975
|
+
|
|
976
|
+
# 4. Define root model
|
|
977
|
+
class CoreProperties < Lutaml::Model::Serializable
|
|
978
|
+
namespace CorePropertiesNamespace
|
|
979
|
+
|
|
980
|
+
attribute :title, DcTitleType
|
|
981
|
+
attribute :creator, DcCreatorType
|
|
982
|
+
attribute :last_modified_by, CpLastModifiedByType
|
|
983
|
+
attribute :revision, CpRevisionType
|
|
984
|
+
attribute :created, DctermsCreatedType
|
|
985
|
+
attribute :modified, DctermsModifiedType
|
|
986
|
+
|
|
987
|
+
xml do
|
|
988
|
+
element "coreProperties"
|
|
989
|
+
|
|
990
|
+
# Type namespaces automatically applied
|
|
991
|
+
map_element 'title', to: :title # Becomes <dc:title>
|
|
992
|
+
map_element 'creator', to: :creator # Becomes <dc:creator>
|
|
993
|
+
map_element 'lastModifiedBy', to: :last_modified_by # Becomes <cp:lastModifiedBy>
|
|
994
|
+
map_element 'revision', to: :revision # Becomes <cp:revision>
|
|
995
|
+
map_element 'created', to: :created # Becomes <dcterms:created>
|
|
996
|
+
map_element 'modified', to: :modified # Becomes <dcterms:modified>
|
|
997
|
+
end
|
|
998
|
+
end
|
|
999
|
+
|
|
1000
|
+
# Serialization: Create and serialize
|
|
1001
|
+
props = CoreProperties.new(
|
|
1002
|
+
title: 'Untitled',
|
|
1003
|
+
creator: 'Uniword',
|
|
1004
|
+
last_modified_by: 'Uniword',
|
|
1005
|
+
revision: 1,
|
|
1006
|
+
created: DctermsCreatedType.new(
|
|
1007
|
+
value: DateTime.parse('2025-11-13T17:11:03Z'),
|
|
1008
|
+
type: 'dcterms:W3CDTF'
|
|
1009
|
+
),
|
|
1010
|
+
modified: DctermsModifiedType.new(
|
|
1011
|
+
value: DateTime.parse('2025-11-13T17:11:03Z'),
|
|
1012
|
+
type: 'dcterms:W3CDTF'
|
|
1013
|
+
)
|
|
1014
|
+
)
|
|
1015
|
+
|
|
1016
|
+
puts props.to_xml
|
|
1017
|
+
----
|
|
1018
|
+
|
|
1019
|
+
Serialization output with four namespaces:
|
|
1020
|
+
|
|
1021
|
+
[source,xml]
|
|
1022
|
+
----
|
|
1023
|
+
<cp:coreProperties
|
|
1024
|
+
xmlns:cp="http://schemas.openxmlformats.org/package/2006/metadata/core-properties"
|
|
1025
|
+
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
|
1026
|
+
xmlns:dcterms="http://purl.org/dc/terms/"
|
|
1027
|
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
|
1028
|
+
<dc:title>Untitled</dc:title>
|
|
1029
|
+
<dc:creator>Uniword</dc:creator>
|
|
1030
|
+
<cp:lastModifiedBy>Uniword</cp:lastModifiedBy>
|
|
1031
|
+
<cp:revision>1</cp:revision>
|
|
1032
|
+
<dcterms:created xsi:type="dcterms:W3CDTF">2025-11-13T17:11:03Z</dcterms:created>
|
|
1033
|
+
<dcterms:modified xsi:type="dcterms:W3CDTF">2025-11-13T17:11:03Z</dcterms:modified>
|
|
1034
|
+
</cp:coreProperties>
|
|
1035
|
+
----
|
|
1036
|
+
|
|
1037
|
+
Deserialization: Round-trip parsing:
|
|
1038
|
+
|
|
1039
|
+
[source,ruby]
|
|
1040
|
+
----
|
|
1041
|
+
# Parse the generated XML
|
|
1042
|
+
parsed_props = CoreProperties.from_xml(props.to_xml)
|
|
1043
|
+
|
|
1044
|
+
# All namespaces are correctly resolved
|
|
1045
|
+
parsed_props.title # => "Untitled" (from dc:title)
|
|
1046
|
+
parsed_props.creator # => "Uniword" (from dc:creator)
|
|
1047
|
+
parsed_props.last_modified_by # => "Uniword" (from cp:lastModifiedBy)
|
|
1048
|
+
parsed_props.revision # => 1 (from cp:revision)
|
|
1049
|
+
parsed_props.created.value # => DateTime "2025-11-13T17:11:03Z"
|
|
1050
|
+
parsed_props.created.type # => "dcterms:W3CDTF" (from xsi:type)
|
|
1051
|
+
|
|
1052
|
+
# Verify round-trip equality
|
|
1053
|
+
parsed_props === props # => true
|
|
1054
|
+
----
|
|
1055
|
+
|
|
1056
|
+
This demonstrates:
|
|
1057
|
+
|
|
1058
|
+
* Four different namespaces (`cp`, `dc`, `dcterms`, `xsi`) in a single document
|
|
1059
|
+
* Type-level namespace for simple value types (`DcTitleType`, `DcCreatorType`)
|
|
1060
|
+
* Model-level namespace for complex types (`DctermsCreatedType`, `DctermsModifiedType`)
|
|
1061
|
+
* Attribute namespace qualification (`xsi:type` from `XsiTypeType`)
|
|
1062
|
+
* **Full round-trip support** - Type namespaces work in both serialization and deserialization
|
|
1063
|
+
* W3C-compliant namespace resolution following the priority rules
|
|
1064
|
+
====
|
|
1065
|
+
|
|
1066
|
+
==== Namespace priority examples
|
|
1067
|
+
|
|
1068
|
+
.Explicit namespace overrides type namespace
|
|
1069
|
+
[example]
|
|
1070
|
+
====
|
|
1071
|
+
[source,ruby]
|
|
1072
|
+
----
|
|
1073
|
+
class DefaultType < Lutaml::Model::Type::String
|
|
1074
|
+
namespace DefaultNamespace
|
|
1075
|
+
end
|
|
1076
|
+
|
|
1077
|
+
class Model < Lutaml::Model::Serializable
|
|
1078
|
+
attribute :value, DefaultType
|
|
1079
|
+
|
|
1080
|
+
xml do
|
|
1081
|
+
element "model"
|
|
1082
|
+
|
|
1083
|
+
# Case 1: Type namespace used (no explicit namespace)
|
|
1084
|
+
map_element 'value1', to: :value
|
|
1085
|
+
# => <default:value1>
|
|
1086
|
+
|
|
1087
|
+
# Case 2: Explicit namespace overrides Type namespace
|
|
1088
|
+
map_element 'value2', to: :value, namespace: OtherNamespace
|
|
1089
|
+
# => <other:value2>
|
|
1090
|
+
|
|
1091
|
+
# Case 3: Inherit parent namespace, ignoring Type namespace
|
|
1092
|
+
map_element 'value3', to: :value, namespace: :inherit
|
|
1093
|
+
# => <model_ns:value3> (if Model has namespace)
|
|
1094
|
+
end
|
|
1095
|
+
end
|
|
1096
|
+
----
|
|
1097
|
+
====
|
|
1098
|
+
|
|
1099
|
+
==== Attribute namespace handling
|
|
1100
|
+
|
|
1101
|
+
Attribute namespace handling differs from elements per W3C specifications.
|
|
1102
|
+
|
|
1103
|
+
Attributes only belong to a namespace when explicitly qualified with a prefix.
|
|
1104
|
+
Unprefixed attributes are not considered to be in any namespace per W3C XML
|
|
1105
|
+
Namespace.
|
|
1106
|
+
|
|
1107
|
+
.Attribute namespace handling
|
|
1108
|
+
[example]
|
|
1109
|
+
====
|
|
1110
|
+
[source,ruby]
|
|
1111
|
+
----
|
|
1112
|
+
class XsiTypeType < Lutaml::Model::Type::String
|
|
1113
|
+
xml_namespace XsiNamespace
|
|
1114
|
+
xsd_type 'type'
|
|
1115
|
+
end
|
|
1116
|
+
|
|
1117
|
+
class Product < Lutaml::Model::Serializable
|
|
1118
|
+
attribute :id, :string
|
|
1119
|
+
attribute :schema_type, XsiTypeType
|
|
1120
|
+
|
|
1121
|
+
xml do
|
|
1122
|
+
element "product"
|
|
1123
|
+
map_attribute 'id', to: :id # Unqualified: id="..."
|
|
1124
|
+
map_attribute 'type', to: :schema_type # Qualified: xsi:type="..."
|
|
1125
|
+
end
|
|
1126
|
+
end
|
|
1127
|
+
|
|
1128
|
+
# Serialization:
|
|
1129
|
+
product = Product.new(id: "P001", schema_type: "ProductType")
|
|
1130
|
+
puts product.to_xml
|
|
1131
|
+
# => <product xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
1132
|
+
# id="P001"
|
|
1133
|
+
# xsi:type="ProductType"/>
|
|
1134
|
+
----
|
|
1135
|
+
|
|
1136
|
+
Note that `id` is unprefixed (no namespace per W3C), while `type` uses the
|
|
1137
|
+
`xsi:` prefix from `XsiTypeType`.
|
|
1138
|
+
====
|
|
1139
|
+
|
|
1140
|
+
[[xsd-type-attribute-option]]
|
|
1141
|
+
=== XML attribute explicit declaration of XSD type
|
|
1142
|
+
|
|
1143
|
+
==== General
|
|
1144
|
+
|
|
1145
|
+
The `:xsd_type` attribute option allows explicit control over the XSD type
|
|
1146
|
+
used in schema generation.
|
|
1147
|
+
|
|
1148
|
+
This is particularly useful for:
|
|
1149
|
+
|
|
1150
|
+
* Reference types using `xs:ID` and `xs:IDREF`
|
|
1151
|
+
* Custom XSD types not directly mapped to Lutaml types
|
|
1152
|
+
* Override automatic type inference
|
|
1153
|
+
|
|
1154
|
+
Syntax:
|
|
1155
|
+
|
|
1156
|
+
[source,ruby]
|
|
1157
|
+
----
|
|
1158
|
+
attribute :attr_name, Type, xsd_type: 'xs:typeName'
|
|
1159
|
+
----
|
|
1160
|
+
|
|
1161
|
+
==== Priority order
|
|
1162
|
+
|
|
1163
|
+
When determining XSD type, Lutaml::Model uses this priority:
|
|
1164
|
+
|
|
1165
|
+
. Explicit `:xsd_type` option on attribute (highest priority)
|
|
1166
|
+
. Type's `xsd_type` class method
|
|
1167
|
+
. Default type inference (lowest priority)
|
|
1168
|
+
|
|
1169
|
+
|
|
1170
|
+
.Using `:xsd_type` for ID and IDREF
|
|
1171
|
+
[example]
|
|
1172
|
+
====
|
|
1173
|
+
[source,ruby]
|
|
1174
|
+
----
|
|
1175
|
+
class Product < Lutaml::Model::Serializable
|
|
1176
|
+
attribute :product_id, :string, xsd_type: 'xs:ID'
|
|
1177
|
+
attribute :category_ref, :string, xsd_type: 'xs:IDREF'
|
|
1178
|
+
attribute :related_refs, :string, collection: true, xsd_type: 'xs:IDREFS'
|
|
1179
|
+
|
|
1180
|
+
xml do
|
|
1181
|
+
element 'product'
|
|
1182
|
+
map_attribute 'id', to: :product_id
|
|
1183
|
+
map_attribute 'categoryRef', to: :category_ref
|
|
1184
|
+
map_attribute 'relatedRefs', to: :related_refs
|
|
1185
|
+
end
|
|
1186
|
+
end
|
|
1187
|
+
|
|
1188
|
+
# Generated XSD uses:
|
|
1189
|
+
# <xs:attribute name="id" type="xs:ID"/>
|
|
1190
|
+
# <xs:attribute name="categoryRef" type="xs:IDREF"/>
|
|
1191
|
+
# <xs:attribute name="relatedRefs" type="xs:IDREFS"/>
|
|
1192
|
+
----
|
|
1193
|
+
====
|
|
1194
|
+
|
|
1195
|
+
.Using `:xsd_type` for custom types
|
|
1196
|
+
[example]
|
|
1197
|
+
====
|
|
1198
|
+
[source,ruby]
|
|
1199
|
+
----
|
|
1200
|
+
class Document < Lutaml::Model::Serializable
|
|
1201
|
+
attribute :language, :string, xsd_type: 'xs:language'
|
|
1202
|
+
attribute :content_type, :string, xsd_type: 'xs:token'
|
|
1203
|
+
attribute :normalized_text, :string, xsd_type: 'xs:normalizedString'
|
|
1204
|
+
|
|
1205
|
+
xml do
|
|
1206
|
+
element 'document'
|
|
1207
|
+
map_attribute 'lang', to: :language
|
|
1208
|
+
map_attribute 'contentType', to: :content_type
|
|
1209
|
+
map_element 'text', to: :normalized_text
|
|
1210
|
+
end
|
|
1211
|
+
end
|
|
1212
|
+
|
|
1213
|
+
# Generated XSD declares proper XSD built-in types
|
|
1214
|
+
----
|
|
1215
|
+
====
|
|
1216
|
+
|
|
1217
|
+
==== Use with Reference type
|
|
1218
|
+
|
|
1219
|
+
The `Type::Reference` type can utilize `:xsd_type` for proper XSD generation:
|
|
1220
|
+
|
|
1221
|
+
.Reference type with XSD configuration
|
|
1222
|
+
[example]
|
|
1223
|
+
====
|
|
1224
|
+
[source,ruby]
|
|
1225
|
+
----
|
|
1226
|
+
class Catalog < Lutaml::Model::Serializable
|
|
1227
|
+
attribute :catalog_id, { ref: [Catalog, :id] }, xsd_type: 'xs:ID'
|
|
1228
|
+
attribute :parent_ref, { ref: [Catalog, :id] }, xsd_type: 'xs:IDREF'
|
|
1229
|
+
|
|
1230
|
+
xml do
|
|
1231
|
+
element 'catalog'
|
|
1232
|
+
map_attribute 'id', to: :catalog_id
|
|
1233
|
+
map_attribute 'parent', to: :parent_ref
|
|
1234
|
+
end
|
|
1235
|
+
end
|
|
1236
|
+
----
|
|
1237
|
+
====
|
|
1238
|
+
|
|
1239
|
+
=== XSD schema generation support
|
|
1240
|
+
|
|
1241
|
+
Type-level namespaces are fully integrated with XSD generation:
|
|
1242
|
+
|
|
1243
|
+
* Type namespaces generate proper `xs:import` declarations
|
|
1244
|
+
* `xsd_type` directive controls the type name in generated schemas
|
|
1245
|
+
* Namespace URIs are included in schema imports
|
|
1246
|
+
* Schema locations are preserved from `XmlNamespace` definitions
|
|
1247
|
+
|
|
1248
|
+
.XSD generation with type namespaces
|
|
1249
|
+
[example]
|
|
1250
|
+
====
|
|
1251
|
+
[source,ruby]
|
|
1252
|
+
----
|
|
1253
|
+
# After defining DcTitleType and Document from previous example
|
|
1254
|
+
xsd = Lutaml::Model::Schema.to_xml(
|
|
1255
|
+
Document,
|
|
1256
|
+
namespace: DocumentNamespace.uri,
|
|
1257
|
+
prefix: DocumentNamespace.prefix_default
|
|
1258
|
+
)
|
|
1259
|
+
|
|
1260
|
+
# Generated XSD includes:
|
|
1261
|
+
# <xs:import namespace="http://purl.org/dc/elements/1.1/"
|
|
1262
|
+
# schemaLocation="..." />
|
|
1263
|
+
#
|
|
1264
|
+
# And uses dc:titleType for the title element type
|
|
1265
|
+
----
|
|
1266
|
+
====
|
|
1267
|
+
|
|
1268
|
+
=== Best practices
|
|
1269
|
+
|
|
1270
|
+
When using Type-level namespaces:
|
|
1271
|
+
|
|
1272
|
+
1. **Define namespace classes first**: Create all `XmlNamespace` classes before
|
|
1273
|
+
defining types
|
|
1274
|
+
|
|
1275
|
+
2. **Use descriptive type names**: Set `xsd_type` for custom types to generate
|
|
1276
|
+
meaningful schemas
|
|
1277
|
+
|
|
1278
|
+
3. **Leverage namespace resolution**: Let type namespaces handle qualification
|
|
1279
|
+
automatically instead of explicit mapping namespaces
|
|
1280
|
+
|
|
1281
|
+
4. **Test round-trips**: Verify that serialization and deserialization work
|
|
1282
|
+
correctly with your namespace configuration
|
|
1283
|
+
|
|
1284
|
+
5. **Document namespaces**: Use XmlNamespace `documentation` for schema clarity
|
|
1285
|
+
|
|
1286
|
+
=== Migration from deprecated namespace directive
|
|
1287
|
+
|
|
1288
|
+
==== Overview
|
|
1289
|
+
|
|
1290
|
+
The `namespace` directive for `Type::Value` classes has been renamed to
|
|
1291
|
+
`xml_namespace` to better indicate its XML-specific nature and reserve
|
|
1292
|
+
`namespace` for future semantic namespace features.
|
|
1293
|
+
|
|
1294
|
+
IMPORTANT: Use `xml_namespace` instead of `namespace` for all `Type::Value` classes.
|
|
1295
|
+
|
|
1296
|
+
==== Deprecated syntax
|
|
1297
|
+
|
|
1298
|
+
[source,ruby]
|
|
1299
|
+
----
|
|
1300
|
+
class DcTitleType < Lutaml::Model::Type::String
|
|
1301
|
+
namespace DublinCoreNamespace # ⚠️ DEPRECATED
|
|
1302
|
+
xsd_type 'titleType'
|
|
1303
|
+
end
|
|
1304
|
+
----
|
|
1305
|
+
|
|
1306
|
+
**Deprecation warning shown:**
|
|
1307
|
+
|
|
1308
|
+
[source]
|
|
1309
|
+
----
|
|
1310
|
+
[DEPRECATION] Type::Value.namespace is deprecated. Use xml_namespace instead.
|
|
1311
|
+
This will be removed in version 1.0.0
|
|
1312
|
+
----
|
|
1313
|
+
|
|
1314
|
+
==== Current syntax
|
|
1315
|
+
|
|
1316
|
+
[source,ruby]
|
|
1317
|
+
----
|
|
1318
|
+
class DcTitleType < Lutaml::Model::Type::String
|
|
1319
|
+
xml_namespace DublinCoreNamespace # ✅ CURRENT
|
|
1320
|
+
xsd_type 'titleType'
|
|
1321
|
+
end
|
|
1322
|
+
----
|
|
1323
|
+
|
|
1324
|
+
==== Why the change?
|
|
1325
|
+
|
|
1326
|
+
The renaming serves several important purposes:
|
|
1327
|
+
|
|
1328
|
+
* **XML-specific clarity**: The `xml_namespace` name clearly indicates this is
|
|
1329
|
+
XML serialization configuration, not a general semantic namespace
|
|
1330
|
+
* **Future compatibility**: Reserves `namespace` for semantic namespace features
|
|
1331
|
+
like JSON-LD `@context` and RDF IRI mappings
|
|
1332
|
+
* **Consistency**: Aligns with format-specific naming patterns throughout
|
|
1333
|
+
Lutaml::Model
|
|
1334
|
+
* **Disambiguation**: Distinguishes Type-level namespace from Model-level
|
|
1335
|
+
`namespace` directive
|
|
1336
|
+
|
|
1337
|
+
==== Migration steps
|
|
1338
|
+
|
|
1339
|
+
. **Locate Type::Value classes with namespace**: Search your codebase for classes
|
|
1340
|
+
inheriting from `Lutaml::Model::Type::Value` (or built-in types like
|
|
1341
|
+
`Type::String`) that use `namespace`
|
|
1342
|
+
|
|
1343
|
+
. **Replace directive**: Change `namespace` to `xml_namespace`
|
|
1344
|
+
|
|
1345
|
+
. **Test round-trip**: Verify serialization and deserialization work correctly
|
|
1346
|
+
|
|
1347
|
+
. **No other changes needed**: Functionality is identical
|
|
1348
|
+
|
|
1349
|
+
==== Complete migration example
|
|
1350
|
+
|
|
1351
|
+
.Before (deprecated)
|
|
1352
|
+
[source,ruby]
|
|
1353
|
+
----
|
|
1354
|
+
class DublinCoreNamespace < Lutaml::Model::XmlNamespace
|
|
1355
|
+
uri 'http://purl.org/dc/elements/1.1/'
|
|
1356
|
+
prefix_default 'dc'
|
|
1357
|
+
end
|
|
1358
|
+
|
|
1359
|
+
class DcTitleType < Lutaml::Model::Type::String
|
|
1360
|
+
namespace DublinCoreNamespace # ⚠️ DEPRECATED
|
|
1361
|
+
xsd_type 'titleType'
|
|
1362
|
+
end
|
|
1363
|
+
|
|
1364
|
+
class DcCreatorType < Lutaml::Model::Type::String
|
|
1365
|
+
namespace DublinCoreNamespace # ⚠️ DEPRECATED
|
|
1366
|
+
xsd_type 'creatorType'
|
|
1367
|
+
end
|
|
1368
|
+
|
|
1369
|
+
class Document < Lutaml::Model::Serializable
|
|
1370
|
+
attribute :title, DcTitleType
|
|
1371
|
+
attribute :creator, DcCreatorType
|
|
1372
|
+
|
|
1373
|
+
xml do
|
|
1374
|
+
element "document"
|
|
1375
|
+
map_element 'title', to: :title
|
|
1376
|
+
map_element 'creator', to: :creator
|
|
1377
|
+
end
|
|
1378
|
+
end
|
|
1379
|
+
----
|
|
1380
|
+
|
|
1381
|
+
.After (current)
|
|
1382
|
+
[source,ruby]
|
|
1383
|
+
----
|
|
1384
|
+
class DublinCoreNamespace < Lutaml::Model::XmlNamespace
|
|
1385
|
+
uri 'http://purl.org/dc/elements/1.1/'
|
|
1386
|
+
prefix_default 'dc'
|
|
1387
|
+
end
|
|
1388
|
+
|
|
1389
|
+
class DcTitleType < Lutaml::Model::Type::String
|
|
1390
|
+
xml_namespace DublinCoreNamespace # ✅ CURRENT
|
|
1391
|
+
xsd_type 'titleType'
|
|
1392
|
+
end
|
|
1393
|
+
|
|
1394
|
+
class DcCreatorType < Lutaml::Model::Type::String
|
|
1395
|
+
xml_namespace DublinCoreNamespace # ✅ CURRENT
|
|
1396
|
+
xsd_type 'creatorType'
|
|
1397
|
+
end
|
|
1398
|
+
|
|
1399
|
+
class Document < Lutaml::Model::Serializable
|
|
1400
|
+
attribute :title, DcTitleType
|
|
1401
|
+
attribute :creator, DcCreatorType
|
|
1402
|
+
|
|
1403
|
+
xml do
|
|
1404
|
+
element "document"
|
|
1405
|
+
map_element 'title', to: :title
|
|
1406
|
+
map_element 'creator', to: :creator
|
|
1407
|
+
end
|
|
1408
|
+
end
|
|
1409
|
+
----
|
|
1410
|
+
|
|
1411
|
+
==== Backward compatibility
|
|
1412
|
+
|
|
1413
|
+
The deprecated `namespace` directive will:
|
|
1414
|
+
|
|
1415
|
+
* Continue to work in current versions
|
|
1416
|
+
* Show a deprecation warning on first use
|
|
1417
|
+
* Be removed in Lutaml::Model version 1.0.0
|
|
1418
|
+
|
|
1419
|
+
This gives you time to migrate at your own pace while maintaining full
|
|
1420
|
+
functionality.
|
|
1421
|
+
|
|
1422
|
+
=== Migration from xml block
|
|
1423
|
+
|
|
1424
|
+
The old xml block approach in Type::Value is deprecated:
|
|
1425
|
+
|
|
1426
|
+
.Old approach (deprecated)
|
|
1427
|
+
[source,ruby]
|
|
1428
|
+
----
|
|
1429
|
+
class EmailType < Lutaml::Model::Type::String
|
|
1430
|
+
xml do
|
|
1431
|
+
namespace EmailNamespace # DEPRECATED
|
|
1432
|
+
end
|
|
1433
|
+
|
|
1434
|
+
def self.xsd_type
|
|
1435
|
+
'EmailAddress'
|
|
1436
|
+
end
|
|
1437
|
+
end
|
|
1438
|
+
----
|
|
1439
|
+
|
|
1440
|
+
.New approach (recommended)
|
|
1441
|
+
[source,ruby]
|
|
1442
|
+
----
|
|
1443
|
+
class EmailType < Lutaml::Model::Type::String
|
|
1444
|
+
xml_namespace EmailNamespace # Directive, not block
|
|
1445
|
+
xsd_type 'EmailAddress' # Directive, not method
|
|
1446
|
+
end
|
|
1447
|
+
----
|
|
1448
|
+
|
|
1449
|
+
Benefits of new approach:
|
|
1450
|
+
|
|
1451
|
+
* Cleaner, more declarative syntax
|
|
1452
|
+
* Consistent with XmlNamespace DSL pattern
|
|
1453
|
+
* Better performance (no block evaluation)
|
|
1454
|
+
* Enhanced XSD generation support
|
|
1455
|
+
* Full deserialization support
|
|
1456
|
+
|
|
1457
|
+
NOTE: The xml block approach still works with a deprecation warning for
|
|
1458
|
+
backward compatibility but lacks full deserialization support.
|
|
1459
|
+
|
|
1460
|
+
[[namespace-scope-consolidation]]
|
|
1461
|
+
== Namespace scope consolidation
|
|
1462
|
+
|
|
1463
|
+
=== General
|
|
1464
|
+
|
|
1465
|
+
The `namespace_scope` directive controls where namespace declarations appear in
|
|
1466
|
+
serialized XML. By default, namespaces are declared on the elements where they
|
|
1467
|
+
are used. With `namespace_scope`, you can consolidate multiple namespace
|
|
1468
|
+
declarations at a parent element for cleaner, more compact XML.
|
|
1469
|
+
|
|
1470
|
+
This feature is particularly useful for:
|
|
1471
|
+
|
|
1472
|
+
* **Multi-namespace documents**: Documents using several namespaces throughout
|
|
1473
|
+
* **Reduced XML verbosity**: Consolidate namespace declarations at logical scoping levels
|
|
1474
|
+
* **Standards compliance**: W3C-compliant namespace handling with declaration consolidation
|
|
1475
|
+
* **Cleaner output**: More readable XML with namespaces declared once
|
|
1476
|
+
|
|
1477
|
+
=== Syntax
|
|
1478
|
+
|
|
1479
|
+
[source,ruby]
|
|
1480
|
+
----
|
|
1481
|
+
xml do
|
|
1482
|
+
namespace RootNamespace
|
|
1483
|
+
namespace_scope [Namespace1, Namespace2, Namespace3]
|
|
1484
|
+
end
|
|
1485
|
+
----
|
|
1486
|
+
|
|
1487
|
+
Where,
|
|
1488
|
+
|
|
1489
|
+
`namespace_scope`:: Array of `XmlNamespace` class objects. These namespaces will
|
|
1490
|
+
be declared once at the root element. Any namespaces NOT in this list will be
|
|
1491
|
+
declared locally on elements that use them.
|
|
1492
|
+
|
|
1493
|
+
=== How it works
|
|
1494
|
+
|
|
1495
|
+
**Namespaces IN scope:**
|
|
1496
|
+
|
|
1497
|
+
* Declared once at the root element
|
|
1498
|
+
* All child elements using these namespaces omit local declarations
|
|
1499
|
+
* Cleaner, more compact XML output
|
|
1500
|
+
|
|
1501
|
+
**Namespaces NOT in scope:**
|
|
1502
|
+
|
|
1503
|
+
* Declared locally on the first element that uses them
|
|
1504
|
+
* Each usage includes namespace declaration
|
|
1505
|
+
* More verbose but clearly scoped
|
|
1506
|
+
|
|
1507
|
+
=== Basic example
|
|
1508
|
+
|
|
1509
|
+
.Consolidating two namespaces
|
|
1510
|
+
[example]
|
|
1511
|
+
====
|
|
1512
|
+
[source,ruby]
|
|
1513
|
+
----
|
|
1514
|
+
class VcardNamespace < Lutaml::Model::XmlNamespace
|
|
1515
|
+
uri "urn:ietf:params:xml:ns:vcard-4.0"
|
|
1516
|
+
prefix_default "vcard"
|
|
1517
|
+
end
|
|
1518
|
+
|
|
1519
|
+
class DcNamespace < Lutaml::Model::XmlNamespace
|
|
1520
|
+
uri "http://purl.org/dc/elements/1.1/"
|
|
1521
|
+
prefix_default "dc"
|
|
1522
|
+
end
|
|
1523
|
+
|
|
1524
|
+
class DcTitleType < Lutaml::Model::Type::String
|
|
1525
|
+
xml_namespace DcNamespace
|
|
1526
|
+
end
|
|
1527
|
+
|
|
1528
|
+
class Vcard < Lutaml::Model::Serializable
|
|
1529
|
+
attribute :version, :string
|
|
1530
|
+
attribute :title, DcTitleType
|
|
1531
|
+
|
|
1532
|
+
xml do
|
|
1533
|
+
element "vCard"
|
|
1534
|
+
namespace VcardNamespace
|
|
1535
|
+
namespace_scope [VcardNamespace, DcNamespace] <1>
|
|
1536
|
+
|
|
1537
|
+
map_element "version", to: :version
|
|
1538
|
+
map_element "title", to: :title
|
|
1539
|
+
end
|
|
1540
|
+
end
|
|
1541
|
+
|
|
1542
|
+
vcard = Vcard.new(
|
|
1543
|
+
version: "4.0",
|
|
1544
|
+
title: "Dr. John Doe"
|
|
1545
|
+
)
|
|
1546
|
+
|
|
1547
|
+
puts vcard.to_xml
|
|
1548
|
+
----
|
|
1549
|
+
<1> Both namespaces declared at root element
|
|
1550
|
+
|
|
1551
|
+
Output with `namespace_scope`:
|
|
1552
|
+
|
|
1553
|
+
[source,xml]
|
|
1554
|
+
----
|
|
1555
|
+
<vcard:vCard xmlns:vcard="urn:ietf:params:xml:ns:vcard-4.0"
|
|
1556
|
+
xmlns:dc="http://purl.org/dc/elements/1.1/">
|
|
1557
|
+
<vcard:version>4.0</vcard:version>
|
|
1558
|
+
<dc:title>Dr. John Doe</dc:title>
|
|
1559
|
+
</vcard:vCard>
|
|
1560
|
+
----
|
|
1561
|
+
|
|
1562
|
+
Without `namespace_scope`, dc namespace declared locally:
|
|
1563
|
+
|
|
1564
|
+
[source,xml]
|
|
1565
|
+
----
|
|
1566
|
+
<vcard:vCard xmlns:vcard="urn:ietf:params:xml:ns:vcard-4.0">
|
|
1567
|
+
<vcard:version>4.0</vcard:version>
|
|
1568
|
+
<dc:title xmlns:dc="http://purl.org/dc/elements/1.1/">Dr. John Doe</dc:title>
|
|
1569
|
+
</vcard:vCard>
|
|
1570
|
+
----
|
|
1571
|
+
====
|
|
1572
|
+
|
|
1573
|
+
=== Complete vCard example
|
|
1574
|
+
|
|
1575
|
+
.Multi-namespace vCard with namespace consolidation
|
|
1576
|
+
[example]
|
|
1577
|
+
====
|
|
1578
|
+
[source,ruby]
|
|
1579
|
+
----
|
|
1580
|
+
class VcardNamespace < Lutaml::Model::XmlNamespace
|
|
1581
|
+
uri "urn:ietf:params:xml:ns:vcard-4.0"
|
|
1582
|
+
prefix_default "vcard"
|
|
1583
|
+
end
|
|
1584
|
+
|
|
1585
|
+
class DcNamespace < Lutaml::Model::XmlNamespace
|
|
1586
|
+
uri "http://purl.org/dc/elements/1.1/"
|
|
1587
|
+
prefix_default "dc"
|
|
1588
|
+
end
|
|
1589
|
+
|
|
1590
|
+
class DctermsNamespace < Lutaml::Model::XmlNamespace
|
|
1591
|
+
uri "http://purl.org/dc/terms/"
|
|
1592
|
+
prefix_default "dcterms"
|
|
1593
|
+
end
|
|
1594
|
+
|
|
1595
|
+
# Define types with Dublin Core namespaces
|
|
1596
|
+
class DcTitleType < Lutaml::Model::Type::String
|
|
1597
|
+
xml_namespace DcNamespace
|
|
1598
|
+
end
|
|
1599
|
+
|
|
1600
|
+
class DctermsCreatedType < Lutaml::Model::Type::DateTime
|
|
1601
|
+
xml_namespace DctermsNamespace
|
|
1602
|
+
end
|
|
1603
|
+
|
|
1604
|
+
class VcardVersion < Lutaml::Model::Type::String
|
|
1605
|
+
xml_namespace VcardNamespace
|
|
1606
|
+
end
|
|
1607
|
+
|
|
1608
|
+
class Vcard < Lutaml::Model::Serializable
|
|
1609
|
+
attribute :version, VcardVersion
|
|
1610
|
+
attribute :title, DcTitleType
|
|
1611
|
+
attribute :full_name, :string
|
|
1612
|
+
attribute :created, DctermsCreatedType
|
|
1613
|
+
|
|
1614
|
+
xml do
|
|
1615
|
+
element "vCard"
|
|
1616
|
+
namespace VcardNamespace
|
|
1617
|
+
namespace_scope [VcardNamespace, DcNamespace, DctermsNamespace] <1>
|
|
1618
|
+
|
|
1619
|
+
map_element "version", to: :version
|
|
1620
|
+
map_element "title", to: :title
|
|
1621
|
+
map_element "fn", to: :full_name
|
|
1622
|
+
map_element "created", to: :created
|
|
1623
|
+
end
|
|
1624
|
+
end
|
|
1625
|
+
|
|
1626
|
+
vcard = Vcard.new(
|
|
1627
|
+
version: "4.0",
|
|
1628
|
+
title: "Contact: Dr. John Doe",
|
|
1629
|
+
full_name: "Dr. John Doe",
|
|
1630
|
+
created: DateTime.parse("2024-06-01T12:00:00Z")
|
|
1631
|
+
)
|
|
1632
|
+
|
|
1633
|
+
puts vcard.to_xml
|
|
1634
|
+
----
|
|
1635
|
+
<1> Consolidate all three namespaces at root element
|
|
1636
|
+
|
|
1637
|
+
Output with `namespace_scope`:
|
|
1638
|
+
|
|
1639
|
+
[source,xml]
|
|
1640
|
+
----
|
|
1641
|
+
<vcard:vCard xmlns:vcard="urn:ietf:params:xml:ns:vcard-4.0"
|
|
1642
|
+
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
|
1643
|
+
xmlns:dcterms="http://purl.org/dc/terms/">
|
|
1644
|
+
<vcard:version>4.0</vcard:version>
|
|
1645
|
+
<dc:title>Contact: Dr. John Doe</dc:title>
|
|
1646
|
+
<vcard:fn>Dr. John Doe</vcard:fn>
|
|
1647
|
+
<dcterms:created>2024-06-01T12:00:00+00:00</dcterms:created>
|
|
1648
|
+
</vcard:vCard>
|
|
1649
|
+
----
|
|
1650
|
+
|
|
1651
|
+
Without `namespace_scope`, each namespace declared locally where used:
|
|
1652
|
+
|
|
1653
|
+
[source,xml]
|
|
1654
|
+
----
|
|
1655
|
+
<vcard:vCard xmlns:vcard="urn:ietf:params:xml:ns:vcard-4.0">
|
|
1656
|
+
<vcard:version>4.0</vcard:version>
|
|
1657
|
+
<dc:title xmlns:dc="http://purl.org/dc/elements/1.1/">Contact: Dr. John Doe</dc:title>
|
|
1658
|
+
<vcard:fn>Dr. John Doe</vcard:fn>
|
|
1659
|
+
<dcterms:created xmlns:dcterms="http://purl.org/dc/terms/">2024-06-01T12:00:00+00:00</dcterms:created>
|
|
1660
|
+
</vcard:vCard>
|
|
1661
|
+
----
|
|
1662
|
+
====
|
|
1663
|
+
|
|
1664
|
+
=== Selective namespace consolidation
|
|
1665
|
+
|
|
1666
|
+
You can choose which namespaces to consolidate and which to keep local:
|
|
1667
|
+
|
|
1668
|
+
.Consolidating only frequently used namespaces
|
|
1669
|
+
[example]
|
|
1670
|
+
====
|
|
1671
|
+
[source,ruby]
|
|
1672
|
+
----
|
|
1673
|
+
class Vcard < Lutaml::Model::Serializable
|
|
1674
|
+
attribute :version, VcardVersion
|
|
1675
|
+
attribute :title, DcTitleType
|
|
1676
|
+
attribute :created, DctermsCreatedType
|
|
1677
|
+
|
|
1678
|
+
xml do
|
|
1679
|
+
element "vCard"
|
|
1680
|
+
namespace VcardNamespace
|
|
1681
|
+
namespace_scope [VcardNamespace, DcNamespace] <1>
|
|
1682
|
+
|
|
1683
|
+
map_element "version", to: :version
|
|
1684
|
+
map_element "title", to: :title
|
|
1685
|
+
map_element "created", to: :created
|
|
1686
|
+
end
|
|
1687
|
+
end
|
|
1688
|
+
----
|
|
1689
|
+
<1> Only vcard and dc namespaces at root; dcterms declared locally
|
|
1690
|
+
|
|
1691
|
+
Output:
|
|
1692
|
+
|
|
1693
|
+
[source,xml]
|
|
1694
|
+
----
|
|
1695
|
+
<vcard:vCard xmlns:vcard="urn:ietf:params:xml:ns:vcard-4.0"
|
|
1696
|
+
xmlns:dc="http://purl.org/dc/elements/1.1/">
|
|
1697
|
+
<vcard:version>4.0</vcard:version>
|
|
1698
|
+
<dc:title>Contact: Dr. John Doe</dc:title>
|
|
1699
|
+
<dcterms:created xmlns:dcterms="http://purl.org/dc/terms/">2024-06-01T12:00:00+00:00</dcterms:created>
|
|
1700
|
+
</vcard:vCard>
|
|
1701
|
+
----
|
|
1702
|
+
|
|
1703
|
+
The `dcterms` namespace is declared locally on the `<dcterms:created>` element
|
|
1704
|
+
because it was not included in `namespace_scope`.
|
|
1705
|
+
====
|
|
1706
|
+
|
|
1707
|
+
=== When to use namespace_scope
|
|
1708
|
+
|
|
1709
|
+
**Use `namespace_scope` when:**
|
|
1710
|
+
|
|
1711
|
+
* Multiple namespaces are used throughout the document
|
|
1712
|
+
* You prefer cleaner XML with consolidated declarations
|
|
1713
|
+
* Namespaces should be declared at a logical scoping level
|
|
1714
|
+
* The document structure benefits from upfront namespace declarations
|
|
1715
|
+
|
|
1716
|
+
**Do NOT use `namespace_scope` when:**
|
|
1717
|
+
|
|
1718
|
+
* Single namespace documents (not needed)
|
|
1719
|
+
* Namespaces are rarely used (local declaration is clearer)
|
|
1720
|
+
* External consumers expect local namespace declarations
|
|
1721
|
+
* Namespace declarations should be deferred to actual usage points
|
|
1722
|
+
|
|
1723
|
+
=== Round-trip behavior
|
|
1724
|
+
|
|
1725
|
+
Type-level namespaces with `namespace_scope` work correctly in both
|
|
1726
|
+
serialization and deserialization:
|
|
1727
|
+
|
|
1728
|
+
.Round-trip with namespace_scope
|
|
1729
|
+
[example]
|
|
1730
|
+
====
|
|
1731
|
+
[source,ruby]
|
|
1732
|
+
----
|
|
1733
|
+
# Serialize with consolidated namespaces
|
|
1734
|
+
vcard = Vcard.new(
|
|
1735
|
+
version: "4.0",
|
|
1736
|
+
title: "Dr. John Doe",
|
|
1737
|
+
created: DateTime.parse("2024-06-01T12:00:00Z")
|
|
1738
|
+
)
|
|
1739
|
+
|
|
1740
|
+
xml = vcard.to_xml
|
|
1741
|
+
# Namespaces declared at root
|
|
1742
|
+
|
|
1743
|
+
# Deserialize - namespaces correctly resolved
|
|
1744
|
+
parsed = Vcard.from_xml(xml)
|
|
1745
|
+
parsed == vcard # => true
|
|
1746
|
+
|
|
1747
|
+
# All attributes correctly parsed regardless of where namespace was declared
|
|
1748
|
+
parsed.version # => "4.0"
|
|
1749
|
+
parsed.title # => "Dr. John Doe"
|
|
1750
|
+
parsed.created # => DateTime "2024-06-01T12:00:00Z"
|
|
1751
|
+
----
|
|
1752
|
+
====
|
|
1753
|
+
|
|
1754
|
+
[[xsd-type-attribute-option]]
|