Class: SvgConform::Compatibility::XmlAnalysisEngine
- Inherits:
-
Object
- Object
- SvgConform::Compatibility::XmlAnalysisEngine
- Defined in:
- lib/svg_conform/compatibility/xml_analysis_engine.rb
Overview
Handles XML-specific analysis operations for embedded SVG elements
Instance Method Summary collapse
- #analyze_file(filename, svgcheck_report) ⇒ Object
-
#initialize(context, file_processor) ⇒ XmlAnalysisEngine
constructor
A new instance of XmlAnalysisEngine.
Constructor Details
#initialize(context, file_processor) ⇒ XmlAnalysisEngine
10 11 12 13 |
# File 'lib/svg_conform/compatibility/xml_analysis_engine.rb', line 10 def initialize(context, file_processor) @context = context @file_processor = file_processor end |
Instance Method Details
#analyze_file(filename, svgcheck_report) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/svg_conform/compatibility/xml_analysis_engine.rb', line 15 def analyze_file(filename, svgcheck_report) input_file = @file_processor.input_file_path(filename) doc = parse_xml_file(input_file) return nil unless doc svg_elements = extract_svg_elements(doc) return nil if svg_elements.empty? display_analysis_header(filename, svg_elements.length) process_svg_elements(svg_elements, filename, svgcheck_report) end |