Class: Lutaml::Xml::BlankNamespace
- Defined in:
- lib/lutaml/xml/blank_namespace.rb
Overview
Special namespace class representing the blank namespace (xmlns=“”)
Used when elements explicitly need to opt out of their parent’s default namespace per W3C XML namespace semantics.
When a parent element uses default namespace format (xmlns=“uri”) and a child element should be in the blank namespace, the child must explicitly declare xmlns=“” to prevent inheriting the parent’s default namespace.
Constant Summary
Constants inherited from Namespace
Namespace::W3C_RESERVED_PREFIXES, Namespace::W3C_RESERVED_URIS
Instance Attribute Summary
Attributes inherited from Namespace
#attribute_form_default, #documentation, #element_form_default, #imports, #includes, #prefix, #schema_location, #uri, #version
Class Method Summary collapse
-
.attribute_form_default ⇒ Symbol
Blank namespace has no attribute form default.
-
.element_form_default ⇒ Symbol
Blank namespace is always unqualified.
-
.prefix_default ⇒ nil
Blank namespace has no prefix.
-
.to_key ⇒ String
Unique key for namespace tracking.
Methods inherited from Namespace
all_uris, annotation, #attr_name, #attributes_qualified?, build, documentation, element_form_default_set?, #elements_qualified?, imports, includes, inheritance_strategy, #initialize, is_alias?, #prefixed?, schema_location, skip_w3c_reserved_check, uri, uri_aliases, version
Constructor Details
This class inherits a constructor from Lutaml::Xml::Namespace
Class Method Details
.attribute_form_default ⇒ Symbol
Blank namespace has no attribute form default
46 47 48 |
# File 'lib/lutaml/xml/blank_namespace.rb', line 46 def self.attribute_form_default :unqualified end |
.element_form_default ⇒ Symbol
Blank namespace is always unqualified
39 40 41 |
# File 'lib/lutaml/xml/blank_namespace.rb', line 39 def self.element_form_default :unqualified end |
.prefix_default ⇒ nil
Blank namespace has no prefix
32 33 34 |
# File 'lib/lutaml/xml/blank_namespace.rb', line 32 def self.prefix_default nil end |
.to_key ⇒ String
Returns Unique key for namespace tracking.
25 26 27 |
# File 'lib/lutaml/xml/blank_namespace.rb', line 25 def self.to_key "blank" end |