lutaml-model 0.7.7 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/dependent-tests.yml +4 -0
- data/.github/workflows/docs.yml +59 -0
- data/.github/workflows/downstream-performance.yml +156 -0
- data/.github/workflows/performance.yml +33 -0
- data/.github/workflows/rake.yml +13 -0
- data/.github/workflows/release.yml +5 -0
- data/.gitignore +27 -1
- data/.rubocop.yml +14 -2
- data/.rubocop_todo.yml +574 -88
- data/Gemfile +15 -9
- data/README.adoc +13522 -6905
- data/RELEASE_NOTES.adoc +51 -0
- data/Rakefile +2 -0
- data/bench/baselines/.gitkeep +0 -0
- data/bench/bench_all.rb +52 -0
- data/bench/bench_common.rb +147 -0
- data/bench/bench_compare.rb +195 -0
- data/bench/bench_mml.rb +53 -0
- data/bench/bench_niso.rb +54 -0
- data/bench/bench_sts.rb +49 -0
- data/bench/bench_unitsml.rb +43 -0
- data/bench/bench_uniword.rb +69 -0
- data/bench/bench_xmi.rb +51 -0
- data/bench/gate_config.rb +127 -0
- data/benchmark/quick_benchmark.rb +297 -0
- data/benchmark/serialization_benchmark.rb +619 -0
- data/docs/.rubocop.yml +1 -0
- data/docs/.rubocop_todo.yml +7 -0
- data/docs/Gemfile +13 -0
- data/docs/PERFORMANCE_METHODOLOGY.md +645 -0
- data/docs/_config.yml +145 -0
- data/docs/_guides/advanced-mapping.adoc +564 -0
- data/docs/_guides/character-encoding.adoc +342 -0
- data/docs/_guides/collection-serialization.adoc +349 -0
- data/docs/_guides/creating-xsd.adoc +1221 -0
- data/docs/_guides/index.adoc +71 -0
- data/docs/_guides/keyvalue-serialization.adoc +1156 -0
- data/docs/_guides/liquid-templates.adoc +505 -0
- data/docs/_guides/missing-values-handling.adoc +1531 -0
- data/docs/_guides/ooxml-examples.adoc +755 -0
- data/docs/{schema_generation.adoc → _guides/schema-generation.adoc} +5 -0
- data/docs/{schema_import.adoc → _guides/schema-import.adoc} +276 -4
- data/docs/_guides/value-transformations.adoc +1388 -0
- data/docs/_guides/xml/namespace-presentation.adoc +476 -0
- data/docs/_guides/xml/namespace-semantics.adoc +677 -0
- data/docs/_guides/xml/reusable-mapping-classes.adoc +181 -0
- data/docs/_guides/xml/schema-location.adoc +245 -0
- data/docs/_guides/xml/type-namespaces.adoc +1011 -0
- data/docs/_guides/xml-mapping.adoc +1847 -0
- data/docs/_guides/xml-mappings-guide.adoc +21 -0
- data/docs/_guides/xml-namespace-declarations.adoc +662 -0
- data/docs/_guides/xml-namespace-qualification.adoc +720 -0
- data/docs/_guides/xml-namespaces.adoc +2613 -0
- data/docs/_guides/xml_mappings/01_introduction.adoc +65 -0
- data/docs/_guides/xml_mappings/02_core_concepts.adoc +177 -0
- data/docs/_guides/xml_mappings/03_architecture.adoc +205 -0
- data/docs/_guides/xml_mappings/04_xml_namespace_class.adoc +1754 -0
- data/docs/_guides/xml_mappings/05_common_patterns.adoc +1803 -0
- data/docs/_guides/xml_mappings/06_migration_guide.adoc +523 -0
- data/docs/_guides/xml_mappings/07_best_practices.adoc +959 -0
- data/docs/_guides/xml_mappings/08_troubleshooting.adoc +934 -0
- data/docs/_migrations/0-1-0-migrate-from-shale.adoc +304 -0
- data/docs/_migrations/0-8-0-namespace-restructuring.adoc +1572 -0
- data/docs/_migrations/0-8-0-xsd-features.adoc +729 -0
- data/docs/_migrations/index.adoc +18 -0
- data/docs/_migrations/xsd-type-migration.adoc +1294 -0
- data/docs/_pages/attributes.adoc +1156 -0
- data/docs/_pages/breaking-changes.adoc +154 -0
- data/docs/_pages/collections.adoc +1664 -0
- data/docs/_pages/comparison-with-shale.adoc +139 -0
- data/docs/_pages/configuration.adoc +192 -0
- data/docs/_pages/consolidation-mapping.adoc +252 -0
- data/docs/_pages/importable_models.adoc +591 -0
- data/docs/_pages/index.adoc +46 -0
- data/docs/_pages/installation.adoc +35 -0
- data/docs/_pages/models.adoc +332 -0
- data/docs/_pages/quick-start.adoc +124 -0
- data/docs/_pages/serialization_adapters.adoc +268 -0
- data/docs/_pages/troubleshooting.adoc +104 -0
- data/docs/_pages/validation.adoc +171 -0
- data/docs/_pages/value_types.adoc +1514 -0
- data/docs/_pages/xml-conformance.adoc +143 -0
- data/docs/_references/architecture.adoc +189 -0
- data/docs/{custom_adapters.adoc → _references/custom_adapters.adoc} +6 -1
- data/docs/_references/custom_registers.adoc +1026 -0
- data/docs/_references/data-modeling-in-a-nutshell.adoc +207 -0
- data/docs/_references/format-independent-features.adoc +713 -0
- data/docs/_references/index.adoc +47 -0
- data/docs/_references/instance-serialization.adoc +120 -0
- data/docs/_references/lutaml-namespace-planning.md +120 -0
- data/docs/_references/parent-root-context.adoc +122 -0
- data/docs/_references/reference_type.adoc +302 -0
- data/docs/_references/serialization-model-mappings.adoc +102 -0
- data/docs/_references/three-phase-namespace-architecture.adoc +470 -0
- data/docs/_references/xml-w3c-namespace-qualification.adoc +66 -0
- data/docs/_references/xsd-generation-with-namespace-support.adoc +449 -0
- data/docs/_references/xsd-schema-parsing.adoc +1260 -0
- data/docs/_references/xsd-type-architecture.adoc +534 -0
- data/docs/_tutorials/basic-model-definition.adoc +157 -0
- data/docs/_tutorials/custom-types-tutorial.adoc +258 -0
- data/docs/_tutorials/first-json-serialization.adoc +192 -0
- data/docs/_tutorials/first-xml-serialization.adoc +223 -0
- data/docs/_tutorials/index.adoc +60 -0
- data/docs/_tutorials/lutaml-xml-architecture.adoc +1354 -0
- data/docs/_tutorials/polymorphic-models-tutorial.adoc +253 -0
- data/docs/_tutorials/schema-compiler-module-namespaces.adoc +497 -0
- data/docs/_tutorials/validation-basics.adoc +232 -0
- data/docs/_tutorials/working-with-collections.adoc +201 -0
- data/docs/_tutorials/xml-element-attribute-namespace-guide.adoc +279 -0
- data/docs/_tutorials/xml-namespaces-basics.adoc +315 -0
- data/docs/_tutorials/xml-schema-primer-style-guide.adoc +1394 -0
- data/docs/architecture.md +424 -0
- data/docs/bugreports/BUGREPORT_element_order_render_empty.md +99 -0
- data/docs/cli_compare.adoc +249 -0
- data/docs/collection_validation.adoc +366 -0
- data/docs/index.adoc +106 -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/lib/lutaml/{model/hash_adapter → hash_format/adapter}/document.rb +3 -4
- data/lib/lutaml/hash_format/adapter/mapping.rb +19 -0
- data/lib/lutaml/hash_format/adapter/mapping_rule.rb +9 -0
- data/lib/lutaml/{model/hash_adapter → hash_format/adapter}/standard_adapter.rb +3 -3
- data/lib/lutaml/hash_format/adapter/transform.rb +9 -0
- data/lib/lutaml/hash_format/adapter.rb +13 -0
- data/lib/lutaml/hash_format/type/serializers.rb +24 -0
- data/lib/lutaml/hash_format.rb +25 -0
- data/lib/lutaml/{model/json → json/adapter}/document.rb +3 -3
- data/lib/lutaml/json/adapter/mapping.rb +19 -0
- data/lib/lutaml/json/adapter/mapping_rule.rb +9 -0
- data/lib/lutaml/json/adapter/multi_json_adapter.rb +38 -0
- data/lib/lutaml/json/adapter/oj_adapter.rb +38 -0
- data/lib/lutaml/json/adapter/standard_adapter.rb +36 -0
- data/lib/lutaml/json/adapter/transform.rb +9 -0
- data/lib/lutaml/json/adapter.rb +20 -0
- data/lib/lutaml/json/schema/json_schema.rb +62 -0
- data/lib/lutaml/json/schema.rb +9 -0
- data/lib/lutaml/json/type/serializers.rb +72 -0
- data/lib/lutaml/json.rb +58 -0
- data/lib/lutaml/{model/jsonl → jsonl/adapter}/document.rb +2 -2
- data/lib/lutaml/jsonl/adapter/mapping.rb +19 -0
- data/lib/lutaml/jsonl/adapter/mapping_rule.rb +9 -0
- data/lib/lutaml/{model/jsonl → jsonl/adapter}/standard_adapter.rb +5 -4
- data/lib/lutaml/jsonl/adapter/transform.rb +26 -0
- data/lib/lutaml/jsonl/adapter.rb +13 -0
- data/lib/lutaml/jsonl.rb +21 -0
- data/lib/lutaml/key_value/adapter/hash/document.rb +13 -0
- data/lib/lutaml/key_value/adapter/hash/mapping.rb +19 -0
- data/lib/lutaml/key_value/adapter/hash/mapping_rule.rb +9 -0
- data/lib/lutaml/key_value/adapter/hash/standard_adapter.rb +19 -0
- data/lib/lutaml/key_value/adapter/hash/transform.rb +10 -0
- data/lib/lutaml/key_value/adapter/hash.rb +15 -0
- data/lib/lutaml/key_value/adapter/json/document.rb +16 -0
- data/lib/lutaml/key_value/adapter/json/mapping.rb +24 -0
- data/lib/lutaml/key_value/adapter/json/mapping_rule.rb +14 -0
- data/lib/lutaml/key_value/adapter/json/multi_json_adapter.rb +43 -0
- data/lib/lutaml/key_value/adapter/json/oj_adapter.rb +43 -0
- data/lib/lutaml/key_value/adapter/json/standard_adapter.rb +41 -0
- data/lib/lutaml/key_value/adapter/json/transform.rb +14 -0
- data/lib/lutaml/key_value/adapter/json.rb +24 -0
- data/lib/lutaml/key_value/adapter/jsonl/document.rb +16 -0
- data/lib/lutaml/key_value/adapter/jsonl/mapping.rb +19 -0
- data/lib/lutaml/key_value/adapter/jsonl/mapping_rule.rb +9 -0
- data/lib/lutaml/key_value/adapter/jsonl/standard_adapter.rb +36 -0
- data/lib/lutaml/key_value/adapter/jsonl/transform.rb +26 -0
- data/lib/lutaml/key_value/adapter/jsonl.rb +17 -0
- data/lib/lutaml/key_value/adapter/toml/document.rb +13 -0
- data/lib/lutaml/key_value/adapter/toml/mapping.rb +28 -0
- data/lib/lutaml/key_value/adapter/toml/mapping_rule.rb +9 -0
- data/lib/lutaml/key_value/adapter/toml/toml_rb_adapter.rb +40 -0
- data/lib/lutaml/key_value/adapter/toml/tomlib_adapter.rb +46 -0
- data/lib/lutaml/key_value/adapter/toml/transform.rb +10 -0
- data/lib/lutaml/key_value/adapter/toml.rb +21 -0
- data/lib/lutaml/key_value/adapter/yaml/document.rb +12 -0
- data/lib/lutaml/key_value/adapter/yaml/mapping.rb +19 -0
- data/lib/lutaml/key_value/adapter/yaml/mapping_rule.rb +9 -0
- data/lib/lutaml/key_value/adapter/yaml/standard_adapter.rb +41 -0
- data/lib/lutaml/key_value/adapter/yaml/transform.rb +10 -0
- data/lib/lutaml/key_value/adapter/yaml.rb +17 -0
- data/lib/lutaml/key_value/adapter/yamls/document.rb +16 -0
- data/lib/lutaml/key_value/adapter/yamls/mapping.rb +19 -0
- data/lib/lutaml/key_value/adapter/yamls/mapping_rule.rb +9 -0
- data/lib/lutaml/key_value/adapter/yamls/standard_adapter.rb +37 -0
- data/lib/lutaml/key_value/adapter/yamls/transform.rb +26 -0
- data/lib/lutaml/key_value/adapter/yamls.rb +17 -0
- data/lib/lutaml/key_value/adapter.rb +14 -0
- data/lib/lutaml/key_value/data_model/element.rb +222 -0
- data/lib/lutaml/key_value/data_model.rb +14 -0
- data/lib/lutaml/{model/key_value_document.rb → key_value/document.rb} +2 -2
- data/lib/lutaml/{model/mapping/key_value_mapping.rb → key_value/mapping.rb} +81 -43
- data/lib/lutaml/{model/mapping/key_value_mapping_rule.rb → key_value/mapping_rule.rb} +9 -10
- data/lib/lutaml/{model/transform/key_value_transform.rb → key_value/transform.rb} +111 -65
- data/lib/lutaml/key_value/transformation/collection_serializer.rb +575 -0
- data/lib/lutaml/key_value/transformation/rule_compiler.rb +294 -0
- data/lib/lutaml/key_value/transformation/value_serializer.rb +268 -0
- data/lib/lutaml/key_value/transformation.rb +1071 -0
- data/lib/lutaml/key_value/transformation_builder.rb +30 -0
- data/lib/lutaml/key_value.rb +24 -0
- data/lib/lutaml/model/attribute.rb +515 -121
- data/lib/lutaml/model/attribute_validator.rb +288 -0
- data/lib/lutaml/model/cached_type_resolver/concurrent_map_cache.rb +46 -0
- data/lib/lutaml/model/cached_type_resolver/mutex_hash_cache.rb +51 -0
- data/lib/lutaml/model/cached_type_resolver.rb +144 -0
- data/lib/lutaml/model/choice.rb +230 -13
- data/lib/lutaml/model/cli.rb +75 -121
- data/lib/lutaml/model/collection.rb +510 -43
- data/lib/lutaml/model/collection_handler.rb +106 -0
- data/lib/lutaml/model/comparable_model.rb +11 -3
- data/lib/lutaml/model/comparable_nil.rb +0 -2
- data/lib/lutaml/model/compiled_rule.rb +208 -0
- data/lib/lutaml/model/config.rb +56 -88
- data/lib/lutaml/model/configuration.rb +323 -0
- data/lib/lutaml/model/consolidation/attribute_grouper.rb +44 -0
- data/lib/lutaml/model/consolidation/dispatcher.rb +45 -0
- data/lib/lutaml/model/consolidation/engine.rb +33 -0
- data/lib/lutaml/model/consolidation/pattern_chunker.rb +87 -0
- data/lib/lutaml/model/consolidation_map.rb +68 -0
- data/lib/lutaml/model/consolidation_rule/dispatch_block.rb +34 -0
- data/lib/lutaml/model/consolidation_rule/gather_rule.rb +17 -0
- data/lib/lutaml/model/consolidation_rule/pattern_content_rule.rb +15 -0
- data/lib/lutaml/model/consolidation_rule/pattern_element_rule.rb +17 -0
- data/lib/lutaml/model/consolidation_rule.rb +27 -0
- data/lib/lutaml/model/constants.rb +5 -3
- data/lib/lutaml/model/context_registry.rb +208 -0
- data/lib/lutaml/model/error/element_count_out_of_range_error.rb +13 -7
- data/lib/lutaml/model/error/format_adapter_not_specified_error.rb +25 -0
- data/lib/lutaml/model/error/invalid_attribute_type_error.rb +98 -0
- data/lib/lutaml/model/error/invalid_format_error.rb +11 -0
- data/lib/lutaml/model/error/liquid_class_not_found_error.rb +9 -0
- data/lib/lutaml/model/error/mapping_already_exists_error.rb +6 -0
- data/lib/lutaml/model/error/mapping_attribute_missing_error.rb +6 -0
- data/lib/lutaml/model/error/mapping_attribute_type_error.rb +6 -0
- data/lib/lutaml/model/error/mixed_content_collection_error.rb +17 -0
- data/lib/lutaml/model/error/no_attributes_defined_liquid_error.rb +9 -0
- data/lib/lutaml/model/error/no_mapping_found_error.rb +9 -0
- data/lib/lutaml/model/error/required_attribute_missing_error.rb +9 -0
- data/lib/lutaml/model/error/reverse_transform_block_not_defined_error.rb +6 -0
- data/lib/lutaml/model/error/reverse_transformation_declaration_error.rb +6 -0
- data/lib/lutaml/model/error/sorting_configuration_conflict_error.rb +9 -0
- data/lib/lutaml/model/error/transform_block_not_defined_error.rb +6 -0
- data/lib/lutaml/model/error/type.rb +17 -0
- data/lib/lutaml/model/error/undefined_attribute_error.rb +9 -0
- data/lib/lutaml/model/error/unknown_adapter_type_error.rb +82 -3
- data/lib/lutaml/model/error/unknown_type_error.rb +25 -2
- data/lib/lutaml/model/error/unresolvable_type_error.rb +27 -0
- data/lib/lutaml/model/error.rb +2 -33
- data/lib/lutaml/model/errors.rb +4 -2
- data/lib/lutaml/model/finalization_cache.rb +51 -0
- data/lib/lutaml/model/format_registry.rb +236 -2
- data/lib/lutaml/model/global_context.rb +446 -0
- data/lib/lutaml/model/global_register.rb +106 -5
- data/lib/lutaml/model/hash.rb +15 -0
- data/lib/lutaml/model/import_registry.rb +250 -0
- data/lib/lutaml/model/instrumentation.rb +304 -0
- data/lib/lutaml/model/json.rb +17 -13
- data/lib/lutaml/model/jsonl.rb +7 -13
- data/lib/lutaml/model/liquefiable.rb +100 -12
- data/lib/lutaml/model/liquid/mapping.rb +30 -0
- data/lib/lutaml/model/liquid.rb +9 -0
- data/lib/lutaml/model/mapping/listener.rb +124 -0
- data/lib/lutaml/model/mapping/mapping.rb +99 -1
- data/lib/lutaml/model/mapping/mapping_rule.rb +172 -17
- data/lib/lutaml/model/mapping/model_mapping.rb +133 -0
- data/lib/lutaml/model/mapping/model_mapping_rule.rb +57 -0
- data/lib/lutaml/model/mapping_hash.rb +3 -1
- data/lib/lutaml/model/model_transformer.rb +101 -0
- data/lib/lutaml/model/one_entry_cache.rb +57 -0
- data/lib/lutaml/model/organization.rb +29 -0
- data/lib/lutaml/model/register/model_tree_importer.rb +88 -0
- data/lib/lutaml/model/register/namespace_binding.rb +92 -0
- data/lib/lutaml/model/register.rb +500 -35
- data/lib/lutaml/model/registrable.rb +2 -0
- data/lib/lutaml/model/render_policy.rb +154 -0
- data/lib/lutaml/model/runtime_compatibility.rb +95 -0
- data/lib/lutaml/model/schema/base_schema.rb +1 -3
- data/lib/lutaml/model/schema/decorators/attribute.rb +3 -1
- data/lib/lutaml/model/schema/decorators/choices.rb +0 -2
- data/lib/lutaml/model/schema/decorators/class_definition.rb +4 -5
- data/lib/lutaml/model/schema/decorators/definition_collection.rb +7 -7
- data/lib/lutaml/model/schema/decorators.rb +15 -0
- data/lib/lutaml/model/schema/generator/definition.rb +4 -3
- data/lib/lutaml/model/schema/generator/definitions_collection.rb +4 -3
- data/lib/lutaml/model/schema/generator/properties_collection.rb +7 -5
- data/lib/lutaml/model/schema/generator/property.rb +5 -1
- data/lib/lutaml/model/schema/generator.rb +15 -0
- data/lib/lutaml/model/schema/helpers.rb +11 -0
- data/lib/lutaml/model/schema/json_schema.rb +9 -53
- data/lib/lutaml/model/schema/renderer.rb +19 -17
- data/lib/lutaml/model/schema/schema_builder/nokogiri.rb +41 -0
- data/lib/lutaml/model/schema/schema_builder/oga.rb +92 -0
- data/lib/lutaml/model/schema/shared_methods.rb +2 -2
- data/lib/lutaml/model/schema/xml_compiler/attribute.rb +33 -12
- data/lib/lutaml/model/schema/xml_compiler/attribute_group.rb +3 -1
- data/lib/lutaml/model/schema/xml_compiler/choice.rb +4 -2
- data/lib/lutaml/model/schema/xml_compiler/complex_type.rb +73 -36
- data/lib/lutaml/model/schema/xml_compiler/element.rb +18 -1
- data/lib/lutaml/model/schema/xml_compiler/group.rb +20 -4
- data/lib/lutaml/model/schema/xml_compiler/registry_generator.rb +127 -0
- data/lib/lutaml/model/schema/xml_compiler/restriction.rb +5 -2
- data/lib/lutaml/model/schema/xml_compiler/sequence.rb +6 -2
- data/lib/lutaml/model/schema/xml_compiler/simple_content.rb +7 -3
- data/lib/lutaml/model/schema/xml_compiler/simple_type.rb +127 -51
- data/lib/lutaml/model/schema/xml_compiler/xml_namespace_class.rb +110 -0
- data/lib/lutaml/model/schema/xml_compiler.rb +256 -82
- data/lib/lutaml/model/schema/yaml_schema.rb +10 -50
- data/lib/lutaml/model/schema.rb +49 -14
- data/lib/lutaml/model/schema_location.rb +12 -60
- data/lib/lutaml/model/sequence.rb +102 -30
- data/lib/lutaml/model/serializable.rb +1 -3
- data/lib/lutaml/model/serialization_adapter.rb +2 -0
- data/lib/lutaml/model/serialize/attribute_definition.rb +229 -0
- data/lib/lutaml/model/serialize/builder.rb +169 -0
- data/lib/lutaml/model/serialize/enum_handling.rb +124 -0
- data/lib/lutaml/model/serialize/format_conversion.rb +298 -0
- data/lib/lutaml/model/serialize/initialization.rb +308 -0
- data/lib/lutaml/model/serialize/model_import.rb +357 -0
- data/lib/lutaml/model/serialize/transformation_builder.rb +127 -0
- data/lib/lutaml/model/serialize/value_mapping.rb +200 -0
- data/lib/lutaml/model/serialize.rb +175 -580
- data/lib/lutaml/model/services/base.rb +2 -2
- data/lib/lutaml/model/services/default_value_resolver.rb +60 -0
- data/lib/lutaml/model/services/logger.rb +10 -7
- data/lib/lutaml/model/services/rule_value_extractor.rb +22 -36
- data/lib/lutaml/model/services/transformer.rb +50 -9
- data/lib/lutaml/model/services/type/validator/string.rb +3 -2
- data/lib/lutaml/model/services/type/validator/symbol.rb +30 -0
- data/lib/lutaml/model/services/type/validator.rb +5 -2
- data/lib/lutaml/model/services/type.rb +9 -0
- data/lib/lutaml/model/services/validator.rb +1 -3
- data/lib/lutaml/model/services.rb +12 -5
- data/lib/lutaml/model/store.rb +59 -0
- data/lib/lutaml/model/toml.rb +24 -18
- data/lib/lutaml/model/transform/xml_transform.rb +4 -227
- data/lib/lutaml/model/transform.rb +49 -17
- data/lib/lutaml/model/transformation.rb +84 -0
- data/lib/lutaml/model/transformation_builder.rb +55 -0
- data/lib/lutaml/model/transformation_registry.rb +314 -0
- data/lib/lutaml/model/type/base64_binary.rb +58 -0
- data/lib/lutaml/model/type/boolean.rb +9 -16
- data/lib/lutaml/model/type/date.rb +49 -9
- data/lib/lutaml/model/type/date_time.rb +30 -18
- data/lib/lutaml/model/type/decimal.rb +28 -9
- data/lib/lutaml/model/type/duration.rb +82 -0
- data/lib/lutaml/model/type/float.rb +12 -13
- data/lib/lutaml/model/type/hash.rb +10 -17
- data/lib/lutaml/model/type/hex_binary.rb +56 -0
- data/lib/lutaml/model/type/integer.rb +19 -1
- data/lib/lutaml/model/type/qname.rb +85 -0
- data/lib/lutaml/model/type/reference.rb +76 -0
- data/lib/lutaml/model/type/string.rb +18 -35
- data/lib/lutaml/model/type/symbol.rb +67 -0
- data/lib/lutaml/model/type/time.rb +19 -22
- data/lib/lutaml/model/type/time_without_date.rb +18 -18
- data/lib/lutaml/model/type/uninitialized_class_guard.rb +36 -0
- data/lib/lutaml/model/type/uri.rb +51 -0
- data/lib/lutaml/model/type/value.rb +52 -5
- data/lib/lutaml/model/type.rb +98 -13
- data/lib/lutaml/model/type_context.rb +279 -0
- data/lib/lutaml/model/type_registry.rb +165 -0
- data/lib/lutaml/model/type_resolver.rb +185 -0
- data/lib/lutaml/model/type_substitution.rb +117 -0
- data/lib/lutaml/model/uninitialized_class.rb +1 -1
- data/lib/lutaml/model/utils.rb +110 -9
- data/lib/lutaml/model/validation.rb +50 -7
- data/lib/lutaml/model/value_transformer.rb +25 -0
- data/lib/lutaml/model/version.rb +1 -1
- data/lib/lutaml/model/yaml.rb +7 -13
- data/lib/lutaml/model/yamls.rb +7 -13
- data/lib/lutaml/model.rb +227 -25
- data/lib/lutaml/{model/toml → toml/adapter}/document.rb +3 -4
- data/lib/lutaml/{model/toml → toml/adapter}/mapping.rb +7 -6
- data/lib/lutaml/toml/adapter/mapping_rule.rb +9 -0
- data/lib/lutaml/toml/adapter/toml_rb_adapter.rb +38 -0
- data/lib/lutaml/toml/adapter/tomlib_adapter.rb +54 -0
- data/lib/lutaml/toml/adapter/transform.rb +9 -0
- data/lib/lutaml/toml/adapter.rb +19 -0
- data/lib/lutaml/toml/type/serializers.rb +71 -0
- data/lib/lutaml/toml.rb +41 -0
- data/lib/lutaml/xml/adapter/adapter_helpers.rb +149 -0
- data/lib/lutaml/xml/adapter/base_adapter.rb +672 -0
- data/lib/lutaml/xml/adapter/namespace_data.rb +73 -0
- data/lib/lutaml/xml/adapter/nokogiri_adapter.rb +1115 -0
- data/lib/lutaml/xml/adapter/oga_adapter.rb +849 -0
- data/lib/lutaml/xml/adapter/ox_adapter.rb +891 -0
- data/lib/lutaml/xml/adapter/rexml_adapter.rb +869 -0
- data/lib/lutaml/xml/adapter/xml_serialization.rb +145 -0
- data/lib/lutaml/xml/adapter.rb +20 -0
- data/lib/lutaml/xml/adapter_element.rb +185 -0
- data/lib/lutaml/xml/adapter_loader.rb +53 -0
- data/lib/lutaml/xml/attribute_namespace_resolver.rb +139 -0
- data/lib/lutaml/xml/blank_namespace.rb +51 -0
- data/lib/lutaml/xml/blank_namespace_handler.rb +50 -0
- data/lib/lutaml/xml/builder/base.rb +215 -0
- data/lib/lutaml/xml/builder/nokogiri.rb +12 -0
- data/lib/lutaml/xml/builder/oga.rb +15 -0
- data/lib/lutaml/xml/builder/ox.rb +15 -0
- data/lib/lutaml/xml/builder/rexml.rb +15 -0
- data/lib/lutaml/xml/builder.rb +16 -0
- data/lib/lutaml/xml/configurable.rb +214 -0
- data/lib/lutaml/xml/data_model.rb +257 -0
- data/lib/lutaml/xml/decisions/decision.rb +103 -0
- data/lib/lutaml/xml/decisions/decision_context.rb +225 -0
- data/lib/lutaml/xml/decisions/decision_engine.rb +67 -0
- data/lib/lutaml/xml/decisions/decision_rule.rb +54 -0
- data/lib/lutaml/xml/decisions/element_prefix_resolver.rb +85 -0
- data/lib/lutaml/xml/decisions/rules/attribute_usage_rule.rb +37 -0
- data/lib/lutaml/xml/decisions/rules/default_preference_rule.rb +62 -0
- data/lib/lutaml/xml/decisions/rules/element_form_default_rule.rb +66 -0
- data/lib/lutaml/xml/decisions/rules/element_form_default_unqualified_rule.rb +73 -0
- data/lib/lutaml/xml/decisions/rules/element_form_option_rule.rb +83 -0
- data/lib/lutaml/xml/decisions/rules/explicit_option_rule.rb +57 -0
- data/lib/lutaml/xml/decisions/rules/format_preservation_rule.rb +74 -0
- data/lib/lutaml/xml/decisions/rules/hoisted_on_parent_rule.rb +60 -0
- data/lib/lutaml/xml/decisions/rules/inherit_from_parent_rule.rb +52 -0
- data/lib/lutaml/xml/decisions/rules/inherit_parent_prefix_rule.rb +69 -0
- data/lib/lutaml/xml/decisions/rules/namespace_scope_rule.rb +54 -0
- data/lib/lutaml/xml/decisions/rules/reuse_parent_prefix_rule.rb +78 -0
- data/lib/lutaml/xml/decisions/rules/used_prefix_rule.rb +70 -0
- data/lib/lutaml/xml/decisions/rules.rb +39 -0
- data/lib/lutaml/xml/decisions.rb +15 -0
- data/lib/lutaml/xml/declaration_handler.rb +217 -0
- data/lib/lutaml/xml/declaration_plan/attribute_node.rb +81 -0
- data/lib/lutaml/xml/declaration_plan/element_node.rb +101 -0
- data/lib/lutaml/xml/declaration_plan.rb +480 -0
- data/lib/lutaml/xml/declaration_plan_query.rb +105 -0
- data/lib/lutaml/xml/declaration_planner.rb +1849 -0
- data/lib/lutaml/xml/doctype_extractor.rb +51 -0
- data/lib/lutaml/xml/document.rb +380 -0
- data/lib/lutaml/xml/element.rb +93 -0
- data/lib/lutaml/xml/element_prefix_resolver.rb +50 -0
- data/lib/lutaml/xml/encoding_normalizer.rb +54 -0
- data/lib/lutaml/xml/error/invalid_namespace_error.rb +46 -0
- data/lib/lutaml/xml/error/invalid_xsd_type_error.rb +43 -0
- data/lib/lutaml/xml/error/namespace_mismatch_error.rb +53 -0
- data/lib/lutaml/xml/error/xml_configuration_error.rb +17 -0
- data/lib/lutaml/xml/error/xml_error.rb +21 -0
- data/lib/lutaml/xml/format_chooser.rb +214 -0
- data/lib/lutaml/xml/hoisting_algorithm.rb +234 -0
- data/lib/lutaml/xml/listener.rb +33 -0
- data/lib/lutaml/xml/mapping.rb +1470 -0
- data/lib/lutaml/xml/mapping_rule.rb +565 -0
- data/lib/lutaml/xml/model_transform.rb +944 -0
- data/lib/lutaml/xml/namespace.rb +435 -0
- data/lib/lutaml/xml/namespace_class_registry.rb +144 -0
- data/lib/lutaml/xml/namespace_collector.rb +611 -0
- data/lib/lutaml/xml/namespace_declaration.rb +202 -0
- data/lib/lutaml/xml/namespace_declaration_builder.rb +67 -0
- data/lib/lutaml/xml/namespace_declaration_data.rb +182 -0
- data/lib/lutaml/xml/namespace_inheritance_resolver.rb +142 -0
- data/lib/lutaml/xml/namespace_inheritance_strategy.rb +26 -0
- data/lib/lutaml/xml/namespace_needs.rb +213 -0
- data/lib/lutaml/xml/namespace_resolution_strategy.rb +230 -0
- data/lib/lutaml/xml/namespace_resolver.rb +219 -0
- data/lib/lutaml/xml/namespace_scope_config.rb +109 -0
- data/lib/lutaml/xml/namespace_type_resolver.rb +135 -0
- data/lib/lutaml/xml/namespace_usage.rb +121 -0
- data/lib/lutaml/xml/nokogiri/element.rb +34 -0
- data/lib/lutaml/xml/nokogiri.rb +10 -0
- data/lib/lutaml/xml/oga/element.rb +15 -0
- data/lib/lutaml/xml/oga.rb +10 -0
- data/lib/lutaml/xml/ox/element.rb +15 -0
- data/lib/lutaml/xml/ox.rb +10 -0
- data/lib/lutaml/xml/parsed_namespace_declaration.rb +129 -0
- data/lib/lutaml/xml/parsed_namespace_set.rb +149 -0
- data/lib/lutaml/xml/polymorphic_value_handler.rb +41 -0
- data/lib/lutaml/xml/qualified_inheritance_strategy.rb +27 -0
- data/lib/lutaml/xml/rexml/element.rb +15 -0
- data/lib/lutaml/xml/rexml.rb +10 -0
- data/lib/lutaml/xml/schema/builder/nokogiri.rb +41 -0
- data/lib/lutaml/xml/schema/builder/oga.rb +92 -0
- data/lib/lutaml/xml/schema/builder.rb +59 -0
- data/lib/lutaml/xml/schema/builtin_types.rb +112 -0
- data/lib/lutaml/{model → xml}/schema/relaxng_schema.rb +9 -4
- data/lib/lutaml/xml/schema/xsd/all.rb +31 -0
- data/lib/lutaml/xml/schema/xsd/annotation.rb +31 -0
- data/lib/lutaml/xml/schema/xsd/any.rb +33 -0
- data/lib/lutaml/xml/schema/xsd/any_attribute.rb +29 -0
- data/lib/lutaml/xml/schema/xsd/appinfo.rb +25 -0
- data/lib/lutaml/xml/schema/xsd/attribute.rb +78 -0
- data/lib/lutaml/xml/schema/xsd/attribute_group.rb +89 -0
- data/lib/lutaml/xml/schema/xsd/base.rb +267 -0
- data/lib/lutaml/xml/schema/xsd/choice.rb +68 -0
- data/lib/lutaml/xml/schema/xsd/complex_content.rb +39 -0
- data/lib/lutaml/xml/schema/xsd/complex_type.rb +157 -0
- data/lib/lutaml/xml/schema/xsd/documentation.rb +26 -0
- data/lib/lutaml/xml/schema/xsd/element.rb +117 -0
- data/lib/lutaml/xml/schema/xsd/enumeration.rb +25 -0
- data/lib/lutaml/xml/schema/xsd/errors/enhanced_error.rb +142 -0
- data/lib/lutaml/xml/schema/xsd/errors/error_context.rb +67 -0
- data/lib/lutaml/xml/schema/xsd/errors/message_builder.rb +103 -0
- data/lib/lutaml/xml/schema/xsd/errors/suggestion.rb +67 -0
- data/lib/lutaml/xml/schema/xsd/errors/troubleshooters/namespace_troubleshooter.rb +96 -0
- data/lib/lutaml/xml/schema/xsd/errors/troubleshooters/troubleshooting_handler.rb +70 -0
- data/lib/lutaml/xml/schema/xsd/errors.rb +148 -0
- data/lib/lutaml/xml/schema/xsd/extension_complex_content.rb +63 -0
- data/lib/lutaml/xml/schema/xsd/extension_simple_content.rb +48 -0
- data/lib/lutaml/xml/schema/xsd/field.rb +25 -0
- data/lib/lutaml/xml/schema/xsd/file_validation_result.rb +55 -0
- data/lib/lutaml/xml/schema/xsd/fraction_digits.rb +29 -0
- data/lib/lutaml/xml/schema/xsd/glob.rb +105 -0
- data/lib/lutaml/xml/schema/xsd/group.rb +79 -0
- data/lib/lutaml/xml/schema/xsd/import.rb +33 -0
- data/lib/lutaml/xml/schema/xsd/include.rb +31 -0
- data/lib/lutaml/xml/schema/xsd/key.rb +32 -0
- data/lib/lutaml/xml/schema/xsd/keyref.rb +33 -0
- data/lib/lutaml/xml/schema/xsd/length.rb +27 -0
- data/lib/lutaml/xml/schema/xsd/list.rb +28 -0
- data/lib/lutaml/xml/schema/xsd/max_exclusive.rb +25 -0
- data/lib/lutaml/xml/schema/xsd/max_inclusive.rb +23 -0
- data/lib/lutaml/xml/schema/xsd/max_length.rb +25 -0
- data/lib/lutaml/xml/schema/xsd/min_exclusive.rb +25 -0
- data/lib/lutaml/xml/schema/xsd/min_inclusive.rb +23 -0
- data/lib/lutaml/xml/schema/xsd/min_length.rb +25 -0
- data/lib/lutaml/xml/schema/xsd/namespace_mapping.rb +37 -0
- data/lib/lutaml/xml/schema/xsd/namespace_uri_remapping.rb +79 -0
- data/lib/lutaml/xml/schema/xsd/notation.rb +31 -0
- data/lib/lutaml/xml/schema/xsd/pattern.rb +25 -0
- data/lib/lutaml/xml/schema/xsd/redefine.rb +35 -0
- data/lib/lutaml/xml/schema/xsd/restriction_complex_content.rb +56 -0
- data/lib/lutaml/xml/schema/xsd/restriction_simple_content.rb +84 -0
- data/lib/lutaml/xml/schema/xsd/restriction_simple_type.rb +64 -0
- data/lib/lutaml/xml/schema/xsd/schema.rb +373 -0
- data/lib/lutaml/xml/schema/xsd/schema_file_validation_results.rb +55 -0
- data/lib/lutaml/xml/schema/xsd/schema_location_mapping.rb +74 -0
- data/lib/lutaml/xml/schema/xsd/schema_name_resolver.rb +32 -0
- data/lib/lutaml/xml/schema/xsd/schema_path.rb +196 -0
- data/lib/lutaml/xml/schema/xsd/schema_validator.rb +256 -0
- data/lib/lutaml/xml/schema/xsd/selector.rb +27 -0
- data/lib/lutaml/xml/schema/xsd/sequence.rb +68 -0
- data/lib/lutaml/xml/schema/xsd/serialized_schema.rb +185 -0
- data/lib/lutaml/xml/schema/xsd/simple_content.rb +61 -0
- data/lib/lutaml/xml/schema/xsd/simple_type.rb +37 -0
- data/lib/lutaml/xml/schema/xsd/total_digits.rb +29 -0
- data/lib/lutaml/xml/schema/xsd/type_index_entry.rb +40 -0
- data/lib/lutaml/xml/schema/xsd/type_resolution_result.rb +112 -0
- data/lib/lutaml/xml/schema/xsd/union.rb +30 -0
- data/lib/lutaml/xml/schema/xsd/unique.rb +31 -0
- data/lib/lutaml/xml/schema/xsd/validation_error.rb +48 -0
- data/lib/lutaml/xml/schema/xsd/validation_result.rb +86 -0
- data/lib/lutaml/xml/schema/xsd/version.rb +11 -0
- data/lib/lutaml/xml/schema/xsd/white_space.rb +27 -0
- data/lib/lutaml/xml/schema/xsd.rb +165 -0
- data/lib/lutaml/xml/schema/xsd_namespace.rb +29 -0
- data/lib/lutaml/xml/schema/xsd_schema.rb +536 -0
- data/lib/lutaml/xml/schema.rb +13 -0
- data/lib/lutaml/xml/schema_location.rb +155 -0
- data/lib/lutaml/xml/serialization/collection_ext.rb +61 -0
- data/lib/lutaml/xml/serialization/format_conversion.rb +402 -0
- data/lib/lutaml/xml/serialization/instance_methods.rb +297 -0
- data/lib/lutaml/xml/serialization/model_import_ext.rb +40 -0
- data/lib/lutaml/xml/serialization.rb +15 -0
- data/lib/lutaml/xml/shared_dsl.rb +119 -0
- data/lib/lutaml/xml/transform.rb +6 -0
- data/lib/lutaml/xml/transformation/custom_method_wrapper.rb +262 -0
- data/lib/lutaml/xml/transformation/element_builder.rb +586 -0
- data/lib/lutaml/xml/transformation/ordered_applier.rb +329 -0
- data/lib/lutaml/xml/transformation/rule_applier.rb +379 -0
- data/lib/lutaml/xml/transformation/rule_compiler.rb +543 -0
- data/lib/lutaml/xml/transformation/skip_logic.rb +70 -0
- data/lib/lutaml/xml/transformation/value_serializer.rb +139 -0
- data/lib/lutaml/xml/transformation.rb +340 -0
- data/lib/lutaml/xml/transformation_builder.rb +28 -0
- data/lib/lutaml/xml/transformation_support.rb +14 -0
- data/lib/lutaml/xml/type/configurable.rb +157 -0
- data/lib/lutaml/xml/type/serializers.rb +98 -0
- data/lib/lutaml/xml/type/value_xml_mapping.rb +94 -0
- data/lib/lutaml/xml/type_namespace/collector.rb +101 -0
- data/lib/lutaml/xml/type_namespace/declaration.rb +61 -0
- data/lib/lutaml/xml/type_namespace/planner.rb +121 -0
- data/lib/lutaml/xml/type_namespace/reference.rb +71 -0
- data/lib/lutaml/xml/type_namespace/resolver.rb +43 -0
- data/lib/lutaml/xml/type_namespace.rb +13 -0
- data/lib/lutaml/xml/type_namespace_resolver.rb +76 -0
- data/lib/lutaml/xml/unqualified_inheritance_strategy.rb +34 -0
- data/lib/lutaml/xml/w3c/registration.rb +66 -0
- data/lib/lutaml/xml/w3c.rb +398 -0
- data/lib/lutaml/xml/xml_attribute.rb +38 -0
- data/lib/lutaml/xml/xml_element.rb +447 -0
- data/lib/lutaml/xml/xml_namespace.rb +72 -0
- data/lib/lutaml/xml.rb +295 -0
- data/lib/lutaml/{model/yaml → yaml/adapter}/document.rb +3 -3
- data/lib/lutaml/yaml/adapter/mapping.rb +19 -0
- data/lib/lutaml/yaml/adapter/mapping_rule.rb +9 -0
- data/lib/lutaml/yaml/adapter/standard_adapter.rb +39 -0
- data/lib/lutaml/yaml/adapter/transform.rb +9 -0
- data/lib/lutaml/yaml/adapter.rb +13 -0
- data/lib/lutaml/yaml/schema/yaml_schema.rb +65 -0
- data/lib/lutaml/yaml/schema.rb +9 -0
- data/lib/lutaml/yaml/type/serializers.rb +60 -0
- data/lib/lutaml/yaml.rb +26 -0
- data/lib/lutaml/{model/yamls → yamls/adapter}/document.rb +2 -2
- data/lib/lutaml/yamls/adapter/mapping.rb +19 -0
- data/lib/lutaml/yamls/adapter/mapping_rule.rb +9 -0
- data/lib/lutaml/{model/yamls → yamls/adapter}/standard_adapter.rb +6 -5
- data/lib/lutaml/yamls/adapter/transform.rb +26 -0
- data/lib/lutaml/yamls/adapter.rb +13 -0
- data/lib/lutaml/yamls.rb +21 -0
- data/lib/tasks/benchmark_runner.rb +161 -0
- data/lib/tasks/memory_profile.rb +176 -0
- data/lib/tasks/performance.rake +75 -0
- data/lib/tasks/performance_benchmark.rb +499 -0
- data/lib/tasks/performance_comparator.rb +114 -0
- data/lib/tasks/performance_helpers.rb +149 -0
- data/lib/tasks/xml_compiler_benchmark.rb +226 -0
- data/lib/tasks/xml_optimization_benchmark.rb +178 -0
- data/lutaml-model.gemspec +11 -1
- data/reference-docs/XML Entity Definitions for Characters (3rd Edition).html +595 -0
- data/scripts-xmi-profile/profile_xmi.rb +192 -0
- data/scripts-xmi-profile/profile_xmi_simple.rb +210 -0
- data/spec/address_person_spec.rb +436 -0
- data/spec/address_spec.rb +20 -18
- data/spec/ceramic_spec.rb +25 -7
- data/spec/fixtures/address.rb +2 -2
- data/spec/fixtures/ceramic.rb +6 -2
- data/spec/fixtures/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/lutaml/key_value/transformation/collection_serializer_spec.rb +213 -0
- data/spec/lutaml/key_value/transformation/rule_compiler_spec.rb +229 -0
- data/spec/lutaml/key_value/transformation/value_serializer_spec.rb +216 -0
- data/spec/lutaml/key_value/transformation_spec.rb +292 -0
- data/spec/lutaml/model/attribute_collection_spec.rb +9 -6
- data/spec/lutaml/model/attribute_form_default_spec.rb +252 -0
- data/spec/lutaml/model/attribute_spec.rb +328 -38
- data/spec/lutaml/model/cached_type_resolver_spec.rb +362 -0
- data/spec/lutaml/model/cdata_spec.rb +180 -102
- data/spec/lutaml/model/choice_spec.rb +37 -7
- data/spec/lutaml/model/cli_spec.rb +452 -0
- data/spec/lutaml/model/collection_index_spec.rb +347 -0
- data/spec/lutaml/model/collection_mutation_spec.rb +124 -0
- data/spec/lutaml/model/collection_spec.rb +580 -155
- data/spec/lutaml/model/collection_validation_spec.rb +736 -0
- data/spec/lutaml/model/comparable_model_spec.rb +75 -0
- data/spec/lutaml/model/compiled_rule_spec.rb +364 -0
- data/spec/lutaml/model/consolidation_spec.rb +295 -0
- data/spec/lutaml/model/context_registry_spec.rb +269 -0
- data/spec/lutaml/model/custom_bibtex_adapter_spec.rb +21 -7
- data/spec/lutaml/model/custom_collection_spec.rb +321 -27
- data/spec/lutaml/model/custom_model_spec.rb +13 -10
- data/spec/lutaml/model/custom_serialization_spec.rb +12 -14
- data/spec/lutaml/model/custom_vobject_adapter_spec.rb +36 -16
- data/spec/lutaml/model/default_register_spec.rb +852 -0
- data/spec/lutaml/model/defaults_spec.rb +57 -6
- data/spec/lutaml/model/delegation_spec.rb +184 -110
- data/spec/lutaml/model/derived_attribute_serialization_spec.rb +33 -0
- data/spec/lutaml/model/dynamic_attribute_spec.rb +112 -0
- data/spec/lutaml/model/encoding_spec.rb +281 -0
- data/spec/lutaml/model/enum_spec.rb +46 -2
- data/spec/lutaml/model/except_spec.rb +240 -0
- data/spec/lutaml/model/finalization_cache_spec.rb +88 -0
- data/spec/lutaml/model/global_context_spec.rb +421 -0
- data/spec/lutaml/model/global_register_spec.rb +153 -36
- data/spec/lutaml/model/group_spec.rb +193 -54
- data/spec/lutaml/model/hash/adapter_spec.rb +5 -3
- data/spec/lutaml/model/import_registry_spec.rb +295 -0
- data/spec/lutaml/model/included_spec.rb +10 -17
- data/spec/lutaml/model/inheritance_spec.rb +6 -6
- data/spec/lutaml/model/json_adapter_spec.rb +13 -6
- data/spec/lutaml/model/json_spec.rb +33 -0
- data/spec/lutaml/model/key_value_data_model/key_value_element_spec.rb +320 -0
- data/spec/lutaml/model/key_value_mapping_spec.rb +12 -2
- data/spec/lutaml/model/lazy_collection_spec.rb +208 -0
- data/spec/lutaml/model/liquefiable_spec.rb +263 -24
- data/spec/lutaml/model/logger_spec.rb +68 -0
- data/spec/lutaml/model/map_all_spec.rb +36 -11
- data/spec/lutaml/model/map_content_spec.rb +4 -4
- data/spec/lutaml/model/mapping_rule_perf_guard_spec.rb +71 -0
- data/spec/lutaml/model/mixed_content_spec.rb +481 -171
- data/spec/lutaml/model/model_transformer_spec.rb +678 -0
- data/spec/lutaml/model/multiple_mapping_spec.rb +71 -39
- data/spec/lutaml/model/namespace_versioning_spec.rb +390 -0
- data/spec/lutaml/model/one_entry_cache_spec.rb +114 -0
- data/spec/lutaml/model/ordered_content_spec.rb +115 -24
- data/spec/lutaml/model/polymorphic_spec.rb +29 -6
- data/spec/lutaml/model/processing_instruction_spec.rb +375 -0
- data/spec/lutaml/model/{register/key_value_spec.rb → register_key_value_spec.rb} +57 -5
- data/spec/lutaml/model/register_spec.rb +235 -5
- data/spec/lutaml/model/render_empty_spec.rb +143 -6
- data/spec/lutaml/model/render_nil_spec.rb +15 -10
- data/spec/lutaml/model/root_mappings_spec.rb +16 -6
- data/spec/lutaml/model/rule_value_extractor_spec.rb +13 -44
- data/spec/lutaml/model/runtime_compatibility_spec.rb +36 -0
- data/spec/lutaml/model/schema/generator/definitions_collection_spec.rb +4 -0
- data/spec/lutaml/model/schema/json_schema_spec.rb +7 -1
- data/spec/lutaml/model/schema/relaxng_schema_spec.rb +1 -1
- data/spec/lutaml/model/schema/renderer_spec.rb +128 -0
- data/spec/lutaml/model/schema/xsd_schema_spec.rb +1 -1
- data/spec/lutaml/model/sequence_spec.rb +460 -15
- data/spec/lutaml/model/serializable_spec.rb +212 -12
- data/spec/lutaml/model/serializable_validation_spec.rb +3 -2
- data/spec/lutaml/model/serialize_perf_guard_spec.rb +100 -0
- data/spec/lutaml/model/services/default_value_resolver_spec.rb +162 -0
- data/spec/lutaml/model/simple_model_spec.rb +4 -4
- data/spec/lutaml/model/toml_adapter_spec.rb +11 -4
- data/spec/lutaml/model/toml_spec.rb +46 -2
- data/spec/lutaml/model/transformation_builder_spec.rb +283 -0
- data/spec/lutaml/model/transformation_spec.rb +165 -236
- data/spec/lutaml/model/type/base64_binary_spec.rb +202 -0
- data/spec/lutaml/model/type/date_spec.rb +132 -0
- data/spec/lutaml/model/type/date_time_spec.rb +54 -2
- data/spec/lutaml/model/type/decimal_spec.rb +1 -1
- data/spec/lutaml/model/type/duration_spec.rb +185 -0
- data/spec/lutaml/model/type/hex_binary_spec.rb +225 -0
- data/spec/lutaml/model/type/integer_spec.rb +1 -1
- data/spec/lutaml/model/type/qname_spec.rb +246 -0
- data/spec/lutaml/model/type/reference_integration_spec.rb +532 -0
- data/spec/lutaml/model/type/reference_spec.rb +293 -0
- data/spec/lutaml/model/type/symbol_spec.rb +322 -0
- data/spec/lutaml/model/type/time_spec.rb +6 -5
- data/spec/lutaml/model/type/time_without_date_spec.rb +1 -1
- data/spec/lutaml/model/type/uninitialized_class_spec.rb +110 -0
- data/spec/lutaml/model/type/uri_spec.rb +176 -0
- data/spec/lutaml/model/type/value_xml_mapping_spec.rb +162 -0
- data/spec/lutaml/model/type_context_spec.rb +370 -0
- data/spec/lutaml/model/type_registry_spec.rb +313 -0
- data/spec/lutaml/model/type_resolver_spec.rb +278 -0
- data/spec/lutaml/model/type_spec.rb +7 -8
- data/spec/lutaml/model/type_substitution_spec.rb +172 -0
- data/spec/lutaml/model/utils_spec.rb +39 -24
- data/spec/lutaml/model/value_map_spec.rb +2 -2
- data/spec/lutaml/model/value_transformation_comprehensive_spec.rb +676 -0
- data/spec/lutaml/model/with_child_mapping_spec.rb +1 -1
- data/spec/lutaml/model/xml_decoupling_spec.rb +435 -0
- data/spec/lutaml/model/xsd_form_default_patterns_spec.rb +664 -0
- data/spec/lutaml/model/xsd_patterns_spec.rb +278 -0
- data/spec/lutaml/model/xsd_type_spec.rb +345 -0
- data/spec/lutaml/model/xsd_type_validation_spec.rb +442 -0
- data/spec/lutaml/model/yamls/standard_adapter_spec.rb +2 -2
- data/spec/lutaml/xml/adapter/nokogiri_adapter_spec.rb +130 -0
- data/spec/lutaml/xml/adapter/oga_adapter_spec.rb +135 -0
- data/spec/lutaml/xml/adapter/ox_adapter_spec.rb +101 -0
- data/spec/lutaml/xml/adapter/rexml_adapter_spec.rb +101 -0
- data/spec/lutaml/xml/adapter/xml_namespace_spec.rb +531 -0
- data/spec/lutaml/xml/builder/builder_spec.rb +216 -0
- data/spec/lutaml/xml/compiled_rule_namespace_spec.rb +405 -0
- data/spec/lutaml/xml/conformance/xml_namespaces_spec.rb +580 -0
- data/spec/lutaml/xml/conformance/xml_schema_instance_spec.rb +266 -0
- data/spec/lutaml/xml/data_model_spec.rb +300 -0
- data/spec/lutaml/xml/decisions/decision_engine_spec.rb +242 -0
- data/spec/lutaml/xml/decisions/decision_spec.rb +217 -0
- data/spec/lutaml/xml/decisions/element_prefix_resolver_spec.rb +198 -0
- data/spec/lutaml/xml/declaration_planner_spec.rb +524 -0
- data/spec/lutaml/xml/default_namespace_spec.rb +190 -0
- data/spec/lutaml/{model/xml → xml}/derived_attributes_spec.rb +2 -2
- data/spec/lutaml/xml/doctype_preservation_spec.rb +323 -0
- data/spec/lutaml/xml/doubly_defined_namespace_spec.rb +415 -0
- data/spec/lutaml/xml/dual_namespace_element_spec.rb +181 -0
- data/spec/lutaml/xml/element_spec.rb +28 -0
- data/spec/lutaml/xml/encoding_normalizer_spec.rb +215 -0
- data/spec/lutaml/xml/enhanced_mapping_spec.rb +692 -0
- data/spec/lutaml/xml/entity_fragmentation_spec.rb +583 -0
- data/spec/lutaml/xml/format_chooser_spec.rb +0 -0
- data/spec/lutaml/xml/fpi_namespace_spec.rb +145 -0
- data/spec/lutaml/{model/xml/namespace_spec.rb → xml/general_namespace_spec.rb} +6 -5
- data/spec/lutaml/xml/mapping_finalization_guard_spec.rb +83 -0
- data/spec/lutaml/xml/mapping_rule_spec.rb +98 -0
- data/spec/lutaml/xml/mapping_spec.rb +1147 -0
- data/spec/lutaml/xml/model_transform_guard_spec.rb +126 -0
- data/spec/lutaml/{model/xml → xml}/namespace/nested_with_explicit_namespace_spec.rb +8 -5
- data/spec/lutaml/xml/namespace/w3c_reserved_warning_spec.rb +152 -0
- data/spec/lutaml/xml/namespace_alias_prefix_root_spec.rb +130 -0
- data/spec/lutaml/xml/namespace_alias_spec.rb +263 -0
- data/spec/lutaml/xml/namespace_aware_parsing_spec.rb +219 -0
- data/spec/lutaml/xml/namespace_backward_compatibility_spec.rb +48 -0
- data/spec/lutaml/xml/namespace_bound_element_roundtrip_spec.rb +433 -0
- data/spec/lutaml/xml/namespace_constant_spec.rb +383 -0
- data/spec/lutaml/xml/namespace_force_prefix_spec.rb +113 -0
- data/spec/lutaml/xml/namespace_format_preservation_spec.rb +49 -0
- data/spec/lutaml/xml/namespace_inheritance_deep_spec.rb +162 -0
- data/spec/lutaml/xml/namespace_inheritance_override_spec.rb +316 -0
- data/spec/lutaml/xml/namespace_inheritance_resolver_spec.rb +0 -0
- data/spec/lutaml/xml/namespace_inheritance_spec.rb +966 -0
- data/spec/lutaml/xml/namespace_integration_spec.rb +277 -0
- data/spec/lutaml/xml/namespace_missing_prefix_spec.rb +178 -0
- data/spec/lutaml/xml/namespace_no_hoisting_spec.rb +172 -0
- data/spec/lutaml/xml/namespace_placement_spec.rb +265 -0
- data/spec/lutaml/xml/namespace_preservation_spec.rb +427 -0
- data/spec/lutaml/xml/namespace_principles_spec.rb +909 -0
- data/spec/lutaml/xml/namespace_resolution_strategy_spec.rb +273 -0
- data/spec/lutaml/xml/namespace_scope_declare_spec.rb +205 -0
- data/spec/lutaml/xml/namespace_scope_spec.rb +389 -0
- data/spec/lutaml/xml/namespace_scope_vcard_spec.rb +616 -0
- data/spec/lutaml/xml/namespace_spec.rb +712 -0
- data/spec/lutaml/xml/namespace_three_phase_spec.rb +310 -0
- data/spec/lutaml/xml/nil_optional_element_namespace_spec.rb +84 -0
- data/spec/lutaml/xml/ooxml_namespace_spec.rb +177 -0
- data/spec/lutaml/xml/ordered_method_spec.rb +109 -0
- data/spec/lutaml/xml/prefix_control_spec.rb +286 -0
- data/spec/lutaml/{model/register/xml_spec.rb → xml/register_spec.rb} +75 -21
- data/spec/lutaml/xml/reusable_mapping_spec.rb +148 -0
- data/spec/lutaml/xml/reused_elements_namespace_spec.rb +85 -0
- data/spec/lutaml/{model/schema/xml_compiler → xml/schema/compiler}/attribute_group_spec.rb +9 -3
- data/spec/lutaml/{model/schema/xml_compiler → xml/schema/compiler}/attribute_spec.rb +11 -7
- data/spec/lutaml/{model/schema/xml_compiler → xml/schema/compiler}/choice_spec.rb +5 -2
- data/spec/lutaml/{model/schema/xml_compiler → xml/schema/compiler}/complex_content_restriction_spec.rb +7 -2
- data/spec/lutaml/{model/schema/xml_compiler → xml/schema/compiler}/complex_content_spec.rb +5 -1
- data/spec/lutaml/{model/schema/xml_compiler → xml/schema/compiler}/complex_type_spec.rb +49 -20
- data/spec/lutaml/{model/schema/xml_compiler → xml/schema/compiler}/element_spec.rb +9 -4
- data/spec/lutaml/{model/schema/xml_compiler → xml/schema/compiler}/group_spec.rb +9 -5
- data/spec/lutaml/{model/schema/xml_compiler → xml/schema/compiler}/restriction_spec.rb +1 -0
- data/spec/lutaml/{model/schema/xml_compiler → xml/schema/compiler}/sequence_spec.rb +10 -4
- data/spec/lutaml/{model/schema/xml_compiler → xml/schema/compiler}/simple_content_spec.rb +9 -3
- data/spec/lutaml/{model/schema/xml_compiler → xml/schema/compiler}/simple_type_spec.rb +10 -7
- data/spec/lutaml/{model/schema/xml_compiler_spec.rb → xml/schema/compiler_spec.rb} +219 -94
- data/spec/lutaml/xml/schema/xsd/errors/error_context_spec.rb +65 -0
- data/spec/lutaml/xml/schema/xsd/errors/suggestion_spec.rb +77 -0
- data/spec/lutaml/xml/schema/xsd/file_validation_result_spec.rb +131 -0
- data/spec/lutaml/xml/schema/xsd/glob_spec.rb +318 -0
- data/spec/lutaml/xml/schema/xsd/liquid_methods/attribute_and_group_spec.rb +76 -0
- data/spec/lutaml/xml/schema/xsd/liquid_methods/complex_type_spec.rb +159 -0
- data/spec/lutaml/xml/schema/xsd/liquid_methods/containers_spec.rb +104 -0
- data/spec/lutaml/xml/schema/xsd/liquid_methods/element_spec.rb +139 -0
- data/spec/lutaml/xml/schema/xsd/liquid_methods/schema_spec.rb +75 -0
- data/spec/lutaml/xml/schema/xsd/liquid_methods/simple_content_spec.rb +79 -0
- data/spec/lutaml/xml/schema/xsd/namespace_uri_remapping_spec.rb +246 -0
- data/spec/lutaml/xml/schema/xsd/schema_helper_methods_spec.rb +237 -0
- data/spec/lutaml/xml/schema/xsd/schema_mapping_spec.rb +742 -0
- data/spec/lutaml/xml/schema/xsd/schema_validator_spec.rb +228 -0
- data/spec/lutaml/xml/schema/xsd/spec_helper.rb +26 -0
- data/spec/lutaml/xml/schema/xsd/validation_error_spec.rb +189 -0
- data/spec/lutaml/xml/schema/xsd/validation_result_spec.rb +276 -0
- data/spec/lutaml/xml/schema/xsd/xsd_spec.rb +51 -0
- data/spec/lutaml/xml/schema_primer_spec.rb +393 -0
- data/spec/lutaml/xml/serializable_namespace_spec.rb +125 -0
- data/spec/lutaml/xml/transformation/custom_method_wrapper_spec.rb +48 -0
- data/spec/lutaml/xml/transformation_spec.rb +439 -0
- data/spec/lutaml/xml/type_namespace/collector_spec.rb +212 -0
- data/spec/lutaml/xml/type_namespace/planner_spec.rb +270 -0
- data/spec/lutaml/xml/type_namespace_examples_spec.rb +521 -0
- data/spec/lutaml/xml/type_namespace_integration_spec.rb +332 -0
- data/spec/lutaml/xml/type_namespace_prefix_spec.rb +370 -0
- data/spec/lutaml/xml/type_namespace_resolver_spec.rb +0 -0
- data/spec/lutaml/xml/type_namespace_roundtrip_spec.rb +580 -0
- data/spec/lutaml/xml/w3c_types_spec.rb +376 -0
- data/spec/lutaml/{model → xml}/xml_adapter_spec.rb +64 -17
- data/spec/lutaml/xml/xml_declaration_spec.rb +568 -0
- data/spec/lutaml/xml/xml_element_guard_spec.rb +138 -0
- data/spec/lutaml/{model/xml → xml}/xml_element_spec.rb +1 -1
- data/spec/lutaml/xml/xml_lang_spec.rb +441 -0
- data/spec/lutaml/xml/xml_space_spec.rb +247 -0
- data/spec/lutaml/xml/xml_space_type_spec.rb +161 -0
- data/spec/lutaml/xml/xml_spec.rb +122 -0
- data/spec/parent_root_spec.rb +63 -0
- data/spec/person_spec.rb +9 -9
- data/spec/spec_helper.rb +64 -6
- data/spec/support/test_adapter_config.rb +101 -0
- data/spec/support/test_namespaces.rb +185 -0
- data/spec/support/trace_helper.rb +0 -0
- data/spec/support/xml/schema_helper.rb +15 -0
- data/spec/support/xml/xsd/code_example_validator.rb +393 -0
- data/spec/support/xml_mapping_namespaces.rb +176 -0
- metadata +1465 -100
- data/docs/custom_registers.adoc +0 -228
- data/lib/lutaml/model/hash_adapter/mapping.rb +0 -19
- data/lib/lutaml/model/hash_adapter/mapping_rule.rb +0 -9
- data/lib/lutaml/model/hash_adapter/transform.rb +0 -8
- data/lib/lutaml/model/hash_adapter.rb +0 -21
- data/lib/lutaml/model/json/mapping.rb +0 -19
- data/lib/lutaml/model/json/mapping_rule.rb +0 -9
- data/lib/lutaml/model/json/multi_json_adapter.rb +0 -18
- data/lib/lutaml/model/json/standard_adapter.rb +0 -25
- data/lib/lutaml/model/json/transform.rb +0 -8
- data/lib/lutaml/model/jsonl/mapping.rb +0 -19
- data/lib/lutaml/model/jsonl/mapping_rule.rb +0 -9
- data/lib/lutaml/model/jsonl/transform.rb +0 -19
- data/lib/lutaml/model/schema/xsd_schema.rb +0 -62
- data/lib/lutaml/model/toml/mapping_rule.rb +0 -9
- data/lib/lutaml/model/toml/toml_rb_adapter.rb +0 -18
- data/lib/lutaml/model/toml/tomlib_adapter.rb +0 -19
- data/lib/lutaml/model/toml/transform.rb +0 -8
- data/lib/lutaml/model/xml/builder/nokogiri.rb +0 -101
- data/lib/lutaml/model/xml/builder/oga.rb +0 -183
- data/lib/lutaml/model/xml/builder/ox.rb +0 -121
- data/lib/lutaml/model/xml/document.rb +0 -477
- data/lib/lutaml/model/xml/element.rb +0 -32
- data/lib/lutaml/model/xml/mapping.rb +0 -471
- data/lib/lutaml/model/xml/mapping_rule.rb +0 -149
- data/lib/lutaml/model/xml/nokogiri_adapter.rb +0 -234
- data/lib/lutaml/model/xml/oga/document.rb +0 -20
- data/lib/lutaml/model/xml/oga/element.rb +0 -123
- data/lib/lutaml/model/xml/oga_adapter.rb +0 -172
- data/lib/lutaml/model/xml/ox_adapter.rb +0 -229
- data/lib/lutaml/model/xml/transform.rb +0 -8
- data/lib/lutaml/model/xml/xml_attribute.rb +0 -37
- data/lib/lutaml/model/xml/xml_element.rb +0 -167
- data/lib/lutaml/model/xml/xml_namespace.rb +0 -49
- data/lib/lutaml/model/xml.rb +0 -31
- data/lib/lutaml/model/xml_adapter/element.rb +0 -18
- data/lib/lutaml/model/xml_adapter/nokogiri_adapter.rb +0 -15
- data/lib/lutaml/model/xml_adapter/oga_adapter.rb +0 -21
- data/lib/lutaml/model/xml_adapter/ox_adapter.rb +0 -18
- data/lib/lutaml/model/xml_adapter.rb +0 -7
- data/lib/lutaml/model/yaml/mapping.rb +0 -19
- data/lib/lutaml/model/yaml/mapping_rule.rb +0 -9
- data/lib/lutaml/model/yaml/standard_adapter.rb +0 -28
- data/lib/lutaml/model/yaml/transform.rb +0 -8
- data/lib/lutaml/model/yamls/mapping.rb +0 -19
- data/lib/lutaml/model/yamls/mapping_rule.rb +0 -9
- data/lib/lutaml/model/yamls/transform.rb +0 -19
- data/spec/benchmarks/xml_parsing_benchmark_spec.rb +0 -74
- data/spec/fixtures/xml/advanced_test_schema.xsd +0 -134
- data/spec/lutaml/model/namespace_spec.rb +0 -57
- data/spec/lutaml/model/xml_adapter/nokogiri_adapter_spec.rb +0 -56
- data/spec/lutaml/model/xml_adapter/oga_adapter_spec.rb +0 -60
- data/spec/lutaml/model/xml_adapter/ox_adapter_spec.rb +0 -61
- data/spec/lutaml/model/xml_adapter/xml_namespace_spec.rb +0 -368
- data/spec/lutaml/model/xml_mapping_rule_spec.rb +0 -158
- data/spec/lutaml/model/xml_mapping_spec.rb +0 -1318
- data/spec/lutaml/model/xml_spec.rb +0 -63
- /data/spec/lutaml/{model/xml → xml}/root_mappings/nested_child_mappings_spec.rb +0 -0
|
@@ -0,0 +1,1388 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Value Transformations
|
|
3
|
+
nav_order: 9
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
= Value Transformations in LutaML Model
|
|
7
|
+
|
|
8
|
+
== Purpose
|
|
9
|
+
|
|
10
|
+
This guide provides comprehensive guidance on value transformations in LutaML Model, helping you choose the right approach for your transformation needs.
|
|
11
|
+
|
|
12
|
+
Value transformations are operations that convert data between different representations while preserving or deriving the underlying information. This guide distinguishes between value-level and model-level transformations and provides a decision framework for implementation.
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
== Concepts
|
|
16
|
+
|
|
17
|
+
=== Value vs Model Distinction
|
|
18
|
+
|
|
19
|
+
Understanding the difference between values and models is crucial for choosing the right transformation approach.
|
|
20
|
+
|
|
21
|
+
**Value (Atomic)**::
|
|
22
|
+
The smallest representation in a serialization format that cannot be decomposed further within that format.
|
|
23
|
+
+
|
|
24
|
+
.Characteristics of Values
|
|
25
|
+
* Atomic - Cannot be broken down into smaller parts in the serialization format
|
|
26
|
+
* Self-contained - Represents a complete piece of information
|
|
27
|
+
* Format-specific - May have different representations in different formats
|
|
28
|
+
+
|
|
29
|
+
.Examples of Values
|
|
30
|
+
* `"20241225"` - A date string in YYYYMMDD format
|
|
31
|
+
* `1234` - An integer
|
|
32
|
+
* `true` - A boolean
|
|
33
|
+
* `"RGB(255,128,0)"` - A color specification
|
|
34
|
+
* `"2024-12-25T10:30:00Z"` - An ISO8601 datetime
|
|
35
|
+
|
|
36
|
+
**Model (Composite)**::
|
|
37
|
+
A structure containing multiple attributes or components that can be accessed individually.
|
|
38
|
+
+
|
|
39
|
+
.Characteristics of Models
|
|
40
|
+
* Composite - Contains multiple distinct attributes
|
|
41
|
+
* Mappable - Can use mapping rules to transform structure
|
|
42
|
+
* Decomposable - Components can be accessed and mapped separately
|
|
43
|
+
+
|
|
44
|
+
.Examples of Models
|
|
45
|
+
* `{year: 2024, month: 12, day: 25}` - Date components as separate attributes
|
|
46
|
+
* `{red: 255, green: 128, blue: 0}` - Color components
|
|
47
|
+
* `{hour: 10, minute: 30, second: 0}` - Time components
|
|
48
|
+
|
|
49
|
+
.Key Distinction
|
|
50
|
+
====
|
|
51
|
+
The fundamental difference is whether the data can be **mapped** (model) or must be **transformed** (value).
|
|
52
|
+
|
|
53
|
+
* **Mapping** - Structural reorganization without computation
|
|
54
|
+
* **Transformation** - Computational conversion or derivation
|
|
55
|
+
|
|
56
|
+
Example: Converting `"20241225"` to `"25122024"` requires transformation (string manipulation), while converting `{year: 2024, month: 12, day: 25}` to `{day: 25, month: 12, year: 2024}` only requires mapping.
|
|
57
|
+
====
|
|
58
|
+
|
|
59
|
+
=== Transformation Types
|
|
60
|
+
|
|
61
|
+
Value transformations fall into two main categories:
|
|
62
|
+
|
|
63
|
+
==== Format Conversion Transformations
|
|
64
|
+
|
|
65
|
+
**Purpose:** Convert the same information between different representations.
|
|
66
|
+
|
|
67
|
+
**Characteristics:**
|
|
68
|
+
* Information is preserved
|
|
69
|
+
* Typically bidirectional
|
|
70
|
+
* No calculation required (only format manipulation)
|
|
71
|
+
|
|
72
|
+
.Examples of Format Conversion
|
|
73
|
+
|===
|
|
74
|
+
| From Format | To Format | Transformation Type
|
|
75
|
+
|
|
76
|
+
| YYYYMMDD (`"20241225"`)
|
|
77
|
+
| DDMMYYYY (`"25122024"`)
|
|
78
|
+
| String reformatting
|
|
79
|
+
|
|
80
|
+
| ISO8601 (`"2024-12-25"`)
|
|
81
|
+
| YYYYMMDD (`"20241225"`)
|
|
82
|
+
| Date component rearrangement
|
|
83
|
+
|
|
84
|
+
| Hex color (`"#FF8000"`)
|
|
85
|
+
| RGB notation (`"RGB(255,128,0)"`)
|
|
86
|
+
| Numeric base conversion
|
|
87
|
+
|
|
88
|
+
| Unix timestamp (`1735128600`)
|
|
89
|
+
| ISO8601 (`"2024-12-25T10:30:00Z"`)
|
|
90
|
+
| Time representation conversion
|
|
91
|
+
|===
|
|
92
|
+
|
|
93
|
+
==== Calculated Value Transformations
|
|
94
|
+
|
|
95
|
+
**Purpose:** Derive new information through computation.
|
|
96
|
+
|
|
97
|
+
**Characteristics:**
|
|
98
|
+
* Information may be derived or aggregated
|
|
99
|
+
* May be unidirectional or bidirectional
|
|
100
|
+
* Requires calculation or algorithmic processing
|
|
101
|
+
|
|
102
|
+
.Examples of Calculated Transformations
|
|
103
|
+
|===
|
|
104
|
+
| From Value | To Value | Calculation Required
|
|
105
|
+
|
|
106
|
+
| YYYYMMDD (`"20241225"`)
|
|
107
|
+
| YYYYWWDD (`"20245203"`)
|
|
108
|
+
| ISO week number calculation
|
|
109
|
+
|
|
110
|
+
| Celsius (`25.0`)
|
|
111
|
+
| Fahrenheit (`77.0`)
|
|
112
|
+
| Temperature formula: F = C × 9/5 + 32
|
|
113
|
+
|
|
114
|
+
| Distance + Speed
|
|
115
|
+
| Duration
|
|
116
|
+
| time = distance / speed
|
|
117
|
+
|
|
118
|
+
| Date components
|
|
119
|
+
| Day of year
|
|
120
|
+
| Days since January 1st
|
|
121
|
+
|===
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
== Transformation Approaches
|
|
125
|
+
|
|
126
|
+
LutaML Model provides three distinct approaches for value transformations, each suited for different scenarios.
|
|
127
|
+
|
|
128
|
+
=== Approach 1: Custom Value Type Classes
|
|
129
|
+
|
|
130
|
+
==== Overview
|
|
131
|
+
|
|
132
|
+
Custom Value Type classes provide the most powerful and reusable transformation mechanism by creating dedicated type classes that inherit from `Lutaml::Model::Type::Value`.
|
|
133
|
+
|
|
134
|
+
==== Structure
|
|
135
|
+
|
|
136
|
+
[source,ruby]
|
|
137
|
+
----
|
|
138
|
+
class CustomValueType < Lutaml::Model::Type::Value
|
|
139
|
+
# REQUIRED: Core conversion methods
|
|
140
|
+
def self.cast(value)
|
|
141
|
+
# Convert external/string value to internal Ruby object
|
|
142
|
+
# This is called when assigning values to attributes
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
def self.serialize(value)
|
|
146
|
+
# Convert internal Ruby object to generic serialization string
|
|
147
|
+
# Used as fallback when format-specific methods not defined
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
# OPTIONAL: Format-specific deserialization
|
|
151
|
+
def self.from_xml(value)
|
|
152
|
+
# Parse XML string representation to internal object
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
def self.from_json(value)
|
|
156
|
+
# Parse JSON string representation to internal object
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
def self.from_yaml(value)
|
|
160
|
+
# Parse YAML string representation to internal object
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
# OPTIONAL: Format-specific serialization
|
|
164
|
+
def to_xml
|
|
165
|
+
# Serialize internal object to XML string
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
def to_json
|
|
169
|
+
# Serialize internal object to JSON string
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
def to_yaml
|
|
173
|
+
# Serialize internal object to YAML string
|
|
174
|
+
end
|
|
175
|
+
end
|
|
176
|
+
----
|
|
177
|
+
|
|
178
|
+
==== When to Use
|
|
179
|
+
|
|
180
|
+
Use Custom Value Type classes when:
|
|
181
|
+
|
|
182
|
+
* ✅ Bidirectional transformations are needed
|
|
183
|
+
* ✅ Format-specific representations are required
|
|
184
|
+
* ✅ Logic will be reused across multiple attributes or models
|
|
185
|
+
* ✅ Complex parsing or serialization logic is involved
|
|
186
|
+
* ✅ Type safety and encapsulation are important
|
|
187
|
+
* ✅ Custom validation rules are needed
|
|
188
|
+
|
|
189
|
+
==== Advantages
|
|
190
|
+
|
|
191
|
+
* **Reusable** - Define once, use across many attributes
|
|
192
|
+
* **Type-safe** - Encapsulates all transformation logic in one place
|
|
193
|
+
* **Format-aware** - Different logic per serialization format
|
|
194
|
+
* **Testable** - Easy to unit test in isolation
|
|
195
|
+
* **Maintainable** - Centralized logic, easier to modify
|
|
196
|
+
|
|
197
|
+
==== Complete Example: Bidirectional Date Formats
|
|
198
|
+
|
|
199
|
+
[source,ruby]
|
|
200
|
+
----
|
|
201
|
+
# Supports different date formats in different serialization formats
|
|
202
|
+
class MultiFormatDate < Lutaml::Model::Type::Date
|
|
203
|
+
# Core conversion: any input to Date object
|
|
204
|
+
def self.cast(value)
|
|
205
|
+
case value
|
|
206
|
+
when ::Date then value
|
|
207
|
+
when ::String then parse_any_format(value)
|
|
208
|
+
else
|
|
209
|
+
super # Delegate to parent class
|
|
210
|
+
end
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
# Default serialization
|
|
214
|
+
def self.serialize(value)
|
|
215
|
+
value&.iso8601
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
# XML uses YYYYMMDD format
|
|
219
|
+
def self.from_xml(value)
|
|
220
|
+
return nil if value.nil? || value.empty?
|
|
221
|
+
|
|
222
|
+
year = value[0..3].to_i
|
|
223
|
+
month = value[4..5].to_i
|
|
224
|
+
day = value[6..7].to_i
|
|
225
|
+
|
|
226
|
+
::Date.new(year, month, day)
|
|
227
|
+
rescue ArgumentError
|
|
228
|
+
nil
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
def to_xml
|
|
232
|
+
value&.strftime("%Y%m%d")
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
# JSON uses DDMMYYYY format
|
|
236
|
+
def self.from_json(value)
|
|
237
|
+
return nil if value.nil? || value.empty?
|
|
238
|
+
|
|
239
|
+
day = value[0..1].to_i
|
|
240
|
+
month = value[2..3].to_i
|
|
241
|
+
year = value[4..7].to_i
|
|
242
|
+
|
|
243
|
+
::Date.new(year, month, day)
|
|
244
|
+
rescue ArgumentError
|
|
245
|
+
nil
|
|
246
|
+
end
|
|
247
|
+
|
|
248
|
+
def to_json
|
|
249
|
+
value&.strftime("%d%m%Y")
|
|
250
|
+
end
|
|
251
|
+
|
|
252
|
+
# YAML uses standard ISO8601
|
|
253
|
+
def self.from_yaml(value)
|
|
254
|
+
::Date.parse(value.to_s)
|
|
255
|
+
rescue ArgumentError
|
|
256
|
+
nil
|
|
257
|
+
end
|
|
258
|
+
|
|
259
|
+
def to_yaml
|
|
260
|
+
value&.iso8601
|
|
261
|
+
end
|
|
262
|
+
|
|
263
|
+
private
|
|
264
|
+
|
|
265
|
+
def self.parse_any_format(str)
|
|
266
|
+
# Try different formats intelligently
|
|
267
|
+
from_xml(str) || from_json(str) || ::Date.parse(str)
|
|
268
|
+
rescue
|
|
269
|
+
nil
|
|
270
|
+
end
|
|
271
|
+
end
|
|
272
|
+
|
|
273
|
+
# Usage in a model
|
|
274
|
+
class Event < Lutaml::Model::Serializable
|
|
275
|
+
attribute :event_date, MultiFormatDate
|
|
276
|
+
|
|
277
|
+
xml do
|
|
278
|
+
root "event"
|
|
279
|
+
map_element "eventDate", to: :event_date
|
|
280
|
+
end
|
|
281
|
+
|
|
282
|
+
json do
|
|
283
|
+
map "eventDate", to: :event_date
|
|
284
|
+
end
|
|
285
|
+
|
|
286
|
+
yaml do
|
|
287
|
+
map "eventDate", to: :event_date
|
|
288
|
+
end
|
|
289
|
+
end
|
|
290
|
+
----
|
|
291
|
+
|
|
292
|
+
.Round-trip transformation demonstration
|
|
293
|
+
[example]
|
|
294
|
+
====
|
|
295
|
+
[source,ruby]
|
|
296
|
+
----
|
|
297
|
+
event = Event.new(event_date: Date.new(2024, 12, 25))
|
|
298
|
+
|
|
299
|
+
# XML serialization uses YYYYMMDD
|
|
300
|
+
xml = event.to_xml
|
|
301
|
+
# => <event><eventDate>20241225</eventDate></event>
|
|
302
|
+
|
|
303
|
+
# JSON serialization uses DDMMYYYY
|
|
304
|
+
json = event.to_json
|
|
305
|
+
# => {"eventDate":"25122024"}
|
|
306
|
+
|
|
307
|
+
# YAML serialization uses ISO8601
|
|
308
|
+
yaml = event.to_yaml
|
|
309
|
+
# => ---
|
|
310
|
+
# => eventDate: '2024-12-25'
|
|
311
|
+
|
|
312
|
+
# Round-trip: XML → Object → JSON
|
|
313
|
+
event_from_xml = Event.from_xml(xml)
|
|
314
|
+
event_from_xml.to_json
|
|
315
|
+
# => {"eventDate":"25122024"}
|
|
316
|
+
|
|
317
|
+
# Round-trip: JSON → Object → XML
|
|
318
|
+
event_from_json = Event.from_json(json)
|
|
319
|
+
event_from_json.to_xml
|
|
320
|
+
# => <event><eventDate>20241225</eventDate></event>
|
|
321
|
+
|
|
322
|
+
# All preserve the same date
|
|
323
|
+
event_from_xml.event_date == event_from_json.event_date
|
|
324
|
+
# => true
|
|
325
|
+
----
|
|
326
|
+
====
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
=== Approach 2: Attribute-Level Transform Procs
|
|
330
|
+
|
|
331
|
+
==== Overview
|
|
332
|
+
|
|
333
|
+
Attribute-level transform procs apply the same transformation logic across all serialization formats, defined directly on the attribute.
|
|
334
|
+
|
|
335
|
+
==== Structure
|
|
336
|
+
|
|
337
|
+
[source,ruby]
|
|
338
|
+
----
|
|
339
|
+
class MyModel < Lutaml::Model::Serializable
|
|
340
|
+
attribute :attr_name, :type, transform: {
|
|
341
|
+
export: ->(value) {
|
|
342
|
+
# Transform model value before serialization
|
|
343
|
+
# Applied to ALL formats (XML, JSON, YAML, etc.)
|
|
344
|
+
},
|
|
345
|
+
import: ->(value) {
|
|
346
|
+
# Transform serialized value after deserialization
|
|
347
|
+
# Applied to ALL formats (XML, JSON, YAML, etc.)
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
end
|
|
351
|
+
----
|
|
352
|
+
|
|
353
|
+
==== When to Use
|
|
354
|
+
|
|
355
|
+
Use Attribute-Level Transform Procs when:
|
|
356
|
+
|
|
357
|
+
* ✅ Same transformation applies to ALL serialization formats
|
|
358
|
+
* ✅ Logic is simple and inline
|
|
359
|
+
* ✅ Specific to one attribute in one model
|
|
360
|
+
* ✅ No format-specific behavior needed
|
|
361
|
+
* ✅ Quick, non-reusable transformations
|
|
362
|
+
|
|
363
|
+
==== Transformation Flow
|
|
364
|
+
|
|
365
|
+
.Attribute-level transformation flow
|
|
366
|
+
[source]
|
|
367
|
+
----
|
|
368
|
+
Deserialization (Import):
|
|
369
|
+
Serialization Format Value (any format)
|
|
370
|
+
↓
|
|
371
|
+
Attribute Transform: import
|
|
372
|
+
↓
|
|
373
|
+
Model Attribute Value
|
|
374
|
+
|
|
375
|
+
Serialization (Export):
|
|
376
|
+
Model Attribute Value
|
|
377
|
+
↓
|
|
378
|
+
Attribute Transform: export
|
|
379
|
+
↓
|
|
380
|
+
Serialization Format Value (any format)
|
|
381
|
+
----
|
|
382
|
+
|
|
383
|
+
==== Example: Uniform Date Format
|
|
384
|
+
|
|
385
|
+
[source,ruby]
|
|
386
|
+
----
|
|
387
|
+
class Document < Lutaml::Model::Serializable
|
|
388
|
+
# Transform applies to ALL formats (XML, JSON, YAML)
|
|
389
|
+
attribute :publication_date, :date, transform: {
|
|
390
|
+
export: ->(date) {
|
|
391
|
+
# ALL formats will get YYYYMMDD string
|
|
392
|
+
date&.strftime("%Y%m%d")
|
|
393
|
+
},
|
|
394
|
+
import: ->(str) {
|
|
395
|
+
# Parse YYYYMMDD from ALL formats
|
|
396
|
+
return nil if str.nil? || str.empty?
|
|
397
|
+
year = str[0..3].to_i
|
|
398
|
+
month = str[4..5].to_i
|
|
399
|
+
day = str[6..7].to_i
|
|
400
|
+
Date.new(year, month, day)
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
xml do
|
|
405
|
+
root "document"
|
|
406
|
+
map_element "pubDate", to: :publication_date
|
|
407
|
+
end
|
|
408
|
+
|
|
409
|
+
json do
|
|
410
|
+
map "pubDate", to: :publication_date
|
|
411
|
+
end
|
|
412
|
+
end
|
|
413
|
+
----
|
|
414
|
+
|
|
415
|
+
.Usage demonstration
|
|
416
|
+
[example]
|
|
417
|
+
====
|
|
418
|
+
[source,ruby]
|
|
419
|
+
----
|
|
420
|
+
doc = Document.new(publication_date: Date.new(2024, 12, 25))
|
|
421
|
+
|
|
422
|
+
# All formats use the same transformation
|
|
423
|
+
doc.to_xml
|
|
424
|
+
# => <document><pubDate>20241225</pubDate></document>
|
|
425
|
+
|
|
426
|
+
doc.to_json
|
|
427
|
+
# => {"pubDate":"20241225"}
|
|
428
|
+
|
|
429
|
+
doc.to_yaml
|
|
430
|
+
# => ---
|
|
431
|
+
# => pubDate: '20241225'
|
|
432
|
+
----
|
|
433
|
+
====
|
|
434
|
+
|
|
435
|
+
|
|
436
|
+
=== Approach 3: Mapping-Level Transform Procs
|
|
437
|
+
|
|
438
|
+
==== Overview
|
|
439
|
+
|
|
440
|
+
Mapping-level transform procs apply format-specific transformation logic, defined within each serialization format's mapping block.
|
|
441
|
+
|
|
442
|
+
==== Structure
|
|
443
|
+
|
|
444
|
+
[source,ruby]
|
|
445
|
+
----
|
|
446
|
+
class MyModel < Lutaml::Model::Serializable
|
|
447
|
+
attribute :attr_name, :type
|
|
448
|
+
|
|
449
|
+
xml do
|
|
450
|
+
map_element "name", to: :attr_name, transform: {
|
|
451
|
+
export: ->(value) { xml_specific_export },
|
|
452
|
+
import: ->(value) { xml_specific_import }
|
|
453
|
+
}
|
|
454
|
+
end
|
|
455
|
+
|
|
456
|
+
json do
|
|
457
|
+
map "name", to: :attr_name, transform: {
|
|
458
|
+
export: ->(value) { json_specific_export },
|
|
459
|
+
import: ->(value) { json_specific_import }
|
|
460
|
+
}
|
|
461
|
+
end
|
|
462
|
+
end
|
|
463
|
+
----
|
|
464
|
+
|
|
465
|
+
==== When to Use
|
|
466
|
+
|
|
467
|
+
Use Mapping-Level Transform Procs when:
|
|
468
|
+
|
|
469
|
+
* ✅ Different transformation per serialization format
|
|
470
|
+
* ✅ Format-specific requirements exist
|
|
471
|
+
* ✅ One-off, non-reusable transformation
|
|
472
|
+
* ✅ Quick inline modification needed
|
|
473
|
+
* ✅ Combined with attribute-level transforms
|
|
474
|
+
|
|
475
|
+
==== Transformation Flow with Precedence
|
|
476
|
+
|
|
477
|
+
.Complete transformation flow showing precedence
|
|
478
|
+
[source]
|
|
479
|
+
----
|
|
480
|
+
Deserialization (Import):
|
|
481
|
+
Serialization Format Value
|
|
482
|
+
↓
|
|
483
|
+
Mapping Transform: import (if defined for this format)
|
|
484
|
+
↓
|
|
485
|
+
Attribute Transform: import (if defined)
|
|
486
|
+
↓
|
|
487
|
+
Model Attribute Value
|
|
488
|
+
|
|
489
|
+
Serialization (Export):
|
|
490
|
+
Model Attribute Value
|
|
491
|
+
↓
|
|
492
|
+
Attribute Transform: export (if defined)
|
|
493
|
+
↓
|
|
494
|
+
Mapping Transform: export (if defined for this format)
|
|
495
|
+
↓
|
|
496
|
+
Serialization Format Value
|
|
497
|
+
----
|
|
498
|
+
|
|
499
|
+
==== Example: Format-Specific Date Representations
|
|
500
|
+
|
|
501
|
+
[source,ruby]
|
|
502
|
+
----
|
|
503
|
+
class Document < Lutaml::Model::Serializable
|
|
504
|
+
attribute :publication_date, :date
|
|
505
|
+
|
|
506
|
+
# XML wants YYYYMMDD
|
|
507
|
+
xml do
|
|
508
|
+
root "document"
|
|
509
|
+
map_element "pubDate", to: :publication_date, transform: {
|
|
510
|
+
export: ->(date) { date&.strftime("%Y%m%d") },
|
|
511
|
+
import: ->(str) {
|
|
512
|
+
return nil if str.nil? || str.empty?
|
|
513
|
+
Date.new(str[0..3].to_i, str[4..5].to_i, str[6..7].to_i)
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
end
|
|
517
|
+
|
|
518
|
+
# JSON wants DDMMYYYY
|
|
519
|
+
json do
|
|
520
|
+
map "pubDate", to: :publication_date, transform: {
|
|
521
|
+
export: ->(date) { date&.strftime("%d%m%Y") },
|
|
522
|
+
import: ->(str) {
|
|
523
|
+
return nil if str.nil? || str.empty?
|
|
524
|
+
Date.new(str[4..7].to_i, str[2..3].to_i, str[0..1].to_i)
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
end
|
|
528
|
+
|
|
529
|
+
# YAML uses standard ISO8601 (no transform needed)
|
|
530
|
+
yaml do
|
|
531
|
+
map "pubDate", to: :publication_date
|
|
532
|
+
# Date type's default serialization is ISO8601
|
|
533
|
+
end
|
|
534
|
+
end
|
|
535
|
+
----
|
|
536
|
+
|
|
537
|
+
.Format-specific outputs
|
|
538
|
+
[example]
|
|
539
|
+
====
|
|
540
|
+
[source,ruby]
|
|
541
|
+
----
|
|
542
|
+
doc = Document.new(publication_date: Date.new(2024, 12, 25))
|
|
543
|
+
|
|
544
|
+
# Each format produces different string representation
|
|
545
|
+
doc.to_xml
|
|
546
|
+
# => <document><pubDate>20241225</pubDate></document>
|
|
547
|
+
|
|
548
|
+
doc.to_json
|
|
549
|
+
# => {"pubDate":"25122024"}
|
|
550
|
+
|
|
551
|
+
doc.to_yaml
|
|
552
|
+
# => ---
|
|
553
|
+
# => pubDate: '2024-12-25'
|
|
554
|
+
|
|
555
|
+
# But all parse back to the same Date object
|
|
556
|
+
Document.from_xml(doc.to_xml).publication_date
|
|
557
|
+
# => #<Date: 2024-12-25>
|
|
558
|
+
|
|
559
|
+
Document.from_json(doc.to_json).publication_date
|
|
560
|
+
# => #<Date: 2024-12-25>
|
|
561
|
+
|
|
562
|
+
Document.from_yaml(doc.to_yaml).publication_date
|
|
563
|
+
# => #<Date: 2024-12-25>
|
|
564
|
+
----
|
|
565
|
+
====
|
|
566
|
+
|
|
567
|
+
|
|
568
|
+
== Decision Guide
|
|
569
|
+
|
|
570
|
+
=== Decision Matrix
|
|
571
|
+
|
|
572
|
+
The following matrix helps you choose the appropriate transformation approach:
|
|
573
|
+
|
|
574
|
+
.Value Transformation Decision Matrix
|
|
575
|
+
[cols="2,2,1,1,1"]
|
|
576
|
+
|===
|
|
577
|
+
| Scenario | Best Approach | Bidirectional? | Format-Specific? | Reusable?
|
|
578
|
+
|
|
579
|
+
| Date: YYYYMMDD ↔ DDMMYYYY across formats
|
|
580
|
+
| Custom Value Type
|
|
581
|
+
| ✓ Yes
|
|
582
|
+
| ✓ Yes
|
|
583
|
+
| ✓ Yes
|
|
584
|
+
|
|
585
|
+
| Date: YYYYMMDD → YYYYWWDD (week calculation)
|
|
586
|
+
| Custom Value Type
|
|
587
|
+
| ✓ Yes*
|
|
588
|
+
| ✓ Yes
|
|
589
|
+
| ✓ Yes
|
|
590
|
+
|
|
591
|
+
| Always uppercase, all formats
|
|
592
|
+
| Attribute Transform
|
|
593
|
+
| ✓ Yes
|
|
594
|
+
| ✗ No
|
|
595
|
+
| ✗ No
|
|
596
|
+
|
|
597
|
+
| Prefix differs by format (JSON: "Dr.", XML: "Prof.")
|
|
598
|
+
| Mapping Transform
|
|
599
|
+
| ✓ Yes
|
|
600
|
+
| ✓ Yes
|
|
601
|
+
| ✗ No
|
|
602
|
+
|
|
603
|
+
| Temperature unit conversion
|
|
604
|
+
| Custom Value Type
|
|
605
|
+
| ✓ Yes
|
|
606
|
+
| Maybe
|
|
607
|
+
| ✓ Yes
|
|
608
|
+
|
|
609
|
+
| API-specific field formatting
|
|
610
|
+
| Mapping Transform
|
|
611
|
+
| ✓ Yes
|
|
612
|
+
| ✓ Yes
|
|
613
|
+
| ✗ No
|
|
614
|
+
|
|
615
|
+
| Normalization (trim, lowercase)
|
|
616
|
+
| Attribute Transform
|
|
617
|
+
| ✓ Yes
|
|
618
|
+
| ✗ No
|
|
619
|
+
| ✗ No
|
|
620
|
+
|
|
621
|
+
|===
|
|
622
|
+
|
|
623
|
+
*Bidirectional if reverse calculation is possible (e.g., week date can be converted back to calendar date)
|
|
624
|
+
|
|
625
|
+
=== Comparison Table
|
|
626
|
+
|
|
627
|
+
.Detailed comparison of transformation approaches
|
|
628
|
+
[cols="2a,3a,3a,3a"]
|
|
629
|
+
|===
|
|
630
|
+
| Feature | Custom Value Type | Attribute Transform | Mapping Transform
|
|
631
|
+
|
|
632
|
+
| **Scope**
|
|
633
|
+
| Reusable across models
|
|
634
|
+
| Single attribute
|
|
635
|
+
| Single attribute in one format
|
|
636
|
+
|
|
637
|
+
| **Format Support**
|
|
638
|
+
| Per-format methods
|
|
639
|
+
(`to_xml`, `from_json`, etc.)
|
|
640
|
+
| All formats uniformly
|
|
641
|
+
| Per format individually
|
|
642
|
+
|
|
643
|
+
| **Complexity**
|
|
644
|
+
| Can be complex
|
|
645
|
+
(full class definition)
|
|
646
|
+
| Simple inline procs
|
|
647
|
+
| Simple inline procs
|
|
648
|
+
|
|
649
|
+
| **Testability**
|
|
650
|
+
| Easy (unit testable)
|
|
651
|
+
| Medium (integration tests)
|
|
652
|
+
| Medium (integration tests)
|
|
653
|
+
|
|
654
|
+
| **Bidirectionality**
|
|
655
|
+
| Full bidirectional support
|
|
656
|
+
| Bidirectional via import/export
|
|
657
|
+
| Bidirectional via import/export
|
|
658
|
+
|
|
659
|
+
| **Type Safety**
|
|
660
|
+
| High (dedicated class)
|
|
661
|
+
| Medium (proc validation)
|
|
662
|
+
| Medium (proc validation)
|
|
663
|
+
|
|
664
|
+
| **Performance**
|
|
665
|
+
| Optimal (compiled methods)
|
|
666
|
+
| Good (proc calls)
|
|
667
|
+
| Good (proc calls)
|
|
668
|
+
|
|
669
|
+
| **Best For**
|
|
670
|
+
| Complex, reusable logic
|
|
671
|
+
| Simple, uniform transforms
|
|
672
|
+
| Format-specific transforms
|
|
673
|
+
|
|
674
|
+
|===
|
|
675
|
+
|
|
676
|
+
=== Selection Flowchart
|
|
677
|
+
|
|
678
|
+
[source]
|
|
679
|
+
----
|
|
680
|
+
Need Value Transformation?
|
|
681
|
+
│
|
|
682
|
+
▼
|
|
683
|
+
┌───────────────────────┐
|
|
684
|
+
│ Will logic be reused │
|
|
685
|
+
│ across models? │
|
|
686
|
+
└───────────────────────┘
|
|
687
|
+
│ │
|
|
688
|
+
YES │ │ NO
|
|
689
|
+
▼ ▼
|
|
690
|
+
┌──────────────────┐ ┌──────────────────┐
|
|
691
|
+
│ Format-specific │ │ Same across all │
|
|
692
|
+
│ serialization │ │ formats? │
|
|
693
|
+
│ needed? │ └──────────────────┘
|
|
694
|
+
└──────────────────┘ │ │
|
|
695
|
+
│ │ YES │ │ NO
|
|
696
|
+
YES │ │ NO ▼ ▼
|
|
697
|
+
▼ ▼ ┌─────────┐ ┌────────────┐
|
|
698
|
+
┌──────────────┐ ┌──────┐ │Attribute│ │ Mapping │
|
|
699
|
+
│ Custom Value │ │Custom│ │Transform│ │ Transform │
|
|
700
|
+
│ Type │ │Value │ │ │ │ (per fmt) │
|
|
701
|
+
│ │ │Type* │ │ │ │ │
|
|
702
|
+
└──────────────┘ └──────┘ └─────────┘ └────────────┘
|
|
703
|
+
✓ ✓ ✓ ✓
|
|
704
|
+
Bidirectional Maybe just Uniform Format-
|
|
705
|
+
format-aware attribute across all specific
|
|
706
|
+
reusable transform formats one-off
|
|
707
|
+
|
|
708
|
+
*Custom Value Type can still be used even without format-specific needs
|
|
709
|
+
for better encapsulation and reusability
|
|
710
|
+
----
|
|
711
|
+
|
|
712
|
+
|
|
713
|
+
== Advanced Patterns
|
|
714
|
+
|
|
715
|
+
=== Combining Transformation Approaches
|
|
716
|
+
|
|
717
|
+
You can combine attribute-level and mapping-level transforms for sophisticated transformations.
|
|
718
|
+
|
|
719
|
+
==== Transformation Precedence
|
|
720
|
+
|
|
721
|
+
When both attribute and mapping transforms are defined, they are applied in sequence:
|
|
722
|
+
|
|
723
|
+
**Deserialization Order:**
|
|
724
|
+
1. Mapping transform (format-specific)
|
|
725
|
+
2. Attribute transform (format-independent)
|
|
726
|
+
|
|
727
|
+
**Serialization Order:**
|
|
728
|
+
1. Attribute transform (format-independent)
|
|
729
|
+
2. Mapping transform (format-specific)
|
|
730
|
+
|
|
731
|
+
.Combined transformation example
|
|
732
|
+
[example]
|
|
733
|
+
====
|
|
734
|
+
[source,ruby]
|
|
735
|
+
----
|
|
736
|
+
class Product < Lutaml::Model::Serializable
|
|
737
|
+
# Attribute-level: Always capitalize
|
|
738
|
+
attribute :name, :string, transform: {
|
|
739
|
+
export: ->(value) { value.to_s.capitalize },
|
|
740
|
+
import: ->(value) { value.to_s.downcase }
|
|
741
|
+
}
|
|
742
|
+
|
|
743
|
+
# Mapping-level: Add format-specific prefixes
|
|
744
|
+
json do
|
|
745
|
+
map "productName", to: :name, transform: {
|
|
746
|
+
export: ->(value) { "JSON:#{value}" },
|
|
747
|
+
import: ->(value) { value.gsub("JSON:", "") }
|
|
748
|
+
}
|
|
749
|
+
end
|
|
750
|
+
|
|
751
|
+
xml do
|
|
752
|
+
root "product"
|
|
753
|
+
map_element "name", to: :name, transform: {
|
|
754
|
+
export: ->(value) { "XML:#{value}" },
|
|
755
|
+
import: ->(value) { value.gsub("XML:", "") }
|
|
756
|
+
}
|
|
757
|
+
end
|
|
758
|
+
end
|
|
759
|
+
|
|
760
|
+
product = Product.new(name: "laptop")
|
|
761
|
+
|
|
762
|
+
# Serialization flow:
|
|
763
|
+
# 1. Internal: "laptop"
|
|
764
|
+
# 2. Attribute export: "Laptop" (capitalize)
|
|
765
|
+
# 3. Mapping export: "JSON:Laptop" (add prefix)
|
|
766
|
+
product.to_json
|
|
767
|
+
# => {"productName":"JSON:Laptop"}
|
|
768
|
+
|
|
769
|
+
# 4. Mapping export: "XML:Laptop" (add prefix)
|
|
770
|
+
product.to_xml
|
|
771
|
+
# => <product><name>XML:Laptop</name></product>
|
|
772
|
+
|
|
773
|
+
# Deserialization flow for JSON:
|
|
774
|
+
# Input: {"productName":"JSON:LAPTOP"}
|
|
775
|
+
# 1. Mapping import: "LAPTOP" (remove "JSON:")
|
|
776
|
+
# 2. Attribute import: "laptop" (downcase)
|
|
777
|
+
Product.from_json('{"productName":"JSON:LAPTOP"}').name
|
|
778
|
+
# => "laptop"
|
|
779
|
+
----
|
|
780
|
+
====
|
|
781
|
+
|
|
782
|
+
|
|
783
|
+
=== Cross-Format Consistency
|
|
784
|
+
|
|
785
|
+
When designing transformations, consider how values should behave across different formats.
|
|
786
|
+
|
|
787
|
+
==== Strategy 1: Internal Canonical Form
|
|
788
|
+
|
|
789
|
+
Maintain a canonical internal representation, transform on serialization/deserialization.
|
|
790
|
+
|
|
791
|
+
[source,ruby]
|
|
792
|
+
----
|
|
793
|
+
# Internal: Always Date object
|
|
794
|
+
# External: Format-specific strings
|
|
795
|
+
class PortableDate < Lutaml::Model::Type::Date
|
|
796
|
+
# Each format has its own representation
|
|
797
|
+
def to_xml
|
|
798
|
+
value&.strftime("%Y%m%d") # YYYYMMDD
|
|
799
|
+
end
|
|
800
|
+
|
|
801
|
+
def to_json
|
|
802
|
+
value&.strftime("%d/%m/%Y") # DD/MM/YYYY
|
|
803
|
+
end
|
|
804
|
+
|
|
805
|
+
def to_yaml
|
|
806
|
+
value&.iso8601 # ISO8601
|
|
807
|
+
end
|
|
808
|
+
end
|
|
809
|
+
----
|
|
810
|
+
|
|
811
|
+
==== Strategy 2: Format Adaptation
|
|
812
|
+
|
|
813
|
+
Adapt to external format requirements while maintaining internal consistency.
|
|
814
|
+
|
|
815
|
+
[source,ruby]
|
|
816
|
+
----
|
|
817
|
+
class APIDate < Lutaml::Model::Serializable
|
|
818
|
+
attribute :date, :date
|
|
819
|
+
|
|
820
|
+
# External API expects ISO8601 in JSON
|
|
821
|
+
json do
|
|
822
|
+
map "apiDate", to: :date
|
|
823
|
+
# Uses Date's default ISO8601 serialization
|
|
824
|
+
end
|
|
825
|
+
|
|
826
|
+
# Internal XML uses compact format
|
|
827
|
+
xml do
|
|
828
|
+
map_element "date", to: :date, transform: {
|
|
829
|
+
export: ->(date) { date&.strftime("%Y%m%d") },
|
|
830
|
+
import: ->(str) {
|
|
831
|
+
Date.new(str[0..3].to_i, str[4..5].to_i, str[6..7].to_i)
|
|
832
|
+
}
|
|
833
|
+
}
|
|
834
|
+
end
|
|
835
|
+
end
|
|
836
|
+
----
|
|
837
|
+
|
|
838
|
+
|
|
839
|
+
== Complete Examples
|
|
840
|
+
|
|
841
|
+
=== Example 1: Bidirectional Date Format Conversion
|
|
842
|
+
|
|
843
|
+
This example demonstrates converting between YYYYMMDD and DDMMYYYY formats with full bidirectional support.
|
|
844
|
+
|
|
845
|
+
[source,ruby]
|
|
846
|
+
----
|
|
847
|
+
# Custom Value Type approach (RECOMMENDED for reusability)
|
|
848
|
+
class FlexibleDateFormat < Lutaml::Model::Type::Date
|
|
849
|
+
# XML uses YYYYMMDD (Year-Month-Day)
|
|
850
|
+
def self.from_xml(value)
|
|
851
|
+
return nil if value.nil? || value.empty?
|
|
852
|
+
|
|
853
|
+
year = value[0..3].to_i
|
|
854
|
+
month = value[4..5].to_i
|
|
855
|
+
day = value[6..7].to_i
|
|
856
|
+
|
|
857
|
+
::Date.new(year, month, day)
|
|
858
|
+
rescue ArgumentError => e
|
|
859
|
+
raise Lutaml::Model::InvalidValueError,
|
|
860
|
+
"Invalid YYYYMMDD date format: #{value} (#{e.message})"
|
|
861
|
+
end
|
|
862
|
+
|
|
863
|
+
def to_xml
|
|
864
|
+
value&.strftime("%Y%m%d")
|
|
865
|
+
end
|
|
866
|
+
|
|
867
|
+
# JSON uses DDMMYYYY (Day-Month-Year)
|
|
868
|
+
def self.from_json(value)
|
|
869
|
+
return nil if value.nil? || value.empty?
|
|
870
|
+
|
|
871
|
+
day = value[0..1].to_i
|
|
872
|
+
month = value[2..3].to_i
|
|
873
|
+
year = value[4..7].to_i
|
|
874
|
+
|
|
875
|
+
::Date.new(year, month, day)
|
|
876
|
+
rescue ArgumentError => e
|
|
877
|
+
raise Lutaml::Model::InvalidValueError,
|
|
878
|
+
"Invalid DDMMYYYY date format: #{value} (#{e.message})"
|
|
879
|
+
end
|
|
880
|
+
|
|
881
|
+
def to_json
|
|
882
|
+
value&.strftime("%d%m%Y")
|
|
883
|
+
end
|
|
884
|
+
|
|
885
|
+
# YAML uses ISO8601 (standard)
|
|
886
|
+
def self.from_yaml(value)
|
|
887
|
+
::Date.parse(value.to_s)
|
|
888
|
+
end
|
|
889
|
+
|
|
890
|
+
def to_yaml
|
|
891
|
+
value&.iso8601
|
|
892
|
+
end
|
|
893
|
+
end
|
|
894
|
+
|
|
895
|
+
# Usage in a model
|
|
896
|
+
class Event < Lutaml::Model::Serializable
|
|
897
|
+
attribute :event_date, FlexibleDateFormat
|
|
898
|
+
attribute :name, :string
|
|
899
|
+
|
|
900
|
+
xml do
|
|
901
|
+
root "event"
|
|
902
|
+
map_element "eventDate", to: :event_date
|
|
903
|
+
map_element "name", to: :name
|
|
904
|
+
end
|
|
905
|
+
|
|
906
|
+
json do
|
|
907
|
+
map "eventDate", to: :event_date
|
|
908
|
+
map "name", to: :name
|
|
909
|
+
end
|
|
910
|
+
|
|
911
|
+
yaml do
|
|
912
|
+
map "eventDate", to: :event_date
|
|
913
|
+
map "name", to: :name
|
|
914
|
+
end
|
|
915
|
+
end
|
|
916
|
+
----
|
|
917
|
+
|
|
918
|
+
.Complete bidirectional demonstration
|
|
919
|
+
[example]
|
|
920
|
+
====
|
|
921
|
+
[source,ruby]
|
|
922
|
+
----
|
|
923
|
+
# Create event
|
|
924
|
+
event = Event.new(
|
|
925
|
+
event_date: Date.new(2024, 12, 25),
|
|
926
|
+
name: "Christmas"
|
|
927
|
+
)
|
|
928
|
+
|
|
929
|
+
# Serialize to different formats
|
|
930
|
+
xml = event.to_xml
|
|
931
|
+
# => <event><eventDate>20241225</eventDate><name>Christmas</name></event>
|
|
932
|
+
|
|
933
|
+
json = event.to_json
|
|
934
|
+
# => {"eventDate":"25122024","name":"Christmas"}
|
|
935
|
+
|
|
936
|
+
yaml = event.to_yaml
|
|
937
|
+
# => ---
|
|
938
|
+
# => eventDate: '2024-12-25'
|
|
939
|
+
# => name: Christmas
|
|
940
|
+
|
|
941
|
+
# Deserialize from each format
|
|
942
|
+
event_from_xml = Event.from_xml(xml)
|
|
943
|
+
event_from_xml.event_date
|
|
944
|
+
# => #<Date: 2024-12-25>
|
|
945
|
+
|
|
946
|
+
event_from_json = Event.from_json(json)
|
|
947
|
+
event_from_json.event_date
|
|
948
|
+
# => #<Date: 2024-12-25>
|
|
949
|
+
|
|
950
|
+
event_from_yaml = Event.from_yaml(yaml)
|
|
951
|
+
event_from_yaml.event_date
|
|
952
|
+
# => #<Date: 2024-12-25>
|
|
953
|
+
|
|
954
|
+
# Cross-format round-trip
|
|
955
|
+
Event.from_xml(event.to_xml).to_json
|
|
956
|
+
# => {"eventDate":"25122024","name":"Christmas"}
|
|
957
|
+
|
|
958
|
+
Event.from_json(event.to_json).to_xml
|
|
959
|
+
# => <event><eventDate>20241225</eventDate><name>Christmas</name></event>
|
|
960
|
+
|
|
961
|
+
# All maintain data integrity
|
|
962
|
+
event_from_xml == event_from_json
|
|
963
|
+
# => true
|
|
964
|
+
----
|
|
965
|
+
====
|
|
966
|
+
|
|
967
|
+
|
|
968
|
+
=== Example 2: Calculated Transformation (Week-Based Dates)
|
|
969
|
+
|
|
970
|
+
This example shows transforming calendar dates to ISO week dates, which requires calculation.
|
|
971
|
+
|
|
972
|
+
[source,ruby]
|
|
973
|
+
----
|
|
974
|
+
# Transforms between calendar dates and ISO week dates
|
|
975
|
+
class ISOWeekDate < Lutaml::Model::Type::Date
|
|
976
|
+
# Parse standard YYYYMMDD calendar date
|
|
977
|
+
def self.from_xml(value)
|
|
978
|
+
return nil if value.nil? || value.empty?
|
|
979
|
+
|
|
980
|
+
year = value[0..3].to_i
|
|
981
|
+
month = value[4..5].to_i
|
|
982
|
+
day = value[6..7].to_i
|
|
983
|
+
|
|
984
|
+
::Date.new(year, month, day)
|
|
985
|
+
rescue ArgumentError => e
|
|
986
|
+
raise Lutaml::Model::InvalidValueError,
|
|
987
|
+
"Invalid calendar date: #{value} (#{e.message})"
|
|
988
|
+
end
|
|
989
|
+
|
|
990
|
+
# Serialize to YYYYWWDD format
|
|
991
|
+
# YYYY: ISO year (may differ from calendar year near year boundaries)
|
|
992
|
+
# WW: ISO week number (01-53)
|
|
993
|
+
# DD: Day of week (1=Monday, 7=Sunday)
|
|
994
|
+
def to_xml
|
|
995
|
+
return nil unless value
|
|
996
|
+
|
|
997
|
+
# ISO 8601 week date components
|
|
998
|
+
year = value.cwyear # Commercial (ISO) year
|
|
999
|
+
week = value.cweek.to_s.rjust(2, '0') # Week number with leading zero
|
|
1000
|
+
day = value.cwday # Day of week (1-7)
|
|
1001
|
+
|
|
1002
|
+
"#{year}#{week}#{day}"
|
|
1003
|
+
end
|
|
1004
|
+
|
|
1005
|
+
# Parse YYYYWWDD week date format back to calendar date
|
|
1006
|
+
def self.from_json(value)
|
|
1007
|
+
return nil if value.nil? || value.empty?
|
|
1008
|
+
|
|
1009
|
+
year = value[0..3].to_i
|
|
1010
|
+
week = value[4..5].to_i
|
|
1011
|
+
day = value[6].to_i
|
|
1012
|
+
|
|
1013
|
+
# Date.commercial creates date from ISO week-date
|
|
1014
|
+
::Date.commercial(year, week, day)
|
|
1015
|
+
rescue ArgumentError => e
|
|
1016
|
+
raise Lutaml::Model::InvalidValueError,
|
|
1017
|
+
"Invalid week date: #{value} (#{e.message})"
|
|
1018
|
+
end
|
|
1019
|
+
|
|
1020
|
+
# Output same week format
|
|
1021
|
+
def to_json
|
|
1022
|
+
to_xml
|
|
1023
|
+
end
|
|
1024
|
+
end
|
|
1025
|
+
|
|
1026
|
+
# Usage in a schedule model
|
|
1027
|
+
class Schedule < Lutaml::Model::Serializable
|
|
1028
|
+
attribute :week_date, ISOWeekDate
|
|
1029
|
+
attribute :activity, :string
|
|
1030
|
+
|
|
1031
|
+
xml do
|
|
1032
|
+
root "schedule"
|
|
1033
|
+
map_element "date", to: :week_date
|
|
1034
|
+
map_element "activity", to: :activity
|
|
1035
|
+
end
|
|
1036
|
+
|
|
1037
|
+
json do
|
|
1038
|
+
map "weekDate", to: :week_date
|
|
1039
|
+
map "activity", to: :activity
|
|
1040
|
+
end
|
|
1041
|
+
end
|
|
1042
|
+
----
|
|
1043
|
+
|
|
1044
|
+
.Week date calculation demonstration
|
|
1045
|
+
[example]
|
|
1046
|
+
====
|
|
1047
|
+
[source,ruby]
|
|
1048
|
+
----
|
|
1049
|
+
# Create schedule with calendar date
|
|
1050
|
+
schedule = Schedule.new(
|
|
1051
|
+
week_date: Date.new(2024, 12, 25), # Wednesday
|
|
1052
|
+
activity: "Team Meeting"
|
|
1053
|
+
)
|
|
1054
|
+
|
|
1055
|
+
# Serializes to week format: YYYYWWDD
|
|
1056
|
+
xml = schedule.to_xml
|
|
1057
|
+
# => <schedule>
|
|
1058
|
+
# <date>20245203</date>
|
|
1059
|
+
# <activity>Team Meeting</activity>
|
|
1060
|
+
# </schedule>
|
|
1061
|
+
|
|
1062
|
+
# Parse the week date components:
|
|
1063
|
+
# 2024: Year 2024
|
|
1064
|
+
# 52: Week 52 of the year
|
|
1065
|
+
# 03: Day 3 (Wednesday, where Monday=1)
|
|
1066
|
+
|
|
1067
|
+
# Deserialize and verify
|
|
1068
|
+
parsed = Schedule.from_xml(xml)
|
|
1069
|
+
parsed.week_date
|
|
1070
|
+
# => #<Date: 2024-12-25>
|
|
1071
|
+
|
|
1072
|
+
# Round-trip maintains the date
|
|
1073
|
+
parsed.week_date == schedule.week_date
|
|
1074
|
+
# => true
|
|
1075
|
+
|
|
1076
|
+
# Edge case: Date near year boundary
|
|
1077
|
+
new_year = Schedule.new(week_date: Date.new(2024, 12, 30)) # Monday
|
|
1078
|
+
new_year.to_xml
|
|
1079
|
+
# => <schedule>
|
|
1080
|
+
# <date>20240101</date>
|
|
1081
|
+
# <activity></activity>
|
|
1082
|
+
# </schedule>
|
|
1083
|
+
|
|
1084
|
+
# Note: 2024-12-30 is in ISO week 2024-W01
|
|
1085
|
+
# (ISO year 2024, week 1, because it's the first Monday of 2025's first week)
|
|
1086
|
+
----
|
|
1087
|
+
====
|
|
1088
|
+
|
|
1089
|
+
|
|
1090
|
+
=== Example 3: Using Transform Procs for Date Transformations
|
|
1091
|
+
|
|
1092
|
+
This example shows the transform proc approach for simpler scenarios.
|
|
1093
|
+
|
|
1094
|
+
[source,ruby]
|
|
1095
|
+
----
|
|
1096
|
+
# Mapping Transform approach (for format-specific, non-reusable)
|
|
1097
|
+
class BlogPost < Lutaml::Model::Serializable
|
|
1098
|
+
attribute :published_on, :date
|
|
1099
|
+
attribute :title, :string
|
|
1100
|
+
|
|
1101
|
+
# XML API requires YYYYMMDD
|
|
1102
|
+
xml do
|
|
1103
|
+
root "post"
|
|
1104
|
+
map_element "publishDate", to: :published_on, transform: {
|
|
1105
|
+
export: ->(date) { date&.strftime("%Y%m%d") },
|
|
1106
|
+
import: ->(str) {
|
|
1107
|
+
return nil if str.nil? || str.empty?
|
|
1108
|
+
Date.new(str[0..3].to_i, str[4..5].to_i, str[6..7].to_i)
|
|
1109
|
+
}
|
|
1110
|
+
}
|
|
1111
|
+
map_element "title", to: :title
|
|
1112
|
+
end
|
|
1113
|
+
|
|
1114
|
+
# JSON API requires DD-MM-YYYY
|
|
1115
|
+
json do
|
|
1116
|
+
map "publishDate", to: :published_on, transform: {
|
|
1117
|
+
export: ->(date) { date&.strftime("%d-%m-%Y") },
|
|
1118
|
+
import: ->(str) {
|
|
1119
|
+
return nil if str.nil? || str.empty?
|
|
1120
|
+
parts = str.split("-")
|
|
1121
|
+
Date.new(parts[2].to_i, parts[1].to_i, parts[0].to_i)
|
|
1122
|
+
}
|
|
1123
|
+
}
|
|
1124
|
+
map "title", to: :title
|
|
1125
|
+
end
|
|
1126
|
+
|
|
1127
|
+
# Internal YAML uses ISO8601 (no transform)
|
|
1128
|
+
yaml do
|
|
1129
|
+
map "publishDate", to: :published_on
|
|
1130
|
+
map "title", to: :title
|
|
1131
|
+
end
|
|
1132
|
+
end
|
|
1133
|
+
----
|
|
1134
|
+
|
|
1135
|
+
.Transform proc usage
|
|
1136
|
+
[example]
|
|
1137
|
+
====
|
|
1138
|
+
[source,ruby]
|
|
1139
|
+
----
|
|
1140
|
+
post = BlogPost.new(
|
|
1141
|
+
published_on: Date.new(2024, 12, 25),
|
|
1142
|
+
title: "Holiday Special"
|
|
1143
|
+
)
|
|
1144
|
+
|
|
1145
|
+
# Each format gets appropriate representation
|
|
1146
|
+
post.to_xml
|
|
1147
|
+
# => <post>
|
|
1148
|
+
# <publishDate>20241225</publishDate>
|
|
1149
|
+
# <title>Holiday Special</title>
|
|
1150
|
+
# </post>
|
|
1151
|
+
|
|
1152
|
+
post.to_json
|
|
1153
|
+
# => {"publishDate":"25-12-2024","title":"Holiday Special"}
|
|
1154
|
+
|
|
1155
|
+
post.to_yaml
|
|
1156
|
+
# => ---
|
|
1157
|
+
# => publishDate: '2024-12-25'
|
|
1158
|
+
# => title: Holiday Special
|
|
1159
|
+
|
|
1160
|
+
# All deserialize correctly
|
|
1161
|
+
BlogPost.from_xml(post.to_xml).published_on
|
|
1162
|
+
# => #<Date: 2024-12-25>
|
|
1163
|
+
|
|
1164
|
+
BlogPost.from_json(post.to_json).published_on
|
|
1165
|
+
# => #<Date: 2024-12-25>
|
|
1166
|
+
----
|
|
1167
|
+
====
|
|
1168
|
+
|
|
1169
|
+
|
|
1170
|
+
== Best Practices
|
|
1171
|
+
|
|
1172
|
+
=== Design Principles
|
|
1173
|
+
|
|
1174
|
+
1. **Value Transformation Principle**
|
|
1175
|
+
+
|
|
1176
|
+
When a value needs to be transformed (not just mapped), use transformations. Mapping is for structural reorganization, transformation is for computational conversion.
|
|
1177
|
+
|
|
1178
|
+
2. **Bidirectionality Principle**
|
|
1179
|
+
+
|
|
1180
|
+
Always implement both `import` and `export` (or `from_*` and `to_*`) unless the transformation is genuinely one-way.
|
|
1181
|
+
|
|
1182
|
+
3. **Format Awareness Principle**
|
|
1183
|
+
+
|
|
1184
|
+
Consider whether different serialization formats need different representations. If yes, use Custom Value Types or Mapping Transforms.
|
|
1185
|
+
|
|
1186
|
+
4. **Reusability Principle**
|
|
1187
|
+
+
|
|
1188
|
+
If the logic will be used in multiple places, encapsulate it in a Custom Value Type class.
|
|
1189
|
+
|
|
1190
|
+
5. **Clarity Principle**
|
|
1191
|
+
+
|
|
1192
|
+
Choose the approach that makes the transformation logic most clear and maintainable.
|
|
1193
|
+
|
|
1194
|
+
=== Common Patterns
|
|
1195
|
+
|
|
1196
|
+
==== Pattern: Date Format Adapter
|
|
1197
|
+
|
|
1198
|
+
When working with external systems that require specific date formats:
|
|
1199
|
+
|
|
1200
|
+
[source,ruby]
|
|
1201
|
+
----
|
|
1202
|
+
# Create a custom type for the external system's format
|
|
1203
|
+
class LegacySystemDate < Lutaml::Model::Type::Date
|
|
1204
|
+
# Legacy system uses MMDDYYYY
|
|
1205
|
+
def self.from_xml(value)
|
|
1206
|
+
return nil if value.nil? || value.empty?
|
|
1207
|
+
month = value[0..1].to_i
|
|
1208
|
+
day = value[2..3].to_i
|
|
1209
|
+
year = value[4..7].to_i
|
|
1210
|
+
::Date.new(year, month, day)
|
|
1211
|
+
end
|
|
1212
|
+
|
|
1213
|
+
def to_xml
|
|
1214
|
+
value&.strftime("%m%d%Y")
|
|
1215
|
+
end
|
|
1216
|
+
end
|
|
1217
|
+
----
|
|
1218
|
+
|
|
1219
|
+
==== Pattern: Calculated Derived Values
|
|
1220
|
+
|
|
1221
|
+
When values are calculated from dates:
|
|
1222
|
+
|
|
1223
|
+
[source,ruby]
|
|
1224
|
+
----
|
|
1225
|
+
class FiscalWeek < Lutaml::Model::Type::Integer
|
|
1226
|
+
# Assumes fiscal year starts April 1
|
|
1227
|
+
def self.from_xml(date_string)
|
|
1228
|
+
date = Date.parse(date_string)
|
|
1229
|
+
fiscal_year_start = Date.new(
|
|
1230
|
+
date.month >= 4 ? date.year : date.year - 1,
|
|
1231
|
+
4,
|
|
1232
|
+
1
|
|
1233
|
+
)
|
|
1234
|
+
((date - fiscal_year_start) / 7).to_i + 1
|
|
1235
|
+
end
|
|
1236
|
+
|
|
1237
|
+
def to_xml
|
|
1238
|
+
# Just output the week number
|
|
1239
|
+
value.to_s
|
|
1240
|
+
end
|
|
1241
|
+
end
|
|
1242
|
+
----
|
|
1243
|
+
|
|
1244
|
+
==== Pattern: Multi-Stage Transformation
|
|
1245
|
+
|
|
1246
|
+
Complex transformations can be broken into stages:
|
|
1247
|
+
|
|
1248
|
+
[source,ruby]
|
|
1249
|
+
----
|
|
1250
|
+
class ComplexDate < Lutaml::Model::Type::Date
|
|
1251
|
+
def self.from_xml(value)
|
|
1252
|
+
# Stage 1: Parse format
|
|
1253
|
+
parsed = parse_custom_format(value)
|
|
1254
|
+
# Stage 2: Validate
|
|
1255
|
+
validate_date_range!(parsed)
|
|
1256
|
+
# Stage 3: Adjust (e.g., timezone)
|
|
1257
|
+
adjust_timezone(parsed)
|
|
1258
|
+
end
|
|
1259
|
+
|
|
1260
|
+
private
|
|
1261
|
+
|
|
1262
|
+
def self.parse_custom_format(value)
|
|
1263
|
+
# Parsing logic
|
|
1264
|
+
end
|
|
1265
|
+
|
|
1266
|
+
def self.validate_date_range!(date)
|
|
1267
|
+
# Validation logic
|
|
1268
|
+
end
|
|
1269
|
+
|
|
1270
|
+
def self.adjust_timezone(date)
|
|
1271
|
+
# Timezone logic
|
|
1272
|
+
end
|
|
1273
|
+
end
|
|
1274
|
+
----
|
|
1275
|
+
|
|
1276
|
+
=== Performance Considerations
|
|
1277
|
+
|
|
1278
|
+
1. **Custom Value Types** are more performant for reused logic (compiled methods vs repeated proc calls)
|
|
1279
|
+
|
|
1280
|
+
2. **Transform Procs** are fine for simple, infrequent transformations
|
|
1281
|
+
|
|
1282
|
+
3. **Avoid excessive chaining** of transforms; consolidate logic when possible
|
|
1283
|
+
|
|
1284
|
+
4. **Cache expensive calculations** within custom type methods if needed
|
|
1285
|
+
|
|
1286
|
+
|
|
1287
|
+
== Migration Guide
|
|
1288
|
+
|
|
1289
|
+
=== From Transform Procs to Custom Value Types
|
|
1290
|
+
|
|
1291
|
+
If you find yourself repeating the same transform logic across multiple attributes:
|
|
1292
|
+
|
|
1293
|
+
.Before (repetitive)
|
|
1294
|
+
[source,ruby]
|
|
1295
|
+
----
|
|
1296
|
+
class Model1 < Lutaml::Model::Serializable
|
|
1297
|
+
attribute :date1, :date, transform: {
|
|
1298
|
+
export: ->(d) { d&.strftime("%Y%m%d") },
|
|
1299
|
+
import: ->(s) { Date.new(s[0..3].to_i, s[4..5].to_i, s[6..7].to_i) }
|
|
1300
|
+
}
|
|
1301
|
+
end
|
|
1302
|
+
|
|
1303
|
+
class Model2 < Lutaml::Model::Serializable
|
|
1304
|
+
attribute :date2, :date, transform: {
|
|
1305
|
+
export: ->(d) { d&.strftime("%Y%m%d") },
|
|
1306
|
+
import: ->(s) { Date.new(s[0..3].to_i, s[4..5].to_i, s[6..7].to_i) }
|
|
1307
|
+
}
|
|
1308
|
+
end
|
|
1309
|
+
----
|
|
1310
|
+
|
|
1311
|
+
.After (reusable)
|
|
1312
|
+
[source,ruby]
|
|
1313
|
+
----
|
|
1314
|
+
class YYYYMMDDDate < Lutaml::Model::Type::Date
|
|
1315
|
+
def self.cast(value)
|
|
1316
|
+
case value
|
|
1317
|
+
when ::Date then value
|
|
1318
|
+
when ::String then from_xml(value) # Reuse parsing logic
|
|
1319
|
+
else super
|
|
1320
|
+
end
|
|
1321
|
+
end
|
|
1322
|
+
|
|
1323
|
+
def self.from_xml(value)
|
|
1324
|
+
return nil if value.nil? || value.empty?
|
|
1325
|
+
Date.new(value[0..3].to_i, value[4..5].to_i, value[6..7].to_i)
|
|
1326
|
+
end
|
|
1327
|
+
|
|
1328
|
+
def to_xml
|
|
1329
|
+
value&.strftime("%Y%m%d")
|
|
1330
|
+
end
|
|
1331
|
+
|
|
1332
|
+
# Apply to all formats
|
|
1333
|
+
alias_method :to_json, :to_xml
|
|
1334
|
+
alias_method :to_yaml, :to_xml
|
|
1335
|
+
|
|
1336
|
+
class << self
|
|
1337
|
+
alias_method :from_json, :from_xml
|
|
1338
|
+
alias_method :from_yaml, :from_xml
|
|
1339
|
+
end
|
|
1340
|
+
end
|
|
1341
|
+
|
|
1342
|
+
class Model1 < Lutaml::Model::Serializable
|
|
1343
|
+
attribute :date1, YYYYMMDDDate
|
|
1344
|
+
end
|
|
1345
|
+
|
|
1346
|
+
class Model2 < Lutaml::Model::Serializable
|
|
1347
|
+
attribute :date2, YYYYMMDDDate
|
|
1348
|
+
end
|
|
1349
|
+
----
|
|
1350
|
+
|
|
1351
|
+
== Summary
|
|
1352
|
+
|
|
1353
|
+
=== Quick Reference
|
|
1354
|
+
|
|
1355
|
+
Choose your transformation approach:
|
|
1356
|
+
|
|
1357
|
+
1. **Custom Value Type** when:
|
|
1358
|
+
- Reusable logic
|
|
1359
|
+
- Format-specific needs
|
|
1360
|
+
- Bidirectional transformations
|
|
1361
|
+
- Complex parsing/calculation
|
|
1362
|
+
|
|
1363
|
+
2. **Attribute Transform** when:
|
|
1364
|
+
- Uniform across all formats
|
|
1365
|
+
- Simple logic
|
|
1366
|
+
- Single attribute use
|
|
1367
|
+
- Quick inline transformation
|
|
1368
|
+
|
|
1369
|
+
3. **Mapping Transform** when:
|
|
1370
|
+
- Format-specific requirements
|
|
1371
|
+
- One-off transformation
|
|
1372
|
+
- Combined with other approaches
|
|
1373
|
+
- API-specific formatting
|
|
1374
|
+
|
|
1375
|
+
=== Key Takeaways
|
|
1376
|
+
|
|
1377
|
+
* **Values cannot be mapped**, they must be **transformed**
|
|
1378
|
+
* **Models can be mapped**, they don't need transformation
|
|
1379
|
+
* **Format conversion** is bidirectional, **calculated values** may be unidirectional
|
|
1380
|
+
* **Precedence matters** when combining attribute and mapping transforms
|
|
1381
|
+
* **Reusability** drives the choice between Custom Types and Transform Procs
|
|
1382
|
+
|
|
1383
|
+
== See Also
|
|
1384
|
+
|
|
1385
|
+
* link:../../importable_models#attribute-value-transform[Attribute Value Transform]
|
|
1386
|
+
* link:../../references/format-independent-features#mapping-value-transformation[Mapping Value Transformation]
|
|
1387
|
+
* link:../../tutorials/custom-types-tutorial[Custom Types Tutorial]
|
|
1388
|
+
* link:../../references/custom_adapters[Custom Adapters Guide]
|