lutaml-model 0.7.6 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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} +90 -44
- data/lib/lutaml/{model/mapping/key_value_mapping_rule.rb → key_value/mapping_rule.rb} +9 -9
- 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 +526 -42
- 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/xml → xml}/root_mappings/nested_child_mappings_spec.rb +53 -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
|
@@ -0,0 +1,1664 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Collections
|
|
3
|
+
nav_order: 7
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
= Collections
|
|
7
|
+
:toc:
|
|
8
|
+
:toclevels: 3
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
[[collection-definition]]
|
|
13
|
+
== General
|
|
14
|
+
|
|
15
|
+
Collections are used to represent a contained group of multiple instances of models.
|
|
16
|
+
|
|
17
|
+
Typically, a collection represents an "Array" or a "Set" in information modeling
|
|
18
|
+
and programming languages. In LutaML, a collection represents an array of model
|
|
19
|
+
instances.
|
|
20
|
+
|
|
21
|
+
Models in a collection may be:
|
|
22
|
+
|
|
23
|
+
* constrained to be of a single kind;
|
|
24
|
+
|
|
25
|
+
* constrained to be of multiple kinds sharing common characteristics;
|
|
26
|
+
|
|
27
|
+
* unbounded of any kind.
|
|
28
|
+
|
|
29
|
+
LutaML Model provides the `Lutaml::Model::Collection` class for defining
|
|
30
|
+
collections of model instances.
|
|
31
|
+
|
|
32
|
+
=== Configuration
|
|
33
|
+
|
|
34
|
+
==== All formats
|
|
35
|
+
|
|
36
|
+
The `instances` directive defined at the `Collection` class level is used to
|
|
37
|
+
define the collection attribute and the model type of the collection elements.
|
|
38
|
+
|
|
39
|
+
Syntax:
|
|
40
|
+
|
|
41
|
+
[source,ruby]
|
|
42
|
+
----
|
|
43
|
+
class MyCollection < Lutaml::Model::Collection
|
|
44
|
+
instances {attribute}, {ModelType}
|
|
45
|
+
end
|
|
46
|
+
----
|
|
47
|
+
|
|
48
|
+
Where,
|
|
49
|
+
|
|
50
|
+
`attribute`:: The name of the attribute that contains the collection.
|
|
51
|
+
`ModelType`:: The model type of the collection elements.
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
==== Mapping instances: key-value formats only
|
|
55
|
+
|
|
56
|
+
The `map_instances` directive is only used in the `key_value` block.
|
|
57
|
+
|
|
58
|
+
Syntax:
|
|
59
|
+
|
|
60
|
+
[source,ruby]
|
|
61
|
+
----
|
|
62
|
+
class MyCollection < Lutaml::Model::Collection
|
|
63
|
+
instances {attribute}, ModelType
|
|
64
|
+
|
|
65
|
+
key_value do
|
|
66
|
+
map_instances to: {attribute}
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
----
|
|
70
|
+
|
|
71
|
+
Where,
|
|
72
|
+
|
|
73
|
+
`attribute`:: The name of the attribute that contains model instances.
|
|
74
|
+
|
|
75
|
+
This directive maps individual array elements to the defined `instances`
|
|
76
|
+
attribute. These are the items considered part of the Collection and reflected
|
|
77
|
+
as Enumerable elements.
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
==== Mapping instances: XML only
|
|
81
|
+
|
|
82
|
+
In the `xml` block, the `map_element`, `map_attribute` directives are used instead.
|
|
83
|
+
|
|
84
|
+
These directives map individual array elements to the defined `instances`
|
|
85
|
+
attribute. These are the items considered part of the Collection and reflected
|
|
86
|
+
as Enumerable elements.
|
|
87
|
+
|
|
88
|
+
Syntax for an element collection:
|
|
89
|
+
|
|
90
|
+
[source,ruby]
|
|
91
|
+
----
|
|
92
|
+
class MyCollection < Lutaml::Model::Collection
|
|
93
|
+
instances {attribute}, ModelType
|
|
94
|
+
|
|
95
|
+
xml do
|
|
96
|
+
map_element "element-name", to: {attribute}
|
|
97
|
+
end
|
|
98
|
+
end
|
|
99
|
+
----
|
|
100
|
+
|
|
101
|
+
Where,
|
|
102
|
+
|
|
103
|
+
`element-name`:: The name of the XML element of each model instance.
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
Syntax for an attribute collection:
|
|
107
|
+
|
|
108
|
+
[source,ruby]
|
|
109
|
+
----
|
|
110
|
+
class MyCollection < Lutaml::Model::Collection
|
|
111
|
+
instances {attribute}, ModelType
|
|
112
|
+
xml do
|
|
113
|
+
map_attribute "attribute-name", to: {attribute}
|
|
114
|
+
end
|
|
115
|
+
end
|
|
116
|
+
----
|
|
117
|
+
|
|
118
|
+
Where,
|
|
119
|
+
|
|
120
|
+
`attribute-name`:: The name of the XML attribute that contains all model instances.
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
==== XML attribute collections with delimited values
|
|
124
|
+
|
|
125
|
+
Lutaml::Model supports handling collections realized as XML attributes.
|
|
126
|
+
|
|
127
|
+
This feature allows you to serialize and deserialize multiple values stored in a
|
|
128
|
+
single XML attribute, separated by a delimiter.
|
|
129
|
+
|
|
130
|
+
There are two approaches for handling delimited attribute values:
|
|
131
|
+
|
|
132
|
+
* Using the `delimiter:` option: provides simple splitting and joining with a fixed delimiter;
|
|
133
|
+
|
|
134
|
+
* Using the `as_list:` option: provides custom import and export logic.
|
|
135
|
+
|
|
136
|
+
The **`delimiter` option** is a straightforward way to handle
|
|
137
|
+
attribute values that are delimited strings. It is ideal for simple cases where
|
|
138
|
+
you need basic string splitting and joining with a fixed delimiter. It
|
|
139
|
+
automatically splits the string during import and joins
|
|
140
|
+
the array during export.
|
|
141
|
+
|
|
142
|
+
[source,ruby]
|
|
143
|
+
----
|
|
144
|
+
class TitleDelimiterCollection < Lutaml::Model::Collection
|
|
145
|
+
instances :items, :string
|
|
146
|
+
|
|
147
|
+
xml do
|
|
148
|
+
root "titles"
|
|
149
|
+
map_attribute "title", to: :items, delimiter: "; " <1>
|
|
150
|
+
end
|
|
151
|
+
end
|
|
152
|
+
----
|
|
153
|
+
<1> The delimiter used to split and join the string values.
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
The **`as_list` option** provides full control over how values are split during
|
|
157
|
+
import and joined during export. This is useful when you need custom parsing
|
|
158
|
+
logic. This allows for more complex transformations beyond simple splitting and
|
|
159
|
+
joining that is achieved through using delimiters.
|
|
160
|
+
|
|
161
|
+
[source,ruby]
|
|
162
|
+
----
|
|
163
|
+
class TitleCollection < Lutaml::Model::Collection
|
|
164
|
+
instances :items, :string
|
|
165
|
+
|
|
166
|
+
xml do
|
|
167
|
+
root "titles"
|
|
168
|
+
map_attribute "title", to: :items, as_list: {
|
|
169
|
+
import: ->(str) { str.split("; ") }, <1>
|
|
170
|
+
export: ->(arr) { arr.join("; ") }, <2>
|
|
171
|
+
}
|
|
172
|
+
end
|
|
173
|
+
end
|
|
174
|
+
----
|
|
175
|
+
<1> Custom logic to split the string into an array during import.
|
|
176
|
+
<2> Custom logic to join the array into a string during export.
|
|
177
|
+
|
|
178
|
+
.Applying the `delimiter` and `as_list` options for XML attribute collections
|
|
179
|
+
[example]
|
|
180
|
+
====
|
|
181
|
+
Both approaches work with the same XML format:
|
|
182
|
+
|
|
183
|
+
[source,xml]
|
|
184
|
+
----
|
|
185
|
+
<titles title="Title One; Title Two; Title Three"/>
|
|
186
|
+
----
|
|
187
|
+
|
|
188
|
+
[source,ruby]
|
|
189
|
+
----
|
|
190
|
+
# Both collections work identically for basic use cases
|
|
191
|
+
collection = TitleCollection.from_xml(xml)
|
|
192
|
+
collection.items # => ["Title One", "Title Two", "Title Three"]
|
|
193
|
+
collection.to_xml # => '<titles title="Title One; Title Two; Title Three"/>'
|
|
194
|
+
|
|
195
|
+
# Same result with delimiter option
|
|
196
|
+
delimiter_collection = TitleDelimiterCollection.from_xml(xml)
|
|
197
|
+
delimiter_collection.items # => ["Title One", "Title Two", "Title Three"]
|
|
198
|
+
delimiter_collection.to_xml # => '<titles title="Title One; Title Two; Title Three"/>'
|
|
199
|
+
----
|
|
200
|
+
====
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
=== Collection types
|
|
204
|
+
|
|
205
|
+
A LutaML collections is used for a number of scenarios:
|
|
206
|
+
|
|
207
|
+
* Root collections (for key-value formats)
|
|
208
|
+
* Named collections
|
|
209
|
+
* Keyed collections (for key-value formats)
|
|
210
|
+
* Attribute collections
|
|
211
|
+
* Nested collections
|
|
212
|
+
// * Polymorphic collections
|
|
213
|
+
// * Polymorphic attribute collections
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
=== Root collections (key-value formats only)
|
|
217
|
+
|
|
218
|
+
==== General
|
|
219
|
+
|
|
220
|
+
TODO: This case needs to be fixed for JSON.
|
|
221
|
+
|
|
222
|
+
A root collection is a collection that is not contained within a parent
|
|
223
|
+
collection.
|
|
224
|
+
|
|
225
|
+
Root collections only apply to key-value serialization formats.
|
|
226
|
+
The XML format does not support root collections.
|
|
227
|
+
|
|
228
|
+
NOTE: The https://www.w3.org/TR/xml11/[XML standard] mandates the existence
|
|
229
|
+
of a non-repeated "root element" in an XML document. This means that a valid XML
|
|
230
|
+
document must have a root element, and all elements in an XML document must
|
|
231
|
+
exist within the root. This is why an XML document cannot be a "root collection".
|
|
232
|
+
|
|
233
|
+
NOTE: A root collection cannot be represented using a non-collection model.
|
|
234
|
+
|
|
235
|
+
Root collections store multiple instances of the same model type at the root
|
|
236
|
+
level. In other words, these are model instances that do not have a defined
|
|
237
|
+
container at the level of the LutaML Model.
|
|
238
|
+
|
|
239
|
+
There are two kinds of root collections depending on the type of the instance
|
|
240
|
+
value:
|
|
241
|
+
|
|
242
|
+
"Root value collection":: the value is a "primitive type"
|
|
243
|
+
|
|
244
|
+
"Root object collection":: the value is a "model instance"
|
|
245
|
+
|
|
246
|
+
Regardless of the type of root collection, the instance in a collection is
|
|
247
|
+
always a LutaML model instance.
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
==== Root value collections
|
|
251
|
+
|
|
252
|
+
A root value collection is a collection that directly contains values of a
|
|
253
|
+
primitive type.
|
|
254
|
+
|
|
255
|
+
.Simple root collection with each instance being a value
|
|
256
|
+
[example]
|
|
257
|
+
====
|
|
258
|
+
[source,yaml]
|
|
259
|
+
----
|
|
260
|
+
---
|
|
261
|
+
- Item One
|
|
262
|
+
- Item Two
|
|
263
|
+
- Item Three
|
|
264
|
+
----
|
|
265
|
+
|
|
266
|
+
[source,json]
|
|
267
|
+
----
|
|
268
|
+
[
|
|
269
|
+
"Item One",
|
|
270
|
+
"Item Two",
|
|
271
|
+
"Item Three"
|
|
272
|
+
]
|
|
273
|
+
----
|
|
274
|
+
====
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
Syntax:
|
|
278
|
+
|
|
279
|
+
[source,ruby]
|
|
280
|
+
----
|
|
281
|
+
class MyCollection < Lutaml::Model::Collection
|
|
282
|
+
instances :items, ModelType
|
|
283
|
+
end
|
|
284
|
+
|
|
285
|
+
class ModelType < Lutaml::Model::Serializable
|
|
286
|
+
attribute :name, :string
|
|
287
|
+
end
|
|
288
|
+
----
|
|
289
|
+
|
|
290
|
+
.Handling a root collection where each instance is a value
|
|
291
|
+
[example]
|
|
292
|
+
====
|
|
293
|
+
Code:
|
|
294
|
+
|
|
295
|
+
[source,ruby]
|
|
296
|
+
----
|
|
297
|
+
class Title < Lutaml::Model::Serializable
|
|
298
|
+
attribute :content, :string
|
|
299
|
+
end
|
|
300
|
+
|
|
301
|
+
class TitleCollection < Lutaml::Model::Collection
|
|
302
|
+
instances :titles, Title
|
|
303
|
+
|
|
304
|
+
key_value do
|
|
305
|
+
no_root # default
|
|
306
|
+
map_instances to: :titles
|
|
307
|
+
end
|
|
308
|
+
end
|
|
309
|
+
----
|
|
310
|
+
|
|
311
|
+
Data:
|
|
312
|
+
|
|
313
|
+
[source,yaml]
|
|
314
|
+
----
|
|
315
|
+
---
|
|
316
|
+
- Title One
|
|
317
|
+
- Title Two
|
|
318
|
+
- Title Three
|
|
319
|
+
----
|
|
320
|
+
|
|
321
|
+
[source,json]
|
|
322
|
+
----
|
|
323
|
+
[
|
|
324
|
+
"Title One",
|
|
325
|
+
"Title Two",
|
|
326
|
+
"Title Three"
|
|
327
|
+
]
|
|
328
|
+
----
|
|
329
|
+
|
|
330
|
+
Usage:
|
|
331
|
+
|
|
332
|
+
[source,ruby]
|
|
333
|
+
----
|
|
334
|
+
titles = TitleCollection.from_yaml(yaml_data)
|
|
335
|
+
titles.count
|
|
336
|
+
# => 3
|
|
337
|
+
titles.first.content
|
|
338
|
+
# => "Title One"
|
|
339
|
+
----
|
|
340
|
+
====
|
|
341
|
+
|
|
342
|
+
|
|
343
|
+
==== Root object collections
|
|
344
|
+
|
|
345
|
+
A root object collection is a collection that directly contains model instances,
|
|
346
|
+
each containing at least one serialized attribute.
|
|
347
|
+
|
|
348
|
+
.Simple root collection in YAML with each instance being a models with an attribute `name`
|
|
349
|
+
[example]
|
|
350
|
+
====
|
|
351
|
+
[source,yaml]
|
|
352
|
+
----
|
|
353
|
+
---
|
|
354
|
+
- name: Item One
|
|
355
|
+
- name: Item Two
|
|
356
|
+
- name: Item Three
|
|
357
|
+
----
|
|
358
|
+
|
|
359
|
+
[source,json]
|
|
360
|
+
----
|
|
361
|
+
[
|
|
362
|
+
{"name": "Item One"},
|
|
363
|
+
{"name": "Item Two"},
|
|
364
|
+
{"name": "Item Three"}
|
|
365
|
+
]
|
|
366
|
+
----
|
|
367
|
+
====
|
|
368
|
+
|
|
369
|
+
|
|
370
|
+
.Handling a root collection where each instance is defined by a model with attributes
|
|
371
|
+
[example]
|
|
372
|
+
====
|
|
373
|
+
Code:
|
|
374
|
+
|
|
375
|
+
[source,ruby]
|
|
376
|
+
----
|
|
377
|
+
class Title < Lutaml::Model::Serializable
|
|
378
|
+
attribute :content, :string
|
|
379
|
+
end
|
|
380
|
+
|
|
381
|
+
class TitleCollection < Lutaml::Model::Collection
|
|
382
|
+
instances :titles, Title
|
|
383
|
+
|
|
384
|
+
key_value do
|
|
385
|
+
no_root # default
|
|
386
|
+
map_instances to: :titles
|
|
387
|
+
end
|
|
388
|
+
end
|
|
389
|
+
----
|
|
390
|
+
|
|
391
|
+
Data:
|
|
392
|
+
|
|
393
|
+
[source,yaml]
|
|
394
|
+
----
|
|
395
|
+
---
|
|
396
|
+
- content: Title One
|
|
397
|
+
- content: Title Two
|
|
398
|
+
- content: Title Three
|
|
399
|
+
----
|
|
400
|
+
|
|
401
|
+
[source,json]
|
|
402
|
+
----
|
|
403
|
+
[
|
|
404
|
+
{"content": "Title One"},
|
|
405
|
+
{"content": "Title Two"},
|
|
406
|
+
{"content": "Title Three"}
|
|
407
|
+
]
|
|
408
|
+
----
|
|
409
|
+
|
|
410
|
+
Usage:
|
|
411
|
+
|
|
412
|
+
[source,ruby]
|
|
413
|
+
----
|
|
414
|
+
titles = TitleCollection.from_yaml(yaml_data)
|
|
415
|
+
titles.count
|
|
416
|
+
# => 3
|
|
417
|
+
titles.first.content
|
|
418
|
+
# => "Title One"
|
|
419
|
+
----
|
|
420
|
+
====
|
|
421
|
+
|
|
422
|
+
|
|
423
|
+
=== Named collections
|
|
424
|
+
|
|
425
|
+
==== General
|
|
426
|
+
|
|
427
|
+
Named collections are collections wrapped inside a name or a key. The "name" of
|
|
428
|
+
the collection serves as the container root of its contained model instances.
|
|
429
|
+
|
|
430
|
+
The named collection setup applies to XML and key-value serialization formats.
|
|
431
|
+
|
|
432
|
+
In a named collection setup, the collection is defined as a
|
|
433
|
+
Lutaml::Model::Collection class, and each instance is defined as a
|
|
434
|
+
Lutaml::Model::Serializable class.
|
|
435
|
+
|
|
436
|
+
There are two kinds of named collections depending on the type of the instance
|
|
437
|
+
value:
|
|
438
|
+
|
|
439
|
+
"Named value collection":: the value is a "primitive type"
|
|
440
|
+
|
|
441
|
+
"Named object collection":: the value is a "model instance"
|
|
442
|
+
|
|
443
|
+
Regardless of the name of root collection, the instance in a collection is
|
|
444
|
+
always a LutaML model instance.
|
|
445
|
+
|
|
446
|
+
|
|
447
|
+
==== Named value collections
|
|
448
|
+
|
|
449
|
+
A named value collection is a collection that contains values of a
|
|
450
|
+
primitive type.
|
|
451
|
+
|
|
452
|
+
.Named value collection in XML with models each containing an element with content
|
|
453
|
+
[source,xml]
|
|
454
|
+
----
|
|
455
|
+
<names>
|
|
456
|
+
<name>Item One</name>
|
|
457
|
+
<name>Item Two</name>
|
|
458
|
+
<name>Item Three</name>
|
|
459
|
+
</names>
|
|
460
|
+
----
|
|
461
|
+
|
|
462
|
+
.Named value collection in YAML with models each containing a value
|
|
463
|
+
[source,yaml]
|
|
464
|
+
----
|
|
465
|
+
---
|
|
466
|
+
names:
|
|
467
|
+
- Item One
|
|
468
|
+
- Item Two
|
|
469
|
+
- Item Three
|
|
470
|
+
----
|
|
471
|
+
|
|
472
|
+
Syntax:
|
|
473
|
+
|
|
474
|
+
[source,ruby]
|
|
475
|
+
----
|
|
476
|
+
class MyCollection < Lutaml::Model::Collection
|
|
477
|
+
instances :items, ModelType
|
|
478
|
+
|
|
479
|
+
xml do
|
|
480
|
+
root "name-of-xml-container-element"
|
|
481
|
+
end
|
|
482
|
+
|
|
483
|
+
key_value do
|
|
484
|
+
root "name-of-key-value-container-element"
|
|
485
|
+
end
|
|
486
|
+
end
|
|
487
|
+
|
|
488
|
+
class ModelType < Lutaml::Model::Serializable
|
|
489
|
+
attribute :name, :string
|
|
490
|
+
end
|
|
491
|
+
----
|
|
492
|
+
|
|
493
|
+
A named collection can alternatively be implemented as a non-collection model
|
|
494
|
+
("Model class with an attribute") that contains the collection of instances. In
|
|
495
|
+
this case, the attribute will be an Array object, which does not contain
|
|
496
|
+
additional attributes and methods.
|
|
497
|
+
|
|
498
|
+
.Handling a named collection with instance elements directly containing values
|
|
499
|
+
[example]
|
|
500
|
+
====
|
|
501
|
+
[source,ruby]
|
|
502
|
+
----
|
|
503
|
+
class Title < Lutaml::Model::Serializable
|
|
504
|
+
attribute :title, :string
|
|
505
|
+
|
|
506
|
+
xml do
|
|
507
|
+
root "title"
|
|
508
|
+
map_content to: :title
|
|
509
|
+
end
|
|
510
|
+
end
|
|
511
|
+
|
|
512
|
+
class DirectTitleCollection < Lutaml::Model::Collection
|
|
513
|
+
instances :items, Title
|
|
514
|
+
|
|
515
|
+
xml do
|
|
516
|
+
root "titles"
|
|
517
|
+
map_element "title", to: :items
|
|
518
|
+
end
|
|
519
|
+
|
|
520
|
+
key_value do
|
|
521
|
+
map_instances to: :items
|
|
522
|
+
end
|
|
523
|
+
end
|
|
524
|
+
----
|
|
525
|
+
|
|
526
|
+
[source,xml]
|
|
527
|
+
----
|
|
528
|
+
<titles>
|
|
529
|
+
<title>Title One</title>
|
|
530
|
+
<title>Title Two</title>
|
|
531
|
+
<title>Title Three</title>
|
|
532
|
+
</titles>
|
|
533
|
+
----
|
|
534
|
+
|
|
535
|
+
[source,yaml]
|
|
536
|
+
----
|
|
537
|
+
---
|
|
538
|
+
titles:
|
|
539
|
+
- Title One
|
|
540
|
+
- Title Two
|
|
541
|
+
- Title Three
|
|
542
|
+
----
|
|
543
|
+
|
|
544
|
+
[source,json]
|
|
545
|
+
----
|
|
546
|
+
{
|
|
547
|
+
"titles": [
|
|
548
|
+
"Title One",
|
|
549
|
+
"Title Two",
|
|
550
|
+
"Title Three"
|
|
551
|
+
]
|
|
552
|
+
}
|
|
553
|
+
----
|
|
554
|
+
|
|
555
|
+
[source,ruby]
|
|
556
|
+
----
|
|
557
|
+
titles = DirectTitleCollection.from_yaml(yaml_data)
|
|
558
|
+
titles.count
|
|
559
|
+
# => 3
|
|
560
|
+
titles.first.title
|
|
561
|
+
# => "Title One"
|
|
562
|
+
titles.last.title
|
|
563
|
+
# => "Title Three"
|
|
564
|
+
----
|
|
565
|
+
====
|
|
566
|
+
|
|
567
|
+
|
|
568
|
+
==== Named object collections
|
|
569
|
+
|
|
570
|
+
A named object collection is a collection that contains model instances,
|
|
571
|
+
each containing at least one serialized attribute.
|
|
572
|
+
|
|
573
|
+
NOTE: A named object collection can alternatively be implemented as a
|
|
574
|
+
non-collection model ("Model class with an attribute") that contains the
|
|
575
|
+
collection of instances. In this case, the attribute will be an Array object,
|
|
576
|
+
which does not contain additional attributes and methods.
|
|
577
|
+
|
|
578
|
+
|
|
579
|
+
.Named object collection in XML with instances each containing an element with a model attribute
|
|
580
|
+
[source,xml]
|
|
581
|
+
----
|
|
582
|
+
<names>
|
|
583
|
+
<name><content>Item One</content></name>
|
|
584
|
+
<name><content>Item Two</content></name>
|
|
585
|
+
<name><content>Item Three</content></name>
|
|
586
|
+
</names>
|
|
587
|
+
----
|
|
588
|
+
|
|
589
|
+
.Named object collection in YAML with instances each containing a model attribute
|
|
590
|
+
[source,yaml]
|
|
591
|
+
----
|
|
592
|
+
---
|
|
593
|
+
names:
|
|
594
|
+
- name: Item One
|
|
595
|
+
- name: Item Two
|
|
596
|
+
- name: Item Three
|
|
597
|
+
----
|
|
598
|
+
|
|
599
|
+
|
|
600
|
+
.Named object collection with each instance containing at least one model attribute
|
|
601
|
+
[example]
|
|
602
|
+
====
|
|
603
|
+
Data:
|
|
604
|
+
|
|
605
|
+
[source,xml]
|
|
606
|
+
----
|
|
607
|
+
<titles>
|
|
608
|
+
<title><content>Title One</content></title>
|
|
609
|
+
<title><content>Title Two</content></title>
|
|
610
|
+
<title><content>Title Three</content></title>
|
|
611
|
+
</titles>
|
|
612
|
+
----
|
|
613
|
+
|
|
614
|
+
[source,yaml]
|
|
615
|
+
----
|
|
616
|
+
---
|
|
617
|
+
titles:
|
|
618
|
+
- title: Title One
|
|
619
|
+
- title: Title Two
|
|
620
|
+
- title: Title Three
|
|
621
|
+
----
|
|
622
|
+
|
|
623
|
+
[source,json]
|
|
624
|
+
----
|
|
625
|
+
{
|
|
626
|
+
"titles": [
|
|
627
|
+
{"title": "Title One"},
|
|
628
|
+
{"title": "Title Two"},
|
|
629
|
+
{"title": "Title Three"}
|
|
630
|
+
]
|
|
631
|
+
}
|
|
632
|
+
----
|
|
633
|
+
|
|
634
|
+
Code:
|
|
635
|
+
|
|
636
|
+
[source,ruby]
|
|
637
|
+
----
|
|
638
|
+
class Title < Lutaml::Model::Serializable
|
|
639
|
+
attribute :title, :string
|
|
640
|
+
|
|
641
|
+
xml do
|
|
642
|
+
root "title"
|
|
643
|
+
map_element "content", to: :title
|
|
644
|
+
end
|
|
645
|
+
|
|
646
|
+
key_value do
|
|
647
|
+
map "title", to: :title
|
|
648
|
+
end
|
|
649
|
+
end
|
|
650
|
+
|
|
651
|
+
class TitleCollection < Lutaml::Model::Collection
|
|
652
|
+
instances :items, Title
|
|
653
|
+
|
|
654
|
+
xml do
|
|
655
|
+
root "titles"
|
|
656
|
+
map_element 'title', to: :items
|
|
657
|
+
end
|
|
658
|
+
|
|
659
|
+
key_value do
|
|
660
|
+
root "titles"
|
|
661
|
+
map_instances to: :items
|
|
662
|
+
end
|
|
663
|
+
end
|
|
664
|
+
----
|
|
665
|
+
|
|
666
|
+
Usage:
|
|
667
|
+
|
|
668
|
+
[source,ruby]
|
|
669
|
+
----
|
|
670
|
+
titles = TitleCollection.from_yaml(yaml_data)
|
|
671
|
+
titles.count
|
|
672
|
+
# => 3
|
|
673
|
+
titles.first.title
|
|
674
|
+
# => "Title One"
|
|
675
|
+
titles.last.title
|
|
676
|
+
# => "Title Three"
|
|
677
|
+
----
|
|
678
|
+
====
|
|
679
|
+
|
|
680
|
+
|
|
681
|
+
=== Attribute collection class
|
|
682
|
+
|
|
683
|
+
A model attribute that is a collection can be contained within a custom
|
|
684
|
+
collection class.
|
|
685
|
+
|
|
686
|
+
A custom collection class can be defined to provide custom behavior for the
|
|
687
|
+
collection inside a non-collection model, with attributes using
|
|
688
|
+
`collection: true`.
|
|
689
|
+
|
|
690
|
+
Syntax:
|
|
691
|
+
|
|
692
|
+
[source,ruby]
|
|
693
|
+
----
|
|
694
|
+
class MyModel < Lutaml::Model::Serializable
|
|
695
|
+
attribute {model-attribute}, ModelType, collection: MyCollection
|
|
696
|
+
end
|
|
697
|
+
|
|
698
|
+
class MyCollection < Lutaml::Model::Collection
|
|
699
|
+
instances {instance-name}, ModelType
|
|
700
|
+
|
|
701
|
+
# Custom behavior for the collection
|
|
702
|
+
def custom_method
|
|
703
|
+
# Custom logic here
|
|
704
|
+
end
|
|
705
|
+
end
|
|
706
|
+
----
|
|
707
|
+
|
|
708
|
+
.Using a custom collection class for custom collection behavior
|
|
709
|
+
[example]
|
|
710
|
+
====
|
|
711
|
+
Data:
|
|
712
|
+
|
|
713
|
+
[source,xml]
|
|
714
|
+
----
|
|
715
|
+
<titles>
|
|
716
|
+
<title>Title One</title>
|
|
717
|
+
<title>Title Two</title>
|
|
718
|
+
<title>Title Three</title>
|
|
719
|
+
</titles>
|
|
720
|
+
----
|
|
721
|
+
|
|
722
|
+
[source,yaml]
|
|
723
|
+
----
|
|
724
|
+
titles:
|
|
725
|
+
- title: Title One
|
|
726
|
+
- title: Title Two
|
|
727
|
+
- title: Title Three
|
|
728
|
+
----
|
|
729
|
+
|
|
730
|
+
|
|
731
|
+
[source,ruby]
|
|
732
|
+
----
|
|
733
|
+
class StringParts < Lutaml::Model::Collection
|
|
734
|
+
instances :parts, :string
|
|
735
|
+
|
|
736
|
+
def to_s
|
|
737
|
+
parts.join(' -- ')
|
|
738
|
+
end
|
|
739
|
+
end
|
|
740
|
+
|
|
741
|
+
class BibliographicItem < Lutaml::Model::Serializable
|
|
742
|
+
attribute :title_parts, :string, collection: StringParts
|
|
743
|
+
|
|
744
|
+
xml do
|
|
745
|
+
root "titles"
|
|
746
|
+
map_element "title", to: :title_parts
|
|
747
|
+
end
|
|
748
|
+
|
|
749
|
+
key_value do
|
|
750
|
+
root "titles"
|
|
751
|
+
map_instances to: :title_parts
|
|
752
|
+
end
|
|
753
|
+
|
|
754
|
+
def render_title
|
|
755
|
+
title_parts.to_s
|
|
756
|
+
end
|
|
757
|
+
end
|
|
758
|
+
----
|
|
759
|
+
|
|
760
|
+
[source,ruby]
|
|
761
|
+
----
|
|
762
|
+
> bib_item = BibliographicItem.from_xml(xml_data)
|
|
763
|
+
> bib_item.title_parts
|
|
764
|
+
> # StringParts:0x0000000104ac7240 @parts=["Title One", "Title Two", "Title Three"]
|
|
765
|
+
> bib_item.render_title
|
|
766
|
+
> # "Title One -- Title Two -- Title Three"
|
|
767
|
+
----
|
|
768
|
+
====
|
|
769
|
+
|
|
770
|
+
|
|
771
|
+
=== Consolidation mapping
|
|
772
|
+
|
|
773
|
+
Collections can consolidate flat sibling elements into structured group instances.
|
|
774
|
+
See link:../_guides/consolidation-mapping[Consolidation Mapping] for the full guide.
|
|
775
|
+
|
|
776
|
+
|
|
777
|
+
|
|
778
|
+
=== Nested collections
|
|
779
|
+
|
|
780
|
+
TODO: This case needs to be fixed.
|
|
781
|
+
|
|
782
|
+
Collections can be nested within other models and define their own serialization
|
|
783
|
+
rules.
|
|
784
|
+
|
|
785
|
+
Nested collections can be defined in the same way as root collections, but
|
|
786
|
+
they are defined within the context of a parent model.
|
|
787
|
+
|
|
788
|
+
[example]
|
|
789
|
+
====
|
|
790
|
+
Data:
|
|
791
|
+
|
|
792
|
+
[source,xml]
|
|
793
|
+
----
|
|
794
|
+
<titles>
|
|
795
|
+
<title-group>
|
|
796
|
+
<artifact>
|
|
797
|
+
<content>Title One</content>
|
|
798
|
+
</artifact>
|
|
799
|
+
<artifact>
|
|
800
|
+
<content>Title Two</content>
|
|
801
|
+
</artifact>
|
|
802
|
+
<artifact>
|
|
803
|
+
<content>Title Three</content>
|
|
804
|
+
</artifact>
|
|
805
|
+
</title-group>
|
|
806
|
+
</titles>
|
|
807
|
+
----
|
|
808
|
+
|
|
809
|
+
[source,yaml]
|
|
810
|
+
----
|
|
811
|
+
---
|
|
812
|
+
titles:
|
|
813
|
+
title-group:
|
|
814
|
+
- artifact:
|
|
815
|
+
content: Title One
|
|
816
|
+
- artifact:
|
|
817
|
+
content: Title Two
|
|
818
|
+
- artifact:
|
|
819
|
+
content: Title Three
|
|
820
|
+
----
|
|
821
|
+
|
|
822
|
+
[source,ruby]
|
|
823
|
+
----
|
|
824
|
+
class Title < Lutaml::Model::Serializable
|
|
825
|
+
attribute :content, :string
|
|
826
|
+
end
|
|
827
|
+
|
|
828
|
+
class TitleCollection < Lutaml::Model::Collection
|
|
829
|
+
instances :items, Title
|
|
830
|
+
|
|
831
|
+
xml do
|
|
832
|
+
root "title-group"
|
|
833
|
+
map_element "artifact", to: :items
|
|
834
|
+
end
|
|
835
|
+
end
|
|
836
|
+
|
|
837
|
+
class BibItem < Lutaml::Model::Serializable
|
|
838
|
+
attribute :titles, TitleCollection
|
|
839
|
+
|
|
840
|
+
xml do
|
|
841
|
+
root "bibitem"
|
|
842
|
+
# This overrides the collection's root "title-group"
|
|
843
|
+
map_element "titles", to: :titles
|
|
844
|
+
end
|
|
845
|
+
end
|
|
846
|
+
----
|
|
847
|
+
====
|
|
848
|
+
|
|
849
|
+
|
|
850
|
+
=== Keyed collections (key-value serialization formats only)
|
|
851
|
+
|
|
852
|
+
==== General
|
|
853
|
+
|
|
854
|
+
In key-value serialization formats, a key can be used to uniquely identify each
|
|
855
|
+
instance. This usage allows for enforcing uniqueness in the collection.
|
|
856
|
+
|
|
857
|
+
A collection that contains keyed objects as its instances is commonly called a
|
|
858
|
+
"keyed collection". A keyed object in a serialization format is an object
|
|
859
|
+
identified with a unique key.
|
|
860
|
+
|
|
861
|
+
NOTE: The concept of keyed collections does not typically apply to XML
|
|
862
|
+
collections.
|
|
863
|
+
|
|
864
|
+
There are two kinds of keyed collections depending on the type of the keyed
|
|
865
|
+
value:
|
|
866
|
+
|
|
867
|
+
"keyed value collection":: the value is a "primitive type"
|
|
868
|
+
|
|
869
|
+
"keyed object collection":: the value is a "model instance"
|
|
870
|
+
|
|
871
|
+
Regardless of the type of keyed collections, the instance in a collection is
|
|
872
|
+
always a LutaML model instance.
|
|
873
|
+
|
|
874
|
+
|
|
875
|
+
==== `map_key` method
|
|
876
|
+
|
|
877
|
+
The `map_key` method specifies that the unique key is to be moved into an
|
|
878
|
+
attribute belonging to the instance model.
|
|
879
|
+
|
|
880
|
+
Syntax:
|
|
881
|
+
|
|
882
|
+
[source,ruby]
|
|
883
|
+
----
|
|
884
|
+
key_value do
|
|
885
|
+
map_key to_instance: {instance-attribute-name}
|
|
886
|
+
end
|
|
887
|
+
----
|
|
888
|
+
|
|
889
|
+
Where,
|
|
890
|
+
|
|
891
|
+
`to_instance`:: Refers to the attribute name in the instance that contains the key.
|
|
892
|
+
`{key_attribute}`:: The attribute name in the instance that contains the key.
|
|
893
|
+
|
|
894
|
+
|
|
895
|
+
==== `map_value` method
|
|
896
|
+
|
|
897
|
+
The `map_value` method specifies that the value (the object referenced by the
|
|
898
|
+
unique key) is to be moved into an attribute belonging to the instance model.
|
|
899
|
+
|
|
900
|
+
Syntax:
|
|
901
|
+
|
|
902
|
+
[source,ruby]
|
|
903
|
+
----
|
|
904
|
+
key_value do
|
|
905
|
+
# basic pattern
|
|
906
|
+
map_value {operation}: [*argument]
|
|
907
|
+
|
|
908
|
+
# Mapping the value object to a full instance through `to_instance`
|
|
909
|
+
map_value to_instance: {instance-attribute-name}
|
|
910
|
+
|
|
911
|
+
# Mapping the value object to an attribute as_instance
|
|
912
|
+
map_value as_attribute: {instance-attribute-name}
|
|
913
|
+
end
|
|
914
|
+
----
|
|
915
|
+
|
|
916
|
+
==== Keyed value collections
|
|
917
|
+
|
|
918
|
+
A keyed value collection is a collection where the keyed item in the serialization
|
|
919
|
+
format is a primitive type (e.g. string, integer, etc.).
|
|
920
|
+
|
|
921
|
+
The instance item inside the collection is a model instance that contains both
|
|
922
|
+
the serialized key and serialized value both as attributes inside the model.
|
|
923
|
+
|
|
924
|
+
All three `map_key`, `map_value`, and `map_instances` methods need to be used to
|
|
925
|
+
define how instances are mapped in a keyed value collection.
|
|
926
|
+
|
|
927
|
+
.Creating a keyed value collection
|
|
928
|
+
[example]
|
|
929
|
+
====
|
|
930
|
+
[source,ruby]
|
|
931
|
+
----
|
|
932
|
+
class AuthorAvailability < Lutaml::Model::Serializable
|
|
933
|
+
attribute :id, :string
|
|
934
|
+
attribute :available, :boolean
|
|
935
|
+
end
|
|
936
|
+
|
|
937
|
+
class AuthorCollection < Lutaml::Model::Collection
|
|
938
|
+
instances :authors, AuthorAvailability
|
|
939
|
+
|
|
940
|
+
key_value do
|
|
941
|
+
map_key to_instance: :id # This refers to 'authors[].id'
|
|
942
|
+
map_value as_attribute: :available # This refers to 'authors[].available'
|
|
943
|
+
map_instances to: :authors
|
|
944
|
+
end
|
|
945
|
+
end
|
|
946
|
+
----
|
|
947
|
+
|
|
948
|
+
[source,yaml]
|
|
949
|
+
----
|
|
950
|
+
---
|
|
951
|
+
author_01: true
|
|
952
|
+
author_02: false
|
|
953
|
+
author_03: true
|
|
954
|
+
----
|
|
955
|
+
|
|
956
|
+
[source,ruby]
|
|
957
|
+
----
|
|
958
|
+
authors = AuthorCollection.from_yaml(yaml_data)
|
|
959
|
+
authors.first.id
|
|
960
|
+
# => "author_01"
|
|
961
|
+
authors.first.available
|
|
962
|
+
# => true
|
|
963
|
+
----
|
|
964
|
+
====
|
|
965
|
+
|
|
966
|
+
|
|
967
|
+
==== Keyed object collections
|
|
968
|
+
|
|
969
|
+
A keyed object collection is a collection where the keyed item in the
|
|
970
|
+
serialization format contains multiple attributes.
|
|
971
|
+
|
|
972
|
+
The instance item inside the collection is a model instance that contains the
|
|
973
|
+
serialized key as one attribute, and the serialized value attributes are all
|
|
974
|
+
attributes inside the model.
|
|
975
|
+
|
|
976
|
+
Both the `map_key` and `map_instances` are used to define how instances are
|
|
977
|
+
mapped in a keyed object collection.
|
|
978
|
+
|
|
979
|
+
.Creating a keyed object collection
|
|
980
|
+
[example]
|
|
981
|
+
====
|
|
982
|
+
[source,ruby]
|
|
983
|
+
----
|
|
984
|
+
class Author < Lutaml::Model::Serializable
|
|
985
|
+
attribute :id, :string
|
|
986
|
+
attribute :name, :string
|
|
987
|
+
end
|
|
988
|
+
|
|
989
|
+
class AuthorCollection < Lutaml::Model::Collection
|
|
990
|
+
instances :authors, Author
|
|
991
|
+
|
|
992
|
+
key_value do
|
|
993
|
+
map_key to_instance: :id # This refers to 'authors[].id'
|
|
994
|
+
map_instances to: :authors
|
|
995
|
+
end
|
|
996
|
+
end
|
|
997
|
+
----
|
|
998
|
+
|
|
999
|
+
[source,yaml]
|
|
1000
|
+
----
|
|
1001
|
+
---
|
|
1002
|
+
author_01:
|
|
1003
|
+
name: Author One
|
|
1004
|
+
author_02:
|
|
1005
|
+
name: Author Two
|
|
1006
|
+
author_03:
|
|
1007
|
+
name: Author Three
|
|
1008
|
+
----
|
|
1009
|
+
|
|
1010
|
+
[source,ruby]
|
|
1011
|
+
----
|
|
1012
|
+
authors = AuthorCollection.from_yaml(yaml_data)
|
|
1013
|
+
authors.first.id
|
|
1014
|
+
# => "author_01"
|
|
1015
|
+
authors.first.name
|
|
1016
|
+
# => "Author One"
|
|
1017
|
+
----
|
|
1018
|
+
====
|
|
1019
|
+
|
|
1020
|
+
|
|
1021
|
+
==== Nested keyed object collection
|
|
1022
|
+
|
|
1023
|
+
A nested keyed object collection is a keyed collection that contain other keyed
|
|
1024
|
+
collections. This case is simply a more complex arrangement of the principles
|
|
1025
|
+
applied to keyed object collections.
|
|
1026
|
+
|
|
1027
|
+
This pattern can extend to multiple levels of nesting, where each level contains
|
|
1028
|
+
a keyed object collection that can have its own key and value mappings.
|
|
1029
|
+
|
|
1030
|
+
Depends on whether a custom collection class is needed, the following
|
|
1031
|
+
mechanisms are available:
|
|
1032
|
+
|
|
1033
|
+
* When using a Lutaml::Model::Serializable class for a keyed collection,
|
|
1034
|
+
use the `child_mappings` option to map attributes.
|
|
1035
|
+
|
|
1036
|
+
* When using a Lutaml::Model::Collection class for a keyed collection,
|
|
1037
|
+
there are two options:
|
|
1038
|
+
|
|
1039
|
+
* use the `map_key`, `map_value`, and `map_instances` methods to map attributes;
|
|
1040
|
+
or
|
|
1041
|
+
|
|
1042
|
+
* use the `root_mappings` option to map attributes.
|
|
1043
|
+
|
|
1044
|
+
|
|
1045
|
+
.Nested 2-layer keyed object collection
|
|
1046
|
+
[example]
|
|
1047
|
+
====
|
|
1048
|
+
This example provides a two-layer nested structure where:
|
|
1049
|
+
|
|
1050
|
+
* The first layer keys pieces by type (`bowls`, `vases`).
|
|
1051
|
+
* The second layer keys glazes by finish name within each piece type.
|
|
1052
|
+
* Each glaze finish contains detailed attributes like temperature.
|
|
1053
|
+
|
|
1054
|
+
[source,ruby]
|
|
1055
|
+
----
|
|
1056
|
+
# Third layer represents glaze finishes.
|
|
1057
|
+
class GlazeFinish < Lutaml::Model::Serializable
|
|
1058
|
+
attribute :name, :string
|
|
1059
|
+
attribute :temperature, :integer
|
|
1060
|
+
|
|
1061
|
+
key_value do
|
|
1062
|
+
map "name", to: :name
|
|
1063
|
+
map "temperature", to: :temperature
|
|
1064
|
+
end
|
|
1065
|
+
end
|
|
1066
|
+
|
|
1067
|
+
# Second layer represents ceramic pieces each with multiple finishes.
|
|
1068
|
+
class CeramicPiece < Lutaml::Model::Serializable
|
|
1069
|
+
attribute :piece_type, :string
|
|
1070
|
+
attribute :glazes, GlazeFinish, collection: true
|
|
1071
|
+
|
|
1072
|
+
key_value do
|
|
1073
|
+
map "piece_type", to: :piece_type
|
|
1074
|
+
map "glazes", to: :glazes, child_mappings: {
|
|
1075
|
+
name: :key,
|
|
1076
|
+
temperature: :temperature
|
|
1077
|
+
}
|
|
1078
|
+
end
|
|
1079
|
+
end
|
|
1080
|
+
|
|
1081
|
+
# Uppermost layer represents the collection of ceramic pieces.
|
|
1082
|
+
class StudioInventory < Lutaml::Model::Collection
|
|
1083
|
+
instances :pieces, CeramicPiece
|
|
1084
|
+
|
|
1085
|
+
key_value do
|
|
1086
|
+
map to: :pieces, root_mappings: {
|
|
1087
|
+
piece_type: :key,
|
|
1088
|
+
glazes: :value,
|
|
1089
|
+
}
|
|
1090
|
+
end
|
|
1091
|
+
end
|
|
1092
|
+
----
|
|
1093
|
+
|
|
1094
|
+
[source,yaml]
|
|
1095
|
+
----
|
|
1096
|
+
---
|
|
1097
|
+
bowls:
|
|
1098
|
+
matte_finish:
|
|
1099
|
+
name: Earth Matte
|
|
1100
|
+
temperature: 1240
|
|
1101
|
+
glossy_finish:
|
|
1102
|
+
name: Ocean Blue
|
|
1103
|
+
temperature: 1260
|
|
1104
|
+
crackle_finish:
|
|
1105
|
+
name: Antique Crackle
|
|
1106
|
+
temperature: 1220
|
|
1107
|
+
vases:
|
|
1108
|
+
metallic_finish:
|
|
1109
|
+
name: Bronze Metallic
|
|
1110
|
+
temperature: 1280
|
|
1111
|
+
crystalline_finish:
|
|
1112
|
+
name: Ice Crystal
|
|
1113
|
+
temperature: 1300
|
|
1114
|
+
----
|
|
1115
|
+
|
|
1116
|
+
[source,ruby]
|
|
1117
|
+
----
|
|
1118
|
+
inventory = StudioInventory.from_yaml(yaml_data)
|
|
1119
|
+
|
|
1120
|
+
# Access nested data through the hierarchy
|
|
1121
|
+
puts inventory.pieces.bowls.matte_finish.name
|
|
1122
|
+
# => "Earth Matte"
|
|
1123
|
+
|
|
1124
|
+
puts inventory.pieces.bowls.matte_finish.temperature
|
|
1125
|
+
# => 1240
|
|
1126
|
+
|
|
1127
|
+
# Iterate through all pieces and their glazes
|
|
1128
|
+
inventory.pieces.each do |piece_type, piece|
|
|
1129
|
+
puts "#{piece_type.capitalize}:"
|
|
1130
|
+
piece.glazes.each do |glaze_name, glaze|
|
|
1131
|
+
puts " #{glaze_name}: #{glaze.name} (#{glaze.temperature}°C)"
|
|
1132
|
+
end
|
|
1133
|
+
end
|
|
1134
|
+
----
|
|
1135
|
+
====
|
|
1136
|
+
|
|
1137
|
+
|
|
1138
|
+
|
|
1139
|
+
|
|
1140
|
+
=== Behavior
|
|
1141
|
+
|
|
1142
|
+
==== Enumerable interface
|
|
1143
|
+
|
|
1144
|
+
Collections implement the Ruby `Enumerable` interface, providing standard
|
|
1145
|
+
collection operations.
|
|
1146
|
+
|
|
1147
|
+
Collections allow the following sample `Enumerable` methods:
|
|
1148
|
+
|
|
1149
|
+
* `each` - Iterate over collection items
|
|
1150
|
+
* `map` - Transform collection items
|
|
1151
|
+
* `select` - Filter collection items
|
|
1152
|
+
* `find` - Find items matching criteria
|
|
1153
|
+
* `reduce` - Aggregate collection items
|
|
1154
|
+
|
|
1155
|
+
.Usage of the collection Enumerable interface
|
|
1156
|
+
[example]
|
|
1157
|
+
====
|
|
1158
|
+
[source,ruby]
|
|
1159
|
+
----
|
|
1160
|
+
# Filter items
|
|
1161
|
+
filtered = collection.filter { |item| item.id == "1" }
|
|
1162
|
+
|
|
1163
|
+
# Reject items
|
|
1164
|
+
rejected = collection.reject { |item| item.id == "1" }
|
|
1165
|
+
|
|
1166
|
+
# Select items
|
|
1167
|
+
selected = collection.select { |item| item.id == "1" }
|
|
1168
|
+
|
|
1169
|
+
# Map items
|
|
1170
|
+
mapped = collection.map { |item| item.name }
|
|
1171
|
+
|
|
1172
|
+
# Count items
|
|
1173
|
+
count = collection.count
|
|
1174
|
+
----
|
|
1175
|
+
====
|
|
1176
|
+
|
|
1177
|
+
|
|
1178
|
+
// ==== Collection validation
|
|
1179
|
+
|
|
1180
|
+
// Collections can define validation rules for their elements.
|
|
1181
|
+
|
|
1182
|
+
// [example]
|
|
1183
|
+
// ====
|
|
1184
|
+
// [source,ruby]
|
|
1185
|
+
// ----
|
|
1186
|
+
// class PublicationCollection < Lutaml::Model::Collection
|
|
1187
|
+
// instances(:publications, Publication) do
|
|
1188
|
+
// validates :year, numericality: { greater_than: 1900 }
|
|
1189
|
+
|
|
1190
|
+
// validate :must_have_author
|
|
1191
|
+
|
|
1192
|
+
// def must_have_author(publications)
|
|
1193
|
+
// publications.each do |publication|
|
|
1194
|
+
// next unless publication.author.nil?
|
|
1195
|
+
// errors.add(:author, "`#{publication.title}` must have an author")
|
|
1196
|
+
// end
|
|
1197
|
+
// end
|
|
1198
|
+
// end
|
|
1199
|
+
// end
|
|
1200
|
+
// ----
|
|
1201
|
+
// ====
|
|
1202
|
+
|
|
1203
|
+
==== Initialization
|
|
1204
|
+
|
|
1205
|
+
Collections can be initialized with an array of items or through individual item
|
|
1206
|
+
addition.
|
|
1207
|
+
|
|
1208
|
+
[example]
|
|
1209
|
+
====
|
|
1210
|
+
[source,ruby]
|
|
1211
|
+
----
|
|
1212
|
+
# Empty collection
|
|
1213
|
+
collection = ItemCollection.new
|
|
1214
|
+
|
|
1215
|
+
# From an array of items
|
|
1216
|
+
collection = ItemCollection.new([item1, item2, item3])
|
|
1217
|
+
|
|
1218
|
+
# From an array of hashes
|
|
1219
|
+
collection = ItemCollection.new([
|
|
1220
|
+
{ id: "1", name: "Item 1" },
|
|
1221
|
+
{ id: "2", name: "Item 2" }
|
|
1222
|
+
])
|
|
1223
|
+
|
|
1224
|
+
# Adding items later
|
|
1225
|
+
collection << Item.new(id: "3", name: "Item 3")
|
|
1226
|
+
----
|
|
1227
|
+
====
|
|
1228
|
+
|
|
1229
|
+
==== Collection mutation
|
|
1230
|
+
|
|
1231
|
+
Collection attributes can be mutated after initialization using standard Ruby
|
|
1232
|
+
array methods or custom helper methods. These mutations are properly reflected
|
|
1233
|
+
during serialization.
|
|
1234
|
+
|
|
1235
|
+
When a collection attribute is defined with a default value (e.g., `default: -> { [] }`),
|
|
1236
|
+
you can mutate it directly using Ruby's array methods such as `<<`, `push`,
|
|
1237
|
+
`concat`, etc., or through custom methods that add items to the collection.
|
|
1238
|
+
|
|
1239
|
+
.Mutating collection attributes after initialization
|
|
1240
|
+
[example]
|
|
1241
|
+
====
|
|
1242
|
+
[source,ruby]
|
|
1243
|
+
----
|
|
1244
|
+
class TabStop < Lutaml::Model::Serializable
|
|
1245
|
+
attribute :position, :integer
|
|
1246
|
+
attribute :alignment, :string
|
|
1247
|
+
|
|
1248
|
+
xml do
|
|
1249
|
+
element 'tab'
|
|
1250
|
+
map_attribute 'pos', to: :position
|
|
1251
|
+
map_attribute 'val', to: :alignment
|
|
1252
|
+
end
|
|
1253
|
+
end
|
|
1254
|
+
|
|
1255
|
+
class TabStopCollection < Lutaml::Model::Serializable
|
|
1256
|
+
attribute :tabs, TabStop, collection: true, default: -> { [] }
|
|
1257
|
+
|
|
1258
|
+
xml do
|
|
1259
|
+
element 'tabs'
|
|
1260
|
+
map_element 'tab', to: :tabs
|
|
1261
|
+
end
|
|
1262
|
+
|
|
1263
|
+
# Custom helper method for adding tabs
|
|
1264
|
+
def add_tab(position, alignment)
|
|
1265
|
+
tabs << TabStop.new(position: position, alignment: alignment)
|
|
1266
|
+
end
|
|
1267
|
+
end
|
|
1268
|
+
|
|
1269
|
+
# Create collection with default empty array
|
|
1270
|
+
collection = TabStopCollection.new
|
|
1271
|
+
|
|
1272
|
+
# Mutate using << operator
|
|
1273
|
+
collection.tabs << TabStop.new(position: 1440, alignment: "center")
|
|
1274
|
+
|
|
1275
|
+
# Mutate using custom method
|
|
1276
|
+
collection.add_tab(2880, "right")
|
|
1277
|
+
|
|
1278
|
+
# Mutations are properly serialized
|
|
1279
|
+
puts collection.to_xml
|
|
1280
|
+
# <tabs>
|
|
1281
|
+
# <tab pos="1440" val="center"/>
|
|
1282
|
+
# <tab pos="2880" val="right"/>
|
|
1283
|
+
# </tabs>
|
|
1284
|
+
----
|
|
1285
|
+
====
|
|
1286
|
+
|
|
1287
|
+
This behavior enables natural Ruby idioms for working with collections:
|
|
1288
|
+
|
|
1289
|
+
* **Direct mutation**: Use `<<`, `push`, `pop`, `shift`, `unshift`, `concat`, etc.
|
|
1290
|
+
* **Custom methods**: Create domain-specific helper methods like `add_item`, `remove_item`
|
|
1291
|
+
* **No recreation needed**: No need to recreate parent objects to update collections
|
|
1292
|
+
|
|
1293
|
+
NOTE: Empty collections initialized with default values are not serialized unless
|
|
1294
|
+
items are added. This preserves the expected behavior where default values are
|
|
1295
|
+
only rendered when explicitly requested with `render_default: true`.
|
|
1296
|
+
|
|
1297
|
+
==== Ordering
|
|
1298
|
+
|
|
1299
|
+
TODO: This case needs to be fixed.
|
|
1300
|
+
|
|
1301
|
+
Collections that maintain a specific ordering of elements.
|
|
1302
|
+
|
|
1303
|
+
Syntax:
|
|
1304
|
+
|
|
1305
|
+
[source,ruby]
|
|
1306
|
+
----
|
|
1307
|
+
class MyCollection < Lutaml::Model::Collection
|
|
1308
|
+
instances {instances-name}, ModelType
|
|
1309
|
+
ordered by: {attribute-of-instance-or-proc}, order: {:asc | :desc}
|
|
1310
|
+
end
|
|
1311
|
+
----
|
|
1312
|
+
|
|
1313
|
+
Where,
|
|
1314
|
+
|
|
1315
|
+
`{instances-name}`:: name of the instances accessor within the collection
|
|
1316
|
+
`ModelType`:: The model type of the collection elements.
|
|
1317
|
+
|
|
1318
|
+
`{attribute-of-instance-or-proc}`:: How model instances are to be ordered by. Values supported are:
|
|
1319
|
+
`{attribute-of-instance}`::: Attribute name of an instance to be ordered by.
|
|
1320
|
+
`{proc}`::: Proc that returns a value to order by (same as `sort_by`), given the instance as input.
|
|
1321
|
+
|
|
1322
|
+
`order`::: Order direction of the value:
|
|
1323
|
+
`:asc`:::: Ascending order (default).
|
|
1324
|
+
`:desc`:::: Descending order.
|
|
1325
|
+
|
|
1326
|
+
NOTE: When a proc is provided for ordering and `order: :desc` is specified, the collection is first sorted using the proc (as with Ruby's `sort_by`), and the resulting array is then reversed to achieve descending order.
|
|
1327
|
+
|
|
1328
|
+
.Ordered collection applied to a root collection
|
|
1329
|
+
[example]
|
|
1330
|
+
====
|
|
1331
|
+
Data:
|
|
1332
|
+
|
|
1333
|
+
[source,xml]
|
|
1334
|
+
----
|
|
1335
|
+
<items>
|
|
1336
|
+
<item id="3" name="Item Three"/>
|
|
1337
|
+
<item id="1" name="Item One"/>
|
|
1338
|
+
<item id="2" name="Item Two"/>
|
|
1339
|
+
</items>
|
|
1340
|
+
----
|
|
1341
|
+
|
|
1342
|
+
[source,yaml]
|
|
1343
|
+
----
|
|
1344
|
+
---
|
|
1345
|
+
- id: 3
|
|
1346
|
+
name: Item Three
|
|
1347
|
+
- id: 1
|
|
1348
|
+
name: Item One
|
|
1349
|
+
- id: 2
|
|
1350
|
+
name: Item Two
|
|
1351
|
+
----
|
|
1352
|
+
|
|
1353
|
+
[source,ruby]
|
|
1354
|
+
----
|
|
1355
|
+
class Item < Lutaml::Model::Serializable
|
|
1356
|
+
attribute :id, :string
|
|
1357
|
+
attribute :name, :string
|
|
1358
|
+
|
|
1359
|
+
xml do
|
|
1360
|
+
map_attribute "id", to: :id
|
|
1361
|
+
map_attribute "name", to: :name
|
|
1362
|
+
end
|
|
1363
|
+
end
|
|
1364
|
+
|
|
1365
|
+
class OrderedItemCollection < Lutaml::Model::Collection
|
|
1366
|
+
instances :items, Item
|
|
1367
|
+
ordered by: :id, order: :desc
|
|
1368
|
+
|
|
1369
|
+
xml do
|
|
1370
|
+
root "items"
|
|
1371
|
+
map_element "item", to: :items
|
|
1372
|
+
end
|
|
1373
|
+
|
|
1374
|
+
key_value do
|
|
1375
|
+
no_root
|
|
1376
|
+
map_instances to: :items
|
|
1377
|
+
end
|
|
1378
|
+
end
|
|
1379
|
+
----
|
|
1380
|
+
|
|
1381
|
+
[source,ruby]
|
|
1382
|
+
----
|
|
1383
|
+
> collection = OrderedItemCollection.from_xml(xml_data)
|
|
1384
|
+
> collection.map(&:id)
|
|
1385
|
+
> # ["3", "2", "1"]
|
|
1386
|
+
|
|
1387
|
+
> collection = OrderedItemCollection.from_yaml(yaml_data)
|
|
1388
|
+
> collection.map(&:id)
|
|
1389
|
+
> # ["3", "2", "1"]
|
|
1390
|
+
----
|
|
1391
|
+
====
|
|
1392
|
+
|
|
1393
|
+
.Ordered collection with proc-based ordering
|
|
1394
|
+
[example]
|
|
1395
|
+
====
|
|
1396
|
+
[source,ruby]
|
|
1397
|
+
----
|
|
1398
|
+
class ProcOrderedItemCollection < Lutaml::Model::Collection
|
|
1399
|
+
instances :items, Item
|
|
1400
|
+
# Multi-level ordering: first by name length, then by name alphabetically
|
|
1401
|
+
ordered by: ->(item) { [item.name.length, item.name] }, order: :asc
|
|
1402
|
+
|
|
1403
|
+
xml do
|
|
1404
|
+
root "items"
|
|
1405
|
+
map_element "item", to: :items
|
|
1406
|
+
end
|
|
1407
|
+
end
|
|
1408
|
+
----
|
|
1409
|
+
|
|
1410
|
+
[source,ruby]
|
|
1411
|
+
----
|
|
1412
|
+
> items_data = [
|
|
1413
|
+
> { id: "1", name: "Zebra" },
|
|
1414
|
+
> { id: "2", name: "Alpha" },
|
|
1415
|
+
> { id: "3", name: "Beta" }
|
|
1416
|
+
> ]
|
|
1417
|
+
|
|
1418
|
+
> complex_collection = ProcOrderedItemCollection.new(items_data)
|
|
1419
|
+
> complex_collection.map(&:name)
|
|
1420
|
+
> # ["Beta", "Alpha", "Zebra"] # Sorted by name length then alphabetically
|
|
1421
|
+
----
|
|
1422
|
+
====
|
|
1423
|
+
|
|
1424
|
+
|
|
1425
|
+
==== Indexed lookups
|
|
1426
|
+
|
|
1427
|
+
Collections can be indexed for O(1) lookups by one or more attributes.
|
|
1428
|
+
This is particularly useful for large collections where repeated lookups
|
|
1429
|
+
by key would otherwise be O(n).
|
|
1430
|
+
|
|
1431
|
+
===== Single index
|
|
1432
|
+
|
|
1433
|
+
Use `index_by` with a single field for simple indexed lookups:
|
|
1434
|
+
|
|
1435
|
+
[source,ruby]
|
|
1436
|
+
----
|
|
1437
|
+
class Person < Lutaml::Model::Serializable
|
|
1438
|
+
attribute :id, :string
|
|
1439
|
+
attribute :name, :string
|
|
1440
|
+
end
|
|
1441
|
+
|
|
1442
|
+
class PersonCollection < Lutaml::Model::Collection
|
|
1443
|
+
instances :people, Person
|
|
1444
|
+
index_by :id
|
|
1445
|
+
end
|
|
1446
|
+
|
|
1447
|
+
people = PersonCollection.new([
|
|
1448
|
+
{ id: '001', name: 'Alice' },
|
|
1449
|
+
{ id: '002', name: 'Bob' }
|
|
1450
|
+
])
|
|
1451
|
+
|
|
1452
|
+
# O(1) lookup by id
|
|
1453
|
+
people.fetch('001') # => #<Person id='001' name='Alice'>
|
|
1454
|
+
people.find_by(:id, '002') # => #<Person id='002' name='Bob'>
|
|
1455
|
+
people.find_by(:id, 'missing') # => nil
|
|
1456
|
+
----
|
|
1457
|
+
|
|
1458
|
+
===== Multiple indexes
|
|
1459
|
+
|
|
1460
|
+
Use `index_by` with multiple fields for lookups by different keys:
|
|
1461
|
+
|
|
1462
|
+
[source,ruby]
|
|
1463
|
+
----
|
|
1464
|
+
class PersonCollection < Lutaml::Model::Collection
|
|
1465
|
+
instances :people, Person
|
|
1466
|
+
index_by :id, :email, :slug
|
|
1467
|
+
end
|
|
1468
|
+
|
|
1469
|
+
# O(1) lookup by any indexed field
|
|
1470
|
+
people.find_by(:id, '001')
|
|
1471
|
+
people.find_by(:email, 'alice@example.com')
|
|
1472
|
+
people.find_by(:slug, 'alice-smith')
|
|
1473
|
+
----
|
|
1474
|
+
|
|
1475
|
+
===== Named indexes with custom key extraction
|
|
1476
|
+
|
|
1477
|
+
Use `index` with a name and proc for custom key extraction:
|
|
1478
|
+
|
|
1479
|
+
[source,ruby]
|
|
1480
|
+
----
|
|
1481
|
+
class PersonCollection < Lutaml::Model::Collection
|
|
1482
|
+
instances :people, Person
|
|
1483
|
+
index_by :id
|
|
1484
|
+
index :email, by: ->(person) { person.email.downcase }
|
|
1485
|
+
end
|
|
1486
|
+
|
|
1487
|
+
# Lookup with normalized key (proc stores lowercase)
|
|
1488
|
+
people.find_by(:email, 'alice@example.com') # => finds Alice
|
|
1489
|
+
----
|
|
1490
|
+
|
|
1491
|
+
===== Combined with sorting
|
|
1492
|
+
|
|
1493
|
+
Indexes work alongside sorting:
|
|
1494
|
+
|
|
1495
|
+
[source,ruby]
|
|
1496
|
+
----
|
|
1497
|
+
class PersonCollection < Lutaml::Model::Collection
|
|
1498
|
+
instances :people, Person
|
|
1499
|
+
index_by :id
|
|
1500
|
+
sort by: :name, order: :asc
|
|
1501
|
+
end
|
|
1502
|
+
|
|
1503
|
+
# Collection is sorted by name, indexed by id
|
|
1504
|
+
people.fetch('001')
|
|
1505
|
+
----
|
|
1506
|
+
|
|
1507
|
+
NOTE: The index is rebuilt after any mutation (`<<`, `push`, `[]=`).
|
|
1508
|
+
For best performance with large collections, batch mutations before lookups.
|
|
1509
|
+
|
|
1510
|
+
|
|
1511
|
+
==== Polymorphic collections
|
|
1512
|
+
|
|
1513
|
+
Collections can contain instances of different model classes that share a common base class.
|
|
1514
|
+
|
|
1515
|
+
The `polymorphic` option for `instances` allows you to specify which subclasses are accepted:
|
|
1516
|
+
|
|
1517
|
+
[source,ruby]
|
|
1518
|
+
----
|
|
1519
|
+
class ReferenceSet < Lutaml::Model::Collection
|
|
1520
|
+
# Accepts any subclass of Reference
|
|
1521
|
+
instances :references, Reference, polymorphic: true
|
|
1522
|
+
end
|
|
1523
|
+
|
|
1524
|
+
class ReferenceSet < Lutaml::Model::Collection
|
|
1525
|
+
# Accepts only DocumentReference and AnchorReference
|
|
1526
|
+
instances :references, Reference, polymorphic: [
|
|
1527
|
+
DocumentReference,
|
|
1528
|
+
AnchorReference,
|
|
1529
|
+
]
|
|
1530
|
+
end
|
|
1531
|
+
----
|
|
1532
|
+
|
|
1533
|
+
==== Polymorphic collection mapping
|
|
1534
|
+
|
|
1535
|
+
To serialize/deserialize polymorphic collections, use the `polymorphic` option in your mapping blocks. This allows you to specify how to differentiate subclasses in XML, YAML, or JSON.
|
|
1536
|
+
|
|
1537
|
+
[source,ruby]
|
|
1538
|
+
----
|
|
1539
|
+
class ReferenceSet < Lutaml::Model::Collection
|
|
1540
|
+
instances :references, Reference, polymorphic: [
|
|
1541
|
+
DocumentReference,
|
|
1542
|
+
AnchorReference,
|
|
1543
|
+
]
|
|
1544
|
+
|
|
1545
|
+
xml do
|
|
1546
|
+
root "ReferenceSet"
|
|
1547
|
+
map_instances to: :references, polymorphic: {
|
|
1548
|
+
attribute: "_class",
|
|
1549
|
+
class_map: {
|
|
1550
|
+
"document-ref" => "DocumentReference",
|
|
1551
|
+
"anchor-ref" => "AnchorReference",
|
|
1552
|
+
},
|
|
1553
|
+
}
|
|
1554
|
+
end
|
|
1555
|
+
|
|
1556
|
+
key_value do
|
|
1557
|
+
map_instances to: :references, polymorphic: {
|
|
1558
|
+
attribute: "_class",
|
|
1559
|
+
class_map: {
|
|
1560
|
+
"Document" => "DocumentReference",
|
|
1561
|
+
"Anchor" => "AnchorReference",
|
|
1562
|
+
},
|
|
1563
|
+
}
|
|
1564
|
+
end
|
|
1565
|
+
end
|
|
1566
|
+
----
|
|
1567
|
+
|
|
1568
|
+
This allows round-trip serialization like:
|
|
1569
|
+
|
|
1570
|
+
[source,yaml]
|
|
1571
|
+
----
|
|
1572
|
+
---
|
|
1573
|
+
references:
|
|
1574
|
+
- _class: Document
|
|
1575
|
+
name: The Tibetan Book of the Dead
|
|
1576
|
+
document_id: book:tbtd
|
|
1577
|
+
- _class: Anchor
|
|
1578
|
+
name: Chapter 1
|
|
1579
|
+
anchor_id: book:tbtd:anchor-1
|
|
1580
|
+
----
|
|
1581
|
+
|
|
1582
|
+
[source,xml]
|
|
1583
|
+
----
|
|
1584
|
+
<ReferenceSet>
|
|
1585
|
+
<references reference-type="document-ref">
|
|
1586
|
+
<name>The Tibetan Book of the Dead</name>
|
|
1587
|
+
<document_id>book:tbtd</document_id>
|
|
1588
|
+
</references>
|
|
1589
|
+
<references reference-type="anchor-ref">
|
|
1590
|
+
<name>Chapter 1</name>
|
|
1591
|
+
<anchor_id>book:tbtd:anchor-1</anchor_id>
|
|
1592
|
+
</references>
|
|
1593
|
+
</ReferenceSet>
|
|
1594
|
+
----
|
|
1595
|
+
|
|
1596
|
+
==== Polymorphic mapping with subclass differentiator
|
|
1597
|
+
|
|
1598
|
+
If you cannot modify the polymorphic superclass, define the differentiator attribute in each subclass, and use the `polymorphic` mapping option in the collection:
|
|
1599
|
+
|
|
1600
|
+
[source,ruby]
|
|
1601
|
+
----
|
|
1602
|
+
class Reference < Lutaml::Model::Serializable
|
|
1603
|
+
attribute :name, :string
|
|
1604
|
+
end
|
|
1605
|
+
|
|
1606
|
+
class DocumentReference < Reference
|
|
1607
|
+
attribute :_class, :string
|
|
1608
|
+
attribute :document_id, :string
|
|
1609
|
+
|
|
1610
|
+
xml do
|
|
1611
|
+
map_element "document_id", to: :document_id
|
|
1612
|
+
map_attribute "reference-type", to: :_class
|
|
1613
|
+
end
|
|
1614
|
+
|
|
1615
|
+
key_value do
|
|
1616
|
+
map "document_id", to: :document_id
|
|
1617
|
+
map "_class", to: :_class
|
|
1618
|
+
end
|
|
1619
|
+
end
|
|
1620
|
+
|
|
1621
|
+
class AnchorReference < Reference
|
|
1622
|
+
attribute :_class, :string
|
|
1623
|
+
attribute :anchor_id, :string
|
|
1624
|
+
|
|
1625
|
+
xml do
|
|
1626
|
+
map_element "anchor_id", to: :anchor_id
|
|
1627
|
+
map_attribute "reference-type", to: :_class
|
|
1628
|
+
end
|
|
1629
|
+
|
|
1630
|
+
key_value do
|
|
1631
|
+
map "anchor_id", to: :anchor_id
|
|
1632
|
+
map "_class", to: :_class
|
|
1633
|
+
end
|
|
1634
|
+
end
|
|
1635
|
+
|
|
1636
|
+
class ReferenceSet < Lutaml::Model::Collection
|
|
1637
|
+
instances :references, Reference, polymorphic: [
|
|
1638
|
+
DocumentReference,
|
|
1639
|
+
AnchorReference,
|
|
1640
|
+
]
|
|
1641
|
+
|
|
1642
|
+
xml do
|
|
1643
|
+
root "ReferenceSet"
|
|
1644
|
+
map_instances to: :references, polymorphic: {
|
|
1645
|
+
attribute: "_class",
|
|
1646
|
+
class_map: {
|
|
1647
|
+
"document-ref" => "DocumentReference",
|
|
1648
|
+
"anchor-ref" => "AnchorReference",
|
|
1649
|
+
},
|
|
1650
|
+
}
|
|
1651
|
+
end
|
|
1652
|
+
|
|
1653
|
+
key_value do
|
|
1654
|
+
map_instances to: :references, polymorphic: {
|
|
1655
|
+
attribute: "_class",
|
|
1656
|
+
class_map: {
|
|
1657
|
+
"Document" => "DocumentReference",
|
|
1658
|
+
"Anchor" => "AnchorReference",
|
|
1659
|
+
},
|
|
1660
|
+
}
|
|
1661
|
+
end
|
|
1662
|
+
end
|
|
1663
|
+
----
|
|
1664
|
+
|