class Xlsxrb::Ooxml::XmlParser::AttributeDecoder
Forwards SAX2 events to a listener, decoding entity references in attribute values.
Public Class Methods
(untyped listener) → void
Source
# File lib/xlsxrb/ooxml/xml_parser.rb, line 150 def initialize(listener) @listener = listener @depth = 0 end
Public Instance Methods
(*untyped args) → untyped
Source
# File lib/xlsxrb/ooxml/xml_parser.rb, line 178 def attlistdecl(*args) = @listener.attlistdecl(*args)
(*untyped args) → untyped
Source
# File lib/xlsxrb/ooxml/xml_parser.rb, line 186 def cdata(*args) = @listener.cdata(*args)
(*untyped args) → untyped
Source
# File lib/xlsxrb/ooxml/xml_parser.rb, line 172 def characters(*args) = @listener.characters(*args)
(*untyped args) → untyped
Source
# File lib/xlsxrb/ooxml/xml_parser.rb, line 190 def comment(*args) = @listener.comment(*args)
(*untyped args) → untyped
Source
# File lib/xlsxrb/ooxml/xml_parser.rb, line 176 def doctype(*args) = @listener.doctype(*args)
(*untyped args) → untyped
Source
# File lib/xlsxrb/ooxml/xml_parser.rb, line 180 def elementdecl(*args) = @listener.elementdecl(*args)
(*untyped args) → untyped
Source
# File lib/xlsxrb/ooxml/xml_parser.rb, line 159 def end_document(*args) = @listener.end_document(*args)
(*untyped args) → untyped
Source
# File lib/xlsxrb/ooxml/xml_parser.rb, line 166 def end_element(*args) @depth -= 1 @listener.end_element(*args) end
(*untyped args) → untyped
Source
# File lib/xlsxrb/ooxml/xml_parser.rb, line 163 def end_prefix_mapping(*args) = @listener.end_prefix_mapping(*args)
(*untyped args) → untyped
Source
# File lib/xlsxrb/ooxml/xml_parser.rb, line 182 def entitydecl(*args) = @listener.entitydecl(*args)
(*untyped args) → untyped
Source
# File lib/xlsxrb/ooxml/xml_parser.rb, line 184 def notationdecl(*args) = @listener.notationdecl(*args)
(*untyped args) → untyped
Source
# File lib/xlsxrb/ooxml/xml_parser.rb, line 174 def processing_instruction(*args) = @listener.processing_instruction(*args)
(*untyped args) → untyped
Source
# File lib/xlsxrb/ooxml/xml_parser.rb, line 192 def progress(*args) = @listener.progress(*args)
(*untyped args) → untyped
Source
# File lib/xlsxrb/ooxml/xml_parser.rb, line 157 def start_document(*args) = @listener.start_document(*args)
Plain methods rather than define_method blocks, which Ractors cannot share.
(String? uri, String local_name, String qname, Hash[String, String] attributes) → untyped
Source
# File lib/xlsxrb/ooxml/xml_parser.rb, line 195 def start_element(uri, local_name, qname, attributes) @depth += 1 raise Xlsxrb::ParseError, "Malformed XML: elements are nested more than #{MAX_ELEMENT_DEPTH} levels deep" if @depth > MAX_ELEMENT_DEPTH if attributes.each_value.any? { |value| value.include?("&") } attributes = attributes.transform_values { |value| value.include?("&") ? REXML::Text.unnormalize(value) : value } end @listener.start_element(uri, local_name, qname, attributes) end
(*untyped args) → untyped
Source
# File lib/xlsxrb/ooxml/xml_parser.rb, line 161 def start_prefix_mapping(*args) = @listener.start_prefix_mapping(*args)
(*untyped args) → untyped
Source
# File lib/xlsxrb/ooxml/xml_parser.rb, line 188 def xmldecl(*args) = @listener.xmldecl(*args)