-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Most readers probably don't follow the MUST about the requiredExtensions attribute for SVG #1087
Comments
OPS 2.0.1 has this to say about it:
But since we've deprecated out almost all epub-created extensions, I'm not sure if this is still necessary. @rkwright @iherman @murata2makoto any thoughts? |
@rkwright should know infinitely more about this than me, but I chime in anyway...
|
I do not know if non-EPUB SVG often uses the svg:switch and svg:foreignObject elements as representing the occurrence of XHTML Content Document fragments. If this is the case, I think that we can lift the requirement that requiredExtensions shall be "http://www.idpf.org/2007/ops". |
So what happens here? Note that browsers don't have interop on this—Chrome shows "baz" and Firefox/Safari show "bar".
The goal seems to be to embed XHTML Content Document Fragments. But those exist in the XHTML namespace, not the OPS namespace (mostly). I'm struggling to find a reason we need this. |
I have run into the statement in the spec earlier today. Here is a test case I have (used as part of a cover image): <?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 595 842">
<foreignObject y="200" width="100%" height="100%" requiredExtensions="http://www.idpf.org/2007/ops">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: center; justify-content: center">
<div style="display: inline-block; font-size: 40px; font-family: sans-serif; color: #005A9C; line-height: 1.2; font-weight: bold; font-style: italic; white-space: nowrap; text-align: center">
EPUB 3 Overview
</div>
</div>
</foreignObject>
<foreignObject y="400" width="100%" height="100%" >
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: center; justify-content: center">
<div style="display: inline-block; font-size: 20px; text-align: center; ">
W3C Editor's Draft<br/>26 October 2020
</div>
</div>
</foreignObject>
</svg> Ran it on three browsers (Safari, Chromium based Edge, and Firefox) as well as part of an EPUB on Thorium (on my Mac). The behaviour of all four was identical:
2 years have passed since since the test of @dauwhe (#1087 (comment)) and we do have interop now on browsers. I could not test it on Apple Books because it does not seem to use a cover page set as an SVG file :-( As everybody on this thread, it seems, I do not see any reason why this statement is in the spec; it may have a historical reason. With 3.3 on its way, I would think this statement should be deprecated from the spec (and possibly add a note advising not to use this because there may be issues displaying the content). |
I think we absolutely need to remove this from the spec. |
remove requirement to support SVG requiredExtensions attribute per #1087
Closed via #1662 |
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 commit: * introduces a new permissive RelaxNG schema for SVG, checking only the EPUB-specific requirements on the `title` and `foreignObject` content model see w3c/epub-specs#1323 * removes checks on the value of the `requiredExtensions` attribute of `foreignObject` 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
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 commit: * introduces a new permissive RelaxNG schema for SVG, checking only the EPUB-specific requirements on the `title` and `foreignObject` content model see w3c/epub-specs#1323 * removes checks on the value of the `requiredExtensions` attribute of `foreignObject` 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
SVG Reading System conformance
Presumably there was a good historical reason for this that's lost on me, but I doubt most EPUB readers do anything with this MUST.
The text was updated successfully, but these errors were encountered: