Skip to content
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

declaring svg:switch in package file? #857

Closed
dauwhe opened this issue Sep 26, 2018 · 1 comment
Closed

declaring svg:switch in package file? #857

dauwhe opened this issue Sep 26, 2018 · 1 comment
Assignees
Labels
status: has PR The issue is being processed in a pull request type: bug The issue describes a bug
Milestone

Comments

@dauwhe
Copy link
Contributor

dauwhe commented Sep 26, 2018

While investigating the use of SVG's requiredExtensions attribute in EPUB 3.2, I tried some experiments with SVG switch and foreignResource. Here's a content document:

<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:epub="http://www.idpf.org/2007/ops"
      xml:lang="en-US" lang="en-US"
      xmlns:svg="http://www.w3.org/2000/svg">
   <head>
      <title>SVG SWITCH</title>
      <meta charset="utf-8" />
   </head>
   <body>
      <svg:svg width="400px" height="300px" viewBox="0 0 400 300">
         <svg:switch>
            <svg:foreignObject width="100" height="50" requiredExtensions="http://www.idpf.org/2007/ops">
               <p xmlns="http://www.w3.org/1999/xhtml">foo</p>
            </svg:foreignObject>
            <svg:text font-size="10" font-family="Verdana">
               <svg:tspan x="10" y="10">bar</svg:tspan>
            </svg:text>
         </svg:switch>
      </svg:svg>
      <section id="d10e42">
         <h1 id="d10e44">SVG SWITCH</h1>
         <p>Hello <a href="#d10e44">there</a></p>
      </section>
   </body>
</html>
  1. EPUBCheck wants me to declare the switch element in the package file even though this is svg:switch and not epub:switch:
ERROR(OPF-014): ..epub/EPUB/georgia.xhtml(-1,-1): The property 'switch' should be declared in the OPF file.
  1. Any ordinary xhtml link that occurs after the SVG brings up an error about needing a title:
WARNING(ACC-011): ..epub/EPUB/georgia.xhtml(23,46): SVG hyperlinks should have a human-readable title (using the 'title' child element or the 'xlink:title' attribute).

Of course, these are not SVG hyperlinks.

@rdeltour rdeltour added type: bug The issue describes a bug status: accepted Ready to be further processed labels Jan 17, 2019
rdeltour added a commit that referenced this issue Jan 17, 2019
The `switch` property of Package Documents `item` elements indicates
that the described Publication Resource contains one or more instances
of the `epub:switch` element. It should not be declared when the EPUB
contains SVG using the `svg:switch` element.

Fixes #857
@rdeltour
Copy link
Member

I could reproduce (1) and fixed it in #944. (2) was already fixed in #750.

@rdeltour rdeltour added status: has PR The issue is being processed in a pull request and removed status: accepted Ready to be further processed labels Jan 17, 2019
@rdeltour rdeltour self-assigned this Jan 17, 2019
rdeltour added a commit that referenced this issue Jan 17, 2019
The `switch` property of Package Documents `item` elements indicates
that the described Publication Resource contains one or more instances
of the `epub:switch` element. It should not be declared when the EPUB
contains SVG using the `svg:switch` element.

Fixes #857
@rdeltour rdeltour added this to the 4.1.1 milestone Jan 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: has PR The issue is being processed in a pull request type: bug The issue describes a bug
Projects
None yet
Development

No branches or pull requests

2 participants