Class: Lutaml::Xml::TypeNamespaceStrategy
- Inherits:
-
NamespaceResolutionStrategy
- Object
- NamespaceResolutionStrategy
- Lutaml::Xml::TypeNamespaceStrategy
- Defined in:
- lib/lutaml/xml/namespace_resolution_strategy.rb
Overview
Strategy for Type::Value with explicit namespace_class
Used when a custom Type::Value class declares its own namespace via ‘xml { namespace MyNamespace }`. The type’s namespace takes precedence over parent namespace.
Instance Attribute Summary
Attributes inherited from NamespaceResolutionStrategy
#namespace_uri, #prefix, #requires_blank_xmlns, #use_prefix
Instance Method Summary collapse
-
#initialize(type_ns_decl, type_class) ⇒ TypeNamespaceStrategy
constructor
Initialize from type namespace declaration.
Methods inherited from NamespaceResolutionStrategy
Constructor Details
#initialize(type_ns_decl, type_class) ⇒ TypeNamespaceStrategy
Initialize from type namespace declaration
136 137 138 139 140 141 142 |
# File 'lib/lutaml/xml/namespace_resolution_strategy.rb', line 136 def initialize(type_ns_decl, type_class) super( use_prefix: type_ns_decl.prefix_format?, prefix: type_ns_decl.prefix, namespace_uri: type_class.namespace_class.uri ) end |