feat: make SVG content conformance checking informative-only #1365
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
EPUB 3.3 no longer requires that SVG content conforms to SVG content model requirements,
only that they are well-formed, that ID are uniques, and that they respect some additional
EPUB-specific requirements.
This PR:
* introduces a new permissive RelaxNG schema for SVG, checking only the EPUB-specific
requirements on the
title
andforeignObject
content modelsee w3c/epub-specs#1323
* removes checks on the value of the
requiredExtensions
attribute offoreignObject
see w3c/epub-specs#1087
* adapts the main XHTML to SVG schema driver to the new permissive SVG schema
* adds various tests for EPUB-specific requirements
The PR also introduces two new codes,
RSC-024
andRSC-025
, to report informative schema checks.An
XMLValidator
instance can now be instantiated with a boolean flag to tell if the unerlying schema is normative or not.If a schema is not normative, the
XMLParser
uses an informative-onlyErrorHandler
, that reports warnings asRSC-024
(USAGE), and errors asRSC-025
(USAGE).Fatal errors are still reported as
RSC-016
(FATAL).SVG schema-based content conformance checking is made informative only:
* new NVDL and RelaxNG schema drivers will only check SVG content, and ignore other
namespaces.
* these informative schemas are enabled for both SVG and XHTML Content Documents
* SVG content conformance, as before, is using RelaxNG schemas from the Nu HTML Checker.