svg_conform 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.github/workflows/rake.yml +15 -0
- data/.github/workflows/release.yml +23 -0
- data/.github/workflows/svgcheck-compatibility.yml +135 -0
- data/.gitignore +12 -0
- data/.rspec +3 -0
- data/.rubocop.yml +13 -0
- data/.rubocop_todo.yml +183 -0
- data/CODE_OF_CONDUCT.md +132 -0
- data/Gemfile +14 -0
- data/README.adoc +1384 -0
- data/Rakefile +15 -0
- data/config/profiles/base.yml +34 -0
- data/config/profiles/lucid_fix.yml +37 -0
- data/config/profiles/metanorma.yml +212 -0
- data/config/profiles/no_external_css.yml +20 -0
- data/config/profiles/svg_1_2_rfc.yml +284 -0
- data/config/profiles/svg_1_2_rfc_with_rdf.yml +145 -0
- data/config/svgcheck_mapping.yml +180 -0
- data/docs/profiles.adoc +547 -0
- data/docs/rdf_metadata_support.adoc +212 -0
- data/docs/remediation.adoc +732 -0
- data/docs/requirements.adoc +709 -0
- data/examples/demo.rb +116 -0
- data/examples/requirements_demo.rb +240 -0
- data/exe/svg_conform +7 -0
- data/lib/svg_conform/batch_report.rb +70 -0
- data/lib/svg_conform/cli.rb +107 -0
- data/lib/svg_conform/commands/check.rb +390 -0
- data/lib/svg_conform/commands/profiles.rb +118 -0
- data/lib/svg_conform/commands/svgcheck.rb +90 -0
- data/lib/svg_conform/commands/svgcheck_compare.rb +92 -0
- data/lib/svg_conform/commands/svgcheck_compatibility.rb +43 -0
- data/lib/svg_conform/commands/svgcheck_generate.rb +262 -0
- data/lib/svg_conform/compatibility/analysis_context.rb +68 -0
- data/lib/svg_conform/compatibility/comparison_result.rb +147 -0
- data/lib/svg_conform/compatibility/compatibility_analyzer.rb +85 -0
- data/lib/svg_conform/compatibility/file_processor.rb +109 -0
- data/lib/svg_conform/compatibility/pattern_discovery.rb +319 -0
- data/lib/svg_conform/compatibility/report_formatter.rb +359 -0
- data/lib/svg_conform/compatibility/svg_analysis_engine.rb +316 -0
- data/lib/svg_conform/compatibility/validity_analysis.rb +252 -0
- data/lib/svg_conform/compatibility/xml_analysis_engine.rb +198 -0
- data/lib/svg_conform/compatibility_analyzer.rb +285 -0
- data/lib/svg_conform/conformance_report.rb +267 -0
- data/lib/svg_conform/constants.rb +199 -0
- data/lib/svg_conform/css_color.rb +262 -0
- data/lib/svg_conform/document.rb +203 -0
- data/lib/svg_conform/external_checkers/svgcheck/compatibility_engine.rb +166 -0
- data/lib/svg_conform/external_checkers/svgcheck/output_generator.rb +101 -0
- data/lib/svg_conform/external_checkers/svgcheck/parser.rb +200 -0
- data/lib/svg_conform/external_checkers/svgcheck/report_comparator.rb +175 -0
- data/lib/svg_conform/external_checkers/svgcheck/report_generator.rb +82 -0
- data/lib/svg_conform/external_checkers/svgcheck/validation_pipeline.rb +249 -0
- data/lib/svg_conform/external_checkers/svgcheck.rb +56 -0
- data/lib/svg_conform/external_checkers.rb +34 -0
- data/lib/svg_conform/fixer.rb +56 -0
- data/lib/svg_conform/profile.rb +164 -0
- data/lib/svg_conform/profiles.rb +60 -0
- data/lib/svg_conform/remediation_engine.rb +92 -0
- data/lib/svg_conform/remediation_result.rb +36 -0
- data/lib/svg_conform/remediation_runner.rb +225 -0
- data/lib/svg_conform/remediations/base_remediation.rb +165 -0
- data/lib/svg_conform/remediations/color_remediation.rb +226 -0
- data/lib/svg_conform/remediations/font_embedding_remediation.rb +145 -0
- data/lib/svg_conform/remediations/font_remediation.rb +122 -0
- data/lib/svg_conform/remediations/image_embedding_remediation.rb +154 -0
- data/lib/svg_conform/remediations/invalid_id_references_remediation.rb +129 -0
- data/lib/svg_conform/remediations/namespace_attribute_remediation.rb +244 -0
- data/lib/svg_conform/remediations/namespace_remediation.rb +151 -0
- data/lib/svg_conform/remediations/no_external_css_remediation.rb +192 -0
- data/lib/svg_conform/remediations/style_promotion_remediation.rb +93 -0
- data/lib/svg_conform/remediations/viewbox_remediation.rb +127 -0
- data/lib/svg_conform/remediations.rb +40 -0
- data/lib/svg_conform/report_comparator.rb +772 -0
- data/lib/svg_conform/requirements/allowed_elements_requirement.rb +367 -0
- data/lib/svg_conform/requirements/base_requirement.rb +98 -0
- data/lib/svg_conform/requirements/color_restrictions_requirement.rb +126 -0
- data/lib/svg_conform/requirements/element_requirement_config.rb +75 -0
- data/lib/svg_conform/requirements/font_family_requirement.rb +133 -0
- data/lib/svg_conform/requirements/forbidden_content_requirement.rb +60 -0
- data/lib/svg_conform/requirements/id_reference_requirement.rb +133 -0
- data/lib/svg_conform/requirements/invalid_id_references_requirement.rb +132 -0
- data/lib/svg_conform/requirements/link_validation_requirement.rb +55 -0
- data/lib/svg_conform/requirements/namespace_attributes_requirement.rb +211 -0
- data/lib/svg_conform/requirements/namespace_requirement.rb +294 -0
- data/lib/svg_conform/requirements/no_external_css_requirement.rb +132 -0
- data/lib/svg_conform/requirements/no_external_fonts_requirement.rb +121 -0
- data/lib/svg_conform/requirements/no_external_images_requirement.rb +91 -0
- data/lib/svg_conform/requirements/style_promotion_requirement.rb +72 -0
- data/lib/svg_conform/requirements/style_requirement.rb +226 -0
- data/lib/svg_conform/requirements/viewbox_required_requirement.rb +96 -0
- data/lib/svg_conform/requirements.rb +49 -0
- data/lib/svg_conform/semantic_comparator.rb +829 -0
- data/lib/svg_conform/validation_context.rb +408 -0
- data/lib/svg_conform/validation_result.rb +146 -0
- data/lib/svg_conform/validator.rb +91 -0
- data/lib/svg_conform/version.rb +5 -0
- data/lib/svg_conform.rb +68 -0
- data/lib/tasks/fixtures.rake +321 -0
- data/lib/tasks/svgcheck.rake +111 -0
- data/reference-docs/SVG-1.2-RFC.rnc.txt +1676 -0
- data/reference-docs/Scalable Vector Graphics (SVG) 1.1 (Second Edition).html +40764 -0
- data/reference-docs/Scalable Vector Graphics (SVG) Tiny 1.2 Specification.html +44591 -0
- data/reference-docs/rfc7996.txt +2971 -0
- data/sig/svg_conform.rbs +4 -0
- data/spec/fixtures/allowed_elements/inputs/basic_violations.svg +21 -0
- data/spec/fixtures/allowed_elements/repair/basic_violations.svg +18 -0
- data/spec/fixtures/color_restrictions/inputs/basic_violations.svg +23 -0
- data/spec/fixtures/color_restrictions/repair/basic_violations.svg +23 -0
- data/spec/fixtures/comprehensive/inputs/multiple_violations.svg +21 -0
- data/spec/fixtures/comprehensive/repair/multiple_violations.svg +16 -0
- data/spec/fixtures/font_family/inputs/basic_violations.svg +17 -0
- data/spec/fixtures/font_family/repair/basic_violations.svg +17 -0
- data/spec/fixtures/forbidden_content/inputs/basic_violations.svg +27 -0
- data/spec/fixtures/forbidden_content/repair/basic_violations.svg +19 -0
- data/spec/fixtures/id_reference/inputs/basic_violations.svg +17 -0
- data/spec/fixtures/id_reference/repair/basic_violations.svg +15 -0
- data/spec/fixtures/link_validation/inputs/basic_violations.svg +20 -0
- data/spec/fixtures/link_validation/repair/basic_violations.svg +16 -0
- data/spec/fixtures/lucid/inputs/simple.svg +67 -0
- data/spec/fixtures/lucid/repair/simple.svg +63 -0
- data/spec/fixtures/namespace/inputs/basic_violations.svg +20 -0
- data/spec/fixtures/namespace/repair/basic_violations.svg +17 -0
- data/spec/fixtures/namespace_attributes/inputs/basic_violations.svg +16 -0
- data/spec/fixtures/namespace_attributes/repair/basic_violations.svg +15 -0
- data/spec/fixtures/no_external_css/inputs/basic_violations.svg +20 -0
- data/spec/fixtures/no_external_css/repair/basic_violations.svg +18 -0
- data/spec/fixtures/style/inputs/basic_violations.svg +22 -0
- data/spec/fixtures/style/repair/basic_violations.svg +22 -0
- data/spec/fixtures/style_promotion/inputs/basic_test.svg +15 -0
- data/spec/fixtures/style_promotion/repair/basic_test.svg +15 -0
- data/spec/fixtures/svg_1_2_rfc/inputs/allowed_elements_violations.svg +18 -0
- data/spec/fixtures/svg_1_2_rfc/inputs/color_restrictions_violations.svg +23 -0
- data/spec/fixtures/svgcheck/check/DrawBerry-sample-2.svg.code +1 -0
- data/spec/fixtures/svgcheck/check/DrawBerry-sample-2.svg.err +0 -0
- data/spec/fixtures/svgcheck/check/DrawBerry-sample-2.svg.out +23 -0
- data/spec/fixtures/svgcheck/check/IETF-test.svg.code +1 -0
- data/spec/fixtures/svgcheck/check/IETF-test.svg.err +0 -0
- data/spec/fixtures/svgcheck/check/IETF-test.svg.out +20 -0
- data/spec/fixtures/svgcheck/check/circle.svg.code +1 -0
- data/spec/fixtures/svgcheck/check/circle.svg.err +0 -0
- data/spec/fixtures/svgcheck/check/circle.svg.out +2 -0
- data/spec/fixtures/svgcheck/check/colors.svg.code +1 -0
- data/spec/fixtures/svgcheck/check/colors.svg.err +0 -0
- data/spec/fixtures/svgcheck/check/colors.svg.out +13 -0
- data/spec/fixtures/svgcheck/check/dia-sample-svg.svg.code +1 -0
- data/spec/fixtures/svgcheck/check/dia-sample-svg.svg.err +0 -0
- data/spec/fixtures/svgcheck/check/dia-sample-svg.svg.out +76 -0
- data/spec/fixtures/svgcheck/check/example-dot.svg.code +1 -0
- data/spec/fixtures/svgcheck/check/example-dot.svg.err +0 -0
- data/spec/fixtures/svgcheck/check/example-dot.svg.out +11 -0
- data/spec/fixtures/svgcheck/check/full-tiny.svg.code +1 -0
- data/spec/fixtures/svgcheck/check/full-tiny.svg.err +0 -0
- data/spec/fixtures/svgcheck/check/full-tiny.svg.out +5835 -0
- data/spec/fixtures/svgcheck/check/good.svg.code +1 -0
- data/spec/fixtures/svgcheck/check/good.svg.err +0 -0
- data/spec/fixtures/svgcheck/check/good.svg.out +1 -0
- data/spec/fixtures/svgcheck/check/httpbis-proxy20-fig6.svg.code +1 -0
- data/spec/fixtures/svgcheck/check/httpbis-proxy20-fig6.svg.err +0 -0
- data/spec/fixtures/svgcheck/check/httpbis-proxy20-fig6.svg.out +5 -0
- data/spec/fixtures/svgcheck/check/malformed.svg.code +1 -0
- data/spec/fixtures/svgcheck/check/malformed.svg.err +0 -0
- data/spec/fixtures/svgcheck/check/malformed.svg.out +8 -0
- data/spec/fixtures/svgcheck/check/rfc-svg.svg.code +1 -0
- data/spec/fixtures/svgcheck/check/rfc-svg.svg.err +0 -0
- data/spec/fixtures/svgcheck/check/rfc-svg.svg.out +1 -0
- data/spec/fixtures/svgcheck/check/rfc.xml.code +1 -0
- data/spec/fixtures/svgcheck/check/rfc.xml.err +0 -0
- data/spec/fixtures/svgcheck/check/rfc.xml.out +2 -0
- data/spec/fixtures/svgcheck/check/rgb.svg.code +1 -0
- data/spec/fixtures/svgcheck/check/rgb.svg.err +0 -0
- data/spec/fixtures/svgcheck/check/rgb.svg.out +9 -0
- data/spec/fixtures/svgcheck/check/svg-wordle.svg.code +1 -0
- data/spec/fixtures/svgcheck/check/svg-wordle.svg.err +0 -0
- data/spec/fixtures/svgcheck/check/svg-wordle.svg.out +508 -0
- data/spec/fixtures/svgcheck/check/threshold.svg.code +1 -0
- data/spec/fixtures/svgcheck/check/threshold.svg.err +0 -0
- data/spec/fixtures/svgcheck/check/threshold.svg.out +20 -0
- data/spec/fixtures/svgcheck/check/utf8.svg.code +1 -0
- data/spec/fixtures/svgcheck/check/utf8.svg.err +0 -0
- data/spec/fixtures/svgcheck/check/utf8.svg.out +162 -0
- data/spec/fixtures/svgcheck/check/viewBox-both.svg.code +1 -0
- data/spec/fixtures/svgcheck/check/viewBox-both.svg.err +0 -0
- data/spec/fixtures/svgcheck/check/viewBox-both.svg.out +4 -0
- data/spec/fixtures/svgcheck/check/viewBox-height.svg.code +1 -0
- data/spec/fixtures/svgcheck/check/viewBox-height.svg.err +0 -0
- data/spec/fixtures/svgcheck/check/viewBox-height.svg.out +3 -0
- data/spec/fixtures/svgcheck/check/viewBox-none.svg.code +1 -0
- data/spec/fixtures/svgcheck/check/viewBox-none.svg.err +0 -0
- data/spec/fixtures/svgcheck/check/viewBox-none.svg.out +3 -0
- data/spec/fixtures/svgcheck/check/viewBox-width.svg.code +1 -0
- data/spec/fixtures/svgcheck/check/viewBox-width.svg.err +0 -0
- data/spec/fixtures/svgcheck/check/viewBox-width.svg.out +3 -0
- data/spec/fixtures/svgcheck/inputs/DrawBerry-sample-2.svg +28 -0
- data/spec/fixtures/svgcheck/inputs/IETF-test.svg +28 -0
- data/spec/fixtures/svgcheck/inputs/circle.svg +3 -0
- data/spec/fixtures/svgcheck/inputs/colors.svg +18 -0
- data/spec/fixtures/svgcheck/inputs/dia-sample-svg.svg +47 -0
- data/spec/fixtures/svgcheck/inputs/example-dot.svg +75 -0
- data/spec/fixtures/svgcheck/inputs/full-tiny.svg +16194 -0
- data/spec/fixtures/svgcheck/inputs/good.svg +19 -0
- data/spec/fixtures/svgcheck/inputs/httpbis-proxy20-fig6.svg +2 -0
- data/spec/fixtures/svgcheck/inputs/malformed.svg +11 -0
- data/spec/fixtures/svgcheck/inputs/rfc-svg.svg +1028 -0
- data/spec/fixtures/svgcheck/inputs/rfc.xml +37 -0
- data/spec/fixtures/svgcheck/inputs/rgb.svg +9 -0
- data/spec/fixtures/svgcheck/inputs/svg-wordle.svg +330 -0
- data/spec/fixtures/svgcheck/inputs/threshold.svg +26 -0
- data/spec/fixtures/svgcheck/inputs/utf8.svg +448 -0
- data/spec/fixtures/svgcheck/inputs/viewBox-both.svg +3 -0
- data/spec/fixtures/svgcheck/inputs/viewBox-height.svg +3 -0
- data/spec/fixtures/svgcheck/inputs/viewBox-none.svg +3 -0
- data/spec/fixtures/svgcheck/inputs/viewBox-width.svg +3 -0
- data/spec/fixtures/svgcheck/repair/DrawBerry-sample-2.svg.code +1 -0
- data/spec/fixtures/svgcheck/repair/DrawBerry-sample-2.svg.err +0 -0
- data/spec/fixtures/svgcheck/repair/DrawBerry-sample-2.svg.file +0 -0
- data/spec/fixtures/svgcheck/repair/DrawBerry-sample-2.svg.out +23 -0
- data/spec/fixtures/svgcheck/repair/IETF-test.svg.code +1 -0
- data/spec/fixtures/svgcheck/repair/IETF-test.svg.err +0 -0
- data/spec/fixtures/svgcheck/repair/IETF-test.svg.file +29 -0
- data/spec/fixtures/svgcheck/repair/IETF-test.svg.out +20 -0
- data/spec/fixtures/svgcheck/repair/circle.svg.code +1 -0
- data/spec/fixtures/svgcheck/repair/circle.svg.err +0 -0
- data/spec/fixtures/svgcheck/repair/circle.svg.file +4 -0
- data/spec/fixtures/svgcheck/repair/circle.svg.out +2 -0
- data/spec/fixtures/svgcheck/repair/colors.svg.code +1 -0
- data/spec/fixtures/svgcheck/repair/colors.svg.err +0 -0
- data/spec/fixtures/svgcheck/repair/colors.svg.file +19 -0
- data/spec/fixtures/svgcheck/repair/colors.svg.out +13 -0
- data/spec/fixtures/svgcheck/repair/dia-sample-svg.svg.code +1 -0
- data/spec/fixtures/svgcheck/repair/dia-sample-svg.svg.err +0 -0
- data/spec/fixtures/svgcheck/repair/dia-sample-svg.svg.file +47 -0
- data/spec/fixtures/svgcheck/repair/dia-sample-svg.svg.out +76 -0
- data/spec/fixtures/svgcheck/repair/example-dot.svg.code +1 -0
- data/spec/fixtures/svgcheck/repair/example-dot.svg.err +0 -0
- data/spec/fixtures/svgcheck/repair/example-dot.svg.file +69 -0
- data/spec/fixtures/svgcheck/repair/example-dot.svg.out +11 -0
- data/spec/fixtures/svgcheck/repair/good.svg.code +1 -0
- data/spec/fixtures/svgcheck/repair/good.svg.err +0 -0
- data/spec/fixtures/svgcheck/repair/good.svg.file +0 -0
- data/spec/fixtures/svgcheck/repair/good.svg.out +1 -0
- data/spec/fixtures/svgcheck/repair/httpbis-proxy20-fig6.svg.code +1 -0
- data/spec/fixtures/svgcheck/repair/httpbis-proxy20-fig6.svg.err +0 -0
- data/spec/fixtures/svgcheck/repair/httpbis-proxy20-fig6.svg.file +73 -0
- data/spec/fixtures/svgcheck/repair/httpbis-proxy20-fig6.svg.out +5 -0
- data/spec/fixtures/svgcheck/repair/malformed.svg.code +1 -0
- data/spec/fixtures/svgcheck/repair/malformed.svg.err +0 -0
- data/spec/fixtures/svgcheck/repair/malformed.svg.file +9 -0
- data/spec/fixtures/svgcheck/repair/malformed.svg.out +8 -0
- data/spec/fixtures/svgcheck/repair/rfc-svg.svg.code +1 -0
- data/spec/fixtures/svgcheck/repair/rfc-svg.svg.err +0 -0
- data/spec/fixtures/svgcheck/repair/rfc-svg.svg.file +0 -0
- data/spec/fixtures/svgcheck/repair/rfc-svg.svg.out +1 -0
- data/spec/fixtures/svgcheck/repair/rfc.xml.code +1 -0
- data/spec/fixtures/svgcheck/repair/rfc.xml.err +0 -0
- data/spec/fixtures/svgcheck/repair/rfc.xml.file +37 -0
- data/spec/fixtures/svgcheck/repair/rfc.xml.out +2 -0
- data/spec/fixtures/svgcheck/repair/rgb.svg.code +1 -0
- data/spec/fixtures/svgcheck/repair/rgb.svg.err +0 -0
- data/spec/fixtures/svgcheck/repair/rgb.svg.file +10 -0
- data/spec/fixtures/svgcheck/repair/rgb.svg.out +9 -0
- data/spec/fixtures/svgcheck/repair/svg-wordle.svg.code +1 -0
- data/spec/fixtures/svgcheck/repair/svg-wordle.svg.err +0 -0
- data/spec/fixtures/svgcheck/repair/svg-wordle.svg.file +112 -0
- data/spec/fixtures/svgcheck/repair/svg-wordle.svg.out +508 -0
- data/spec/fixtures/svgcheck/repair/threshold.svg.code +1 -0
- data/spec/fixtures/svgcheck/repair/threshold.svg.err +0 -0
- data/spec/fixtures/svgcheck/repair/threshold.svg.file +27 -0
- data/spec/fixtures/svgcheck/repair/threshold.svg.out +20 -0
- data/spec/fixtures/svgcheck/repair/utf8.svg.code +1 -0
- data/spec/fixtures/svgcheck/repair/utf8.svg.err +0 -0
- data/spec/fixtures/svgcheck/repair/utf8.svg.file +381 -0
- data/spec/fixtures/svgcheck/repair/utf8.svg.out +162 -0
- data/spec/fixtures/svgcheck/repair/viewBox-both.svg.code +1 -0
- data/spec/fixtures/svgcheck/repair/viewBox-both.svg.err +0 -0
- data/spec/fixtures/svgcheck/repair/viewBox-both.svg.file +4 -0
- data/spec/fixtures/svgcheck/repair/viewBox-both.svg.out +4 -0
- data/spec/fixtures/svgcheck/repair/viewBox-height.svg.code +1 -0
- data/spec/fixtures/svgcheck/repair/viewBox-height.svg.err +0 -0
- data/spec/fixtures/svgcheck/repair/viewBox-height.svg.file +4 -0
- data/spec/fixtures/svgcheck/repair/viewBox-height.svg.out +3 -0
- data/spec/fixtures/svgcheck/repair/viewBox-none.svg.code +1 -0
- data/spec/fixtures/svgcheck/repair/viewBox-none.svg.err +0 -0
- data/spec/fixtures/svgcheck/repair/viewBox-none.svg.file +4 -0
- data/spec/fixtures/svgcheck/repair/viewBox-none.svg.out +3 -0
- data/spec/fixtures/svgcheck/repair/viewBox-width.svg.code +1 -0
- data/spec/fixtures/svgcheck/repair/viewBox-width.svg.err +0 -0
- data/spec/fixtures/svgcheck/repair/viewBox-width.svg.file +4 -0
- data/spec/fixtures/svgcheck/repair/viewBox-width.svg.out +3 -0
- data/spec/fixtures/viewbox_required/inputs/missing_viewbox.svg +10 -0
- data/spec/fixtures/viewbox_required/repair/missing_viewbox.svg +10 -0
- data/spec/spec_helper.rb +16 -0
- data/spec/svg_conform/batch_report_spec.rb +99 -0
- data/spec/svg_conform/commands/check_command_spec.rb +90 -0
- data/spec/svg_conform/commands/profiles_command_spec.rb +20 -0
- data/spec/svg_conform/commands/svgcheck_compare_command_spec.rb +13 -0
- data/spec/svg_conform/commands/svgcheck_compatibility_command_spec.rb +13 -0
- data/spec/svg_conform/commands/svgcheck_generate_command_spec.rb +14 -0
- data/spec/svg_conform/profiles/base_profile_spec.rb +42 -0
- data/spec/svg_conform/profiles/lucid_fix_profile_spec.rb +46 -0
- data/spec/svg_conform/profiles/lucid_profile_spec.rb +84 -0
- data/spec/svg_conform/profiles/metanorma_profile_spec.rb +62 -0
- data/spec/svg_conform/profiles/no_external_css_profile_spec.rb +66 -0
- data/spec/svg_conform/profiles/svg_1_2_rfc_profile_spec.rb +200 -0
- data/spec/svg_conform/profiles/svg_1_2_rfc_with_rdf_profile_spec.rb +81 -0
- data/spec/svg_conform/remediations/color_remediation_spec.rb +95 -0
- data/spec/svg_conform/remediations/font_embedding_remediation_spec.rb +20 -0
- data/spec/svg_conform/remediations/font_remediation_spec.rb +95 -0
- data/spec/svg_conform/remediations/image_embedding_remediation_spec.rb +20 -0
- data/spec/svg_conform/remediations/invalid_id_references_remediation_spec.rb +97 -0
- data/spec/svg_conform/remediations/namespace_attribute_remediation_spec.rb +97 -0
- data/spec/svg_conform/remediations/namespace_remediation_spec.rb +95 -0
- data/spec/svg_conform/remediations/no_external_css_remediation_spec.rb +97 -0
- data/spec/svg_conform/remediations/style_promotion_remediation_spec.rb +97 -0
- data/spec/svg_conform/remediations/viewbox_remediation_spec.rb +95 -0
- data/spec/svg_conform/requirements/allowed_elements_requirement_spec.rb +118 -0
- data/spec/svg_conform/requirements/color_restrictions_requirement_spec.rb +168 -0
- data/spec/svg_conform/requirements/font_family_requirement_spec.rb +188 -0
- data/spec/svg_conform/requirements/forbidden_content_requirement_spec.rb +195 -0
- data/spec/svg_conform/requirements/id_reference_requirement_spec.rb +78 -0
- data/spec/svg_conform/requirements/invalid_id_references_requirement_spec.rb +78 -0
- data/spec/svg_conform/requirements/link_validation_requirement_spec.rb +78 -0
- data/spec/svg_conform/requirements/namespace_attributes_requirement_spec.rb +86 -0
- data/spec/svg_conform/requirements/namespace_requirement_spec.rb +184 -0
- data/spec/svg_conform/requirements/no_external_css_requirement_spec.rb +78 -0
- data/spec/svg_conform/requirements/no_external_fonts_requirement_spec.rb +20 -0
- data/spec/svg_conform/requirements/no_external_images_requirement_spec.rb +20 -0
- data/spec/svg_conform/requirements/style_promotion_requirement_spec.rb +78 -0
- data/spec/svg_conform/requirements/style_requirement_spec.rb +76 -0
- data/spec/svg_conform/requirements/viewbox_required_requirement_spec.rb +165 -0
- data/spec/svg_conform_spec.rb +32 -0
- data/spec/svgcheck_compatibility_spec.rb +355 -0
- data/svg_conform.gemspec +35 -0
- metadata +436 -0
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
name: "svg_1_2_rfc_with_rdf"
|
|
2
|
+
description: "SVG 1.2 RFC Profile with RDF metadata support - Allows RDF/Dublin Core metadata in SVG files"
|
|
3
|
+
|
|
4
|
+
requirements:
|
|
5
|
+
# RFC 7996 Section 2.1: Elements, Properties, and Attributes Allowed in SVG 1.2 RFC
|
|
6
|
+
- id: "allowed_elements"
|
|
7
|
+
type: "AllowedElementsRequirement"
|
|
8
|
+
description: "Validates allowed SVG elements and attributes per RFC 7996 Section 2.1"
|
|
9
|
+
skip_foreign_namespaces: true
|
|
10
|
+
allow_rdf_metadata: true # Enable RDF metadata support
|
|
11
|
+
allowed_namespaces:
|
|
12
|
+
- "http://www.w3.org/2000/svg"
|
|
13
|
+
- "" # Default namespace (no prefix)
|
|
14
|
+
element_configs:
|
|
15
|
+
# Same as svg_1_2_rfc profile - Direct encoding from svgcheck word_properties.py
|
|
16
|
+
- tag: "svg"
|
|
17
|
+
attributes: ["version", "baseProfile", "width", "viewBox", "preserveAspectRatio", "snapshotTime", "height", "id", "role", "break", "color-rendering", "fill-rule"]
|
|
18
|
+
required_attributes: ["version", "baseProfile"]
|
|
19
|
+
attribute_values:
|
|
20
|
+
version: ["1.2"]
|
|
21
|
+
baseProfile: ["tiny"]
|
|
22
|
+
allowed_children: ["title", "path", "rect", "circle", "line", "ellipse", "polyline", "polygon", "solidColor", "textArea", "text", "g", "defs", "use", "a", "tspan", "desc"]
|
|
23
|
+
- tag: "desc"
|
|
24
|
+
attributes: ["id", "role", "shape-rendering", "text-rendering", "buffered-rendering", "visibility", "base", "lang", "class", "rel", "rev", "typeof", "content", "datatype", "resource", "about", "property", "space", "fill-rule"]
|
|
25
|
+
allowed_children: ["text"]
|
|
26
|
+
- tag: "title"
|
|
27
|
+
attributes: ["id", "role", "shape-rendering", "text-rendering", "buffered-rendering", "visibility", "base", "lang", "class", "rel", "rev", "typeof", "content", "datatype", "resource", "about", "property", "space", "fill-rule"]
|
|
28
|
+
allowed_children: ["text"]
|
|
29
|
+
- tag: "path"
|
|
30
|
+
attributes: ["d", "pathLength", "stroke-miterlimit", "id", "role", "fill", "style", "transform", "font-size", "fill-rule", "base", "lang", "class", "rel", "rev", "typeof", "content", "datatype", "resource", "about", "property", "space"]
|
|
31
|
+
allowed_children: ["title", "desc"]
|
|
32
|
+
- tag: "rect"
|
|
33
|
+
attributes: ["x", "y", "width", "height", "rx", "ry", "stroke-miterlimit", "id", "role", "fill", "style", "transform", "fill-rule", "base", "lang", "class", "rel", "rev", "typeof", "content", "datatype", "resource", "about", "property", "space"]
|
|
34
|
+
allowed_children: ["title", "desc"]
|
|
35
|
+
- tag: "circle"
|
|
36
|
+
attributes: ["cx", "cy", "r", "id", "role", "fill", "style", "transform", "fill-rule", "base", "lang", "class", "rel", "rev", "typeof", "content", "datatype", "resource", "about", "property", "space"]
|
|
37
|
+
allowed_children: ["title", "desc"]
|
|
38
|
+
- tag: "line"
|
|
39
|
+
attributes: ["x1", "y1", "x2", "y2", "id", "role", "fill", "transform", "fill-rule", "base", "lang", "class", "rel", "rev", "typeof", "content", "datatype", "resource", "about", "property", "space"]
|
|
40
|
+
allowed_children: ["title", "desc"]
|
|
41
|
+
- tag: "ellipse"
|
|
42
|
+
attributes: ["cx", "cy", "rx", "ry", "id", "role", "fill", "style", "transform", "fill-rule", "base", "lang", "class", "rel", "rev", "typeof", "content", "datatype", "resource", "about", "property", "space"]
|
|
43
|
+
allowed_children: ["title", "desc"]
|
|
44
|
+
- tag: "polyline"
|
|
45
|
+
attributes: ["points", "id", "role", "fill", "transform", "fill-rule", "base", "lang", "class", "rel", "rev", "typeof", "content", "datatype", "resource", "about", "property", "space"]
|
|
46
|
+
allowed_children: ["title", "desc"]
|
|
47
|
+
- tag: "polygon"
|
|
48
|
+
attributes: ["points", "id", "role", "fill", "style", "transform", "fill-rule", "base", "lang", "class", "rel", "rev", "typeof", "content", "datatype", "resource", "about", "property", "space"]
|
|
49
|
+
allowed_children: ["title", "desc"]
|
|
50
|
+
- tag: "solidColor"
|
|
51
|
+
attributes: ["id", "role", "fill", "fill-rule", "base", "lang", "class", "rel", "rev", "typeof", "content", "datatype", "resource", "about", "property", "space"]
|
|
52
|
+
allowed_children: ["title", "desc"]
|
|
53
|
+
- tag: "textArea"
|
|
54
|
+
attributes: ["x", "y", "width", "height", "auto", "id", "role", "fill", "transform", "fill-rule", "base", "lang", "class", "rel", "rev", "typeof", "content", "datatype", "resource", "about", "property", "space"]
|
|
55
|
+
allowed_children: ["desc", "title", "tspan", "text", "a"]
|
|
56
|
+
- tag: "text"
|
|
57
|
+
attributes: ["x", "y", "rotate", "id", "role", "fill", "style", "transform", "font-size", "fill-rule", "base", "lang", "class", "rel", "rev", "typeof", "content", "datatype", "resource", "about", "property", "space"]
|
|
58
|
+
allowed_children: ["desc", "title", "tspan", "text", "a"]
|
|
59
|
+
- tag: "g"
|
|
60
|
+
attributes: ["label", "class", "id", "role", "fill", "style", "transform", "fill-rule", "visibility", "base", "lang", "rel", "rev", "typeof", "content", "datatype", "resource", "about", "property", "space"]
|
|
61
|
+
allowed_children: ["title", "path", "rect", "circle", "line", "ellipse", "polyline", "polygon", "solidColor", "textArea", "text", "g", "defs", "use", "a", "tspan", "desc"]
|
|
62
|
+
- tag: "defs"
|
|
63
|
+
attributes: ["id", "role", "fill", "fill-rule", "base", "lang", "class", "rel", "rev", "typeof", "content", "datatype", "resource", "about", "property", "space"]
|
|
64
|
+
allowed_children: ["title", "path", "rect", "circle", "line", "ellipse", "polyline", "polygon", "solidColor", "textArea", "text", "g", "defs", "use", "a", "tspan", "desc"]
|
|
65
|
+
- tag: "use"
|
|
66
|
+
attributes: ["x", "y", "href", "xlink:href", "id", "role", "fill", "transform", "fill-rule", "base", "lang", "class", "rel", "rev", "typeof", "content", "datatype", "resource", "about", "property", "space"]
|
|
67
|
+
allowed_children: ["title", "desc"]
|
|
68
|
+
- tag: "a"
|
|
69
|
+
attributes: ["id", "role", "fill", "transform", "fill-rule", "target", "base", "lang", "class", "rel", "rev", "typeof", "content", "datatype", "resource", "about", "property", "space"]
|
|
70
|
+
allowed_children: ["title", "path", "rect", "circle", "line", "ellipse", "polyline", "polygon", "solidColor", "textArea", "text", "g", "defs", "use", "a", "tspan", "desc"]
|
|
71
|
+
- tag: "tspan"
|
|
72
|
+
attributes: ["x", "y", "id", "role", "fill", "fill-rule", "base", "lang", "class", "rel", "rev", "typeof", "content", "datatype", "resource", "about", "property", "space"]
|
|
73
|
+
allowed_children: ["desc", "title", "tspan", "text", "a", "tbreak"]
|
|
74
|
+
- tag: "tbreak"
|
|
75
|
+
attributes: ["id", "role", "base", "lang", "class", "rel", "rev", "typeof", "content", "datatype", "resource", "about", "property", "space"]
|
|
76
|
+
check_attributes: true
|
|
77
|
+
check_invalid_attributes: true
|
|
78
|
+
check_parent_child: true
|
|
79
|
+
|
|
80
|
+
# RFC 7996 Section 2.1: Namespace restrictions - only SVG namespace allowed
|
|
81
|
+
- id: "namespace_validation"
|
|
82
|
+
type: "NamespaceRequirement"
|
|
83
|
+
description: "Only allows SVG namespace elements per RFC 7996 Section 2.1 with RDF support"
|
|
84
|
+
allow_rdf_metadata: true # Enable RDF metadata support
|
|
85
|
+
allowed_namespaces:
|
|
86
|
+
- "http://www.w3.org/2000/svg"
|
|
87
|
+
- "" # Default namespace (no prefix)
|
|
88
|
+
|
|
89
|
+
# RFC 7996 Section 2.1: Namespace attribute restrictions
|
|
90
|
+
- id: "namespace_attributes"
|
|
91
|
+
type: "NamespaceAttributesRequirement"
|
|
92
|
+
description: "Only allows attributes from SVG, XLink, and XML namespaces per RFC 7996 Section 2.1"
|
|
93
|
+
allowed_namespaces:
|
|
94
|
+
- "http://www.w3.org/2000/svg"
|
|
95
|
+
- "http://www.w3.org/1999/xlink"
|
|
96
|
+
- "http://www.w3.org/XML/1998/namespace"
|
|
97
|
+
- ""
|
|
98
|
+
exempt_elements:
|
|
99
|
+
- "RDF"
|
|
100
|
+
- "Work"
|
|
101
|
+
- "format"
|
|
102
|
+
- "type"
|
|
103
|
+
- "title"
|
|
104
|
+
- "creator"
|
|
105
|
+
- "description"
|
|
106
|
+
|
|
107
|
+
- id: "color_restrictions"
|
|
108
|
+
type: "ColorRestrictionsRequirement"
|
|
109
|
+
description: "Restricts colors to black and white only"
|
|
110
|
+
mode: "black_white_only"
|
|
111
|
+
allowed_colors: ["black", "white", "#000000", "#ffffff", "#FFFFFF", "none", "inherit", "currentColor"]
|
|
112
|
+
black_and_white_threshold: 764
|
|
113
|
+
|
|
114
|
+
- id: "font_family"
|
|
115
|
+
type: "FontFamilyRequirement"
|
|
116
|
+
description: "Restricts font families to generic families"
|
|
117
|
+
allowed_families: ["serif", "sans-serif", "monospace", "inherit"]
|
|
118
|
+
|
|
119
|
+
- id: "viewbox_required"
|
|
120
|
+
type: "ViewboxRequiredRequirement"
|
|
121
|
+
description: "Requires viewBox attribute on root SVG element"
|
|
122
|
+
|
|
123
|
+
- id: "forbidden_content"
|
|
124
|
+
type: "ForbiddenContentRequirement"
|
|
125
|
+
description: "Prohibits multimedia, animation, scripting content"
|
|
126
|
+
forbidden_elements: ["script", "audio", "video", "animation", "animateColor", "animateMotion", "animateTransform", "set"]
|
|
127
|
+
forbidden_attributes: ["onload", "onclick", "onmouseover", "onmouseout", "onfocus", "onblur", "onkeydown", "onkeyup", "onkeypress"]
|
|
128
|
+
|
|
129
|
+
remediations:
|
|
130
|
+
- id: "color_conversion"
|
|
131
|
+
type: "ColorRemediation"
|
|
132
|
+
description: "Convert colors to black and white"
|
|
133
|
+
targets: ["color_restrictions"]
|
|
134
|
+
|
|
135
|
+
- id: "font_family_conversion"
|
|
136
|
+
type: "FontRemediation"
|
|
137
|
+
description: "Convert font families to generic families"
|
|
138
|
+
targets: ["font_family"]
|
|
139
|
+
default_family: "sans-serif"
|
|
140
|
+
allowed_families: ["serif", "sans-serif", "monospace", "inherit"]
|
|
141
|
+
|
|
142
|
+
- id: "viewbox_generation"
|
|
143
|
+
type: "ViewboxRemediation"
|
|
144
|
+
description: "Auto-generate viewBox from width/height"
|
|
145
|
+
targets: ["viewbox_required"]
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
# SVGCheck Compatibility Mapping Configuration
|
|
2
|
+
# This file defines how svgcheck error messages map to SvgConform requirements
|
|
3
|
+
|
|
4
|
+
# Message pattern mappings - patterns are evaluated in order
|
|
5
|
+
message_patterns:
|
|
6
|
+
# Style promotion patterns - now handled by unified style requirement
|
|
7
|
+
- pattern: "Style property '(.+)' promoted to attribute"
|
|
8
|
+
requirement: "style"
|
|
9
|
+
semantic_key: "style_promotion:${1}"
|
|
10
|
+
|
|
11
|
+
# Standard RGB color restriction patterns
|
|
12
|
+
- pattern: "The attribute '(.+)' does not allow the value '(rgb\\([^)]+\\))', replaced with '(.+)'"
|
|
13
|
+
requirement: "color_restrictions"
|
|
14
|
+
semantic_key: "color_restriction:${1}:${2}"
|
|
15
|
+
|
|
16
|
+
# Percentage RGB color restriction patterns
|
|
17
|
+
- pattern: "The attribute '(.+)' does not allow the value '(rgb\\([^)]*%[^)]*\\))', replaced with '(.+)'"
|
|
18
|
+
requirement: "color_restrictions"
|
|
19
|
+
semantic_key: "color_restriction:${1}:${2}"
|
|
20
|
+
|
|
21
|
+
# Case-sensitive color name patterns (BLACK, WHITE, etc.)
|
|
22
|
+
- pattern: "The attribute '(.+)' does not allow the value '([A-Z]+)', replaced with '(.+)'"
|
|
23
|
+
requirement: "color_restrictions"
|
|
24
|
+
semantic_key: "color_restriction:${1}:${2}"
|
|
25
|
+
|
|
26
|
+
# Named color restriction patterns (with replacement) - map to color_restrictions for semantic comparison
|
|
27
|
+
- pattern: "The attribute '(fill|stroke)' does not allow the value '([^']+)', replaced with '(.+)'"
|
|
28
|
+
requirement: "color_restrictions"
|
|
29
|
+
semantic_key: "color_restriction:${1}:${2}"
|
|
30
|
+
|
|
31
|
+
# Hex color restriction patterns
|
|
32
|
+
- pattern: "The attribute '(.+)' does not allow the value '(#[0-9a-fA-F]{3,6})', replaced with '(.+)'"
|
|
33
|
+
requirement: "color_restrictions"
|
|
34
|
+
semantic_key: "color_restriction:${1}:${2}"
|
|
35
|
+
|
|
36
|
+
# Unknown/invalid color patterns
|
|
37
|
+
- pattern: "The attribute '(.+)' does not allow the value '([^']+)', replaced with 'black'"
|
|
38
|
+
requirement: "color_restrictions"
|
|
39
|
+
semantic_key: "color_restriction:${1}:${2}"
|
|
40
|
+
|
|
41
|
+
# Generic attribute value restriction patterns (with replacement) - now handled by unified style requirement
|
|
42
|
+
- pattern: "The attribute '(.+)' does not allow the value '([^']+)', replaced with '(.+)'"
|
|
43
|
+
requirement: "style"
|
|
44
|
+
semantic_key: "property_value:${1}:${2}"
|
|
45
|
+
|
|
46
|
+
# Attribute removal patterns - now handled by unified style requirement
|
|
47
|
+
- pattern: "The attribute '(.+)' does not allow the value '([^']+)', attribute to be removed"
|
|
48
|
+
requirement: "style"
|
|
49
|
+
semantic_key: "property_value_removed:${1}:${2}"
|
|
50
|
+
|
|
51
|
+
# Element attribute restriction patterns
|
|
52
|
+
- pattern: "The element '(.+)' does not allow the attribute '(.+)', attribute to be removed"
|
|
53
|
+
requirement: "allowed_elements"
|
|
54
|
+
semantic_key: "invalid_attribute:${1}:${2}"
|
|
55
|
+
|
|
56
|
+
# Namespace attribute patterns
|
|
57
|
+
- pattern: "Element '(.+)' does not allow attributes with namespace '([^']+)'"
|
|
58
|
+
requirement: "namespace_attributes"
|
|
59
|
+
semantic_key: "namespace_attributes:${1}:${2}"
|
|
60
|
+
|
|
61
|
+
# Child element restriction patterns
|
|
62
|
+
- pattern: "The element '(.+)' is not allowed as a child of '(.+)'"
|
|
63
|
+
requirement: "allowed_elements"
|
|
64
|
+
semantic_key: "invalid_child:${1}:${2}"
|
|
65
|
+
|
|
66
|
+
# Element not allowed patterns
|
|
67
|
+
- pattern: "Element '(.+)' not allowed"
|
|
68
|
+
requirement: "allowed_elements"
|
|
69
|
+
semantic_key: "allowed_elements:${1}"
|
|
70
|
+
|
|
71
|
+
# Element in wrong namespace patterns
|
|
72
|
+
- pattern: "Element '(.+)' in namespace '(.+)' is not allowed"
|
|
73
|
+
requirement: "namespace_attributes"
|
|
74
|
+
semantic_key: "namespace_element:${1}:${2}"
|
|
75
|
+
|
|
76
|
+
# Namespace not permitted patterns
|
|
77
|
+
- pattern: "The namespace (.+) is not permitted for svg elements"
|
|
78
|
+
requirement: "namespace_validation"
|
|
79
|
+
semantic_key: "namespace_not_permitted:${1}"
|
|
80
|
+
|
|
81
|
+
# ViewBox required patterns
|
|
82
|
+
- pattern: "The attribute viewBox is required on the root svg element"
|
|
83
|
+
requirement: "viewbox_required"
|
|
84
|
+
semantic_key: "viewbox_required"
|
|
85
|
+
|
|
86
|
+
# ViewBox calculation patterns
|
|
87
|
+
- pattern: "Trying to put in the attribute with value '(.+)'"
|
|
88
|
+
requirement: "viewbox_required"
|
|
89
|
+
semantic_key: "viewbox_calculated:${1}"
|
|
90
|
+
|
|
91
|
+
# Malformed style patterns - now handled by unified style requirement
|
|
92
|
+
- pattern: "Malformed field '(.+)' in style attribute found\\. Field removed"
|
|
93
|
+
requirement: "style"
|
|
94
|
+
semantic_key: "style_malformed:${1}"
|
|
95
|
+
|
|
96
|
+
# SvgConform malformed style declaration pattern
|
|
97
|
+
- pattern: "Malformed style declaration '(.+)' found\\. Declaration removed\\."
|
|
98
|
+
requirement: "style"
|
|
99
|
+
semantic_key: "malformed_style_field:${1}"
|
|
100
|
+
|
|
101
|
+
# Style property removal patterns - now handled by unified style requirement
|
|
102
|
+
- pattern: "Style property '(.+)' removed"
|
|
103
|
+
requirement: "style"
|
|
104
|
+
semantic_key: "style_removal:${1}"
|
|
105
|
+
|
|
106
|
+
# Font family restriction patterns
|
|
107
|
+
- pattern: "The attribute 'font-family' does not allow the value '(.+)', replaced with '(.+)'"
|
|
108
|
+
requirement: "font_family"
|
|
109
|
+
semantic_key: "font_family_restriction:${1}:${2}"
|
|
110
|
+
|
|
111
|
+
# Viewport fill color restriction patterns
|
|
112
|
+
- pattern: "The attribute 'viewport-fill' does not allow the value '(.+)', replaced with '(.+)'"
|
|
113
|
+
requirement: "color_restrictions"
|
|
114
|
+
semantic_key: "color_restriction:viewport-fill:${1}"
|
|
115
|
+
|
|
116
|
+
# Malformed style field with brackets pattern
|
|
117
|
+
- pattern: "Malformed field '\\[\\[(.+)\\]\\]' in style attribute found\\. Field removed\\."
|
|
118
|
+
requirement: "style"
|
|
119
|
+
semantic_key: "malformed_style_field_brackets:${1}"
|
|
120
|
+
|
|
121
|
+
# Requirement ID mappings - direct mappings for SvgConform requirement IDs
|
|
122
|
+
requirement_mappings:
|
|
123
|
+
allowed_elements: "allowed_elements"
|
|
124
|
+
namespace_attributes: "namespace_attributes"
|
|
125
|
+
namespace_validation: "namespace_attributes" # Map namespace validation to namespace_attributes
|
|
126
|
+
font_family: "font_family"
|
|
127
|
+
color_restrictions: "color_restrictions"
|
|
128
|
+
viewbox_required: "viewbox_required"
|
|
129
|
+
# All style-related requirements now map to unified "style" requirement
|
|
130
|
+
style_promotion: "style"
|
|
131
|
+
style_syntax: "style"
|
|
132
|
+
style_validation: "style"
|
|
133
|
+
property_value: "style"
|
|
134
|
+
required_attribute: "viewbox_required" # Map required_attribute to viewbox_required
|
|
135
|
+
invalid_id_references: null # Mark as unmapped - no direct equivalent
|
|
136
|
+
namespace: "namespace_attributes" # Map to closest equivalent
|
|
137
|
+
|
|
138
|
+
# Skip patterns - errors matching these patterns should be skipped
|
|
139
|
+
skip_patterns:
|
|
140
|
+
# Skip metadata child elements
|
|
141
|
+
- pattern: "Element '(RDF|Work|format|type|title|creator|description)'"
|
|
142
|
+
reason: "metadata_child_elements"
|
|
143
|
+
|
|
144
|
+
# Skip embedded font errors
|
|
145
|
+
- pattern: "font-family.*embedded"
|
|
146
|
+
reason: "ignored_font_patterns"
|
|
147
|
+
flags: "i" # case insensitive
|
|
148
|
+
|
|
149
|
+
# Skip namespace errors on exempt elements
|
|
150
|
+
- pattern: "Element '(Work|type|title|creator|description|format)' does not allow attributes with namespace"
|
|
151
|
+
reason: "namespace_exempt_elements"
|
|
152
|
+
|
|
153
|
+
# Skip status messages (not validation errors)
|
|
154
|
+
- pattern: "ERROR: File does not conform to SVG requirements"
|
|
155
|
+
reason: "status_message"
|
|
156
|
+
|
|
157
|
+
- pattern: "INFO: File conforms to SVG requirements\\."
|
|
158
|
+
reason: "status_message"
|
|
159
|
+
|
|
160
|
+
# Special handling rules
|
|
161
|
+
special_rules:
|
|
162
|
+
# Parse failure conditions
|
|
163
|
+
parse_failure:
|
|
164
|
+
- pattern: "svg:"
|
|
165
|
+
reason: "namespaced_svg_elements"
|
|
166
|
+
- pattern: "namespace declaration"
|
|
167
|
+
reason: "problematic_xml_structure"
|
|
168
|
+
|
|
169
|
+
# Validity error inclusion conditions
|
|
170
|
+
validity_errors:
|
|
171
|
+
structural_requirements: ["viewbox_required", "allowed_elements", "namespace"]
|
|
172
|
+
datatype_condition: "both_width_and_height_present"
|
|
173
|
+
|
|
174
|
+
# Configuration values
|
|
175
|
+
config:
|
|
176
|
+
svg_urls:
|
|
177
|
+
- "http://www.w3.org/2000/svg"
|
|
178
|
+
xmlns_urls:
|
|
179
|
+
- "http://www.w3.org/2000/xmlns/"
|
|
180
|
+
- "http://www.w3.org/XML/1998/namespace"
|