epubcheck icon indicating copy to clipboard operation
epubcheck copied to clipboard

epub:prefix should not be allowed on embedded svg

Open mattgarrish opened this issue 2 years ago • 1 comments

While fixing https://github.com/w3c/epub-specs/issues/2555, I noticed epubcheck doesn't report an epub:prefix attribute on an svg element when embedded directly in an html document. The following should be illegal:

<html ... epub:prefix="foo: https://bar.com">
   ...
   <body>
      <svg ... epub:prefix="bar: https://foo.com">
        ...
      </svg>
   </body>
</html>

The requirement for this is in D.1.4:

Note that for embedded SVG, prefixes MUST be declared on the [html] root html element.

(But this is hardly a priority fix!)

mattgarrish avatar Jul 21 '23 14:07 mattgarrish

Ah, good catch. I'm not too surprised, since this is checked by the schema (as far as I remember), and the SVG schema is shared by both standalone and embedded SVG. It can probably be fixed by moving that attribute declaration to the integration schemas. I'll look into it when prepping the next milestone.

rdeltour avatar Aug 31 '23 15:08 rdeltour