Class: Moxml::C14n::Inclusive10
- Inherits:
-
Object
- Object
- Moxml::C14n::Inclusive10
- Defined in:
- lib/moxml/c14n/inclusive_10.rb
Overview
Inclusive Canonical XML 1.0 (https://www.w3.org/TR/xml-c14n/)
Unlike exclusive C14N, inclusive C14N "attracts" ancestor context: at the apex element, ALL in-scope namespaces are rendered, including those inherited from ancestors outside the canonicalization subset.
xml:* inheritable attributes (xml:lang, xml:space) are also inherited from the nearest ancestor in which they are declared.
Implementation: delegates to the canon-derived Processor pipeline (DataModel + NamespaceHandler + AttributeHandler + XmlBaseHandler).
Instance Method Summary collapse
-
#canonicalize(node_or_xml, with_comments: false, inclusive_namespaces: []) ⇒ Object
rubocop:disable Lint/UnusedMethodArgument -- signature must match Exclusive.
Instance Method Details
#canonicalize(node_or_xml, with_comments: false, inclusive_namespaces: []) ⇒ Object
rubocop:disable Lint/UnusedMethodArgument -- signature must match Exclusive
18 19 20 21 22 |
# File 'lib/moxml/c14n/inclusive_10.rb', line 18 def canonicalize(node_or_xml, with_comments: false, inclusive_namespaces: []) # rubocop:enable Lint/UnusedMethodArgument root = coerce_to_data_model(node_or_xml) Processor.new(with_comments: with_comments).process(root) end |