epubcheck icon indicating copy to clipboard operation
epubcheck copied to clipboard

Accepting the 'direction' attribute in an svg element.

Open iherman opened this issue 3 years ago • 3 comments

At present, epubcheck reports an error on a construction of the sort:

<svg xmlns="http://www.w3.org/2000/svg" direction="rtl" …>

Specification-wise, this is correct, because the definition of the SVG element does not include the direction attribute. However, this seems to be a bug in the SVG specification, which explicitly refers to the usage of that attribute in that element, see the attribute's definition. Furthermore, the examples in the SVG spec use this, and they appear in a number of other places (like MDN). Let alone the fact SVG players do accept it and process it correctly...

I have raised a bug report on the SVG spec; I would think that, pragmatically, epubcheck should indeed accept this attribute.

iherman avatar May 25 '22 08:05 iherman

Actually... I have just realized that the problem may be elsewhere, namely that the direction attribute is not listed as a core attribute in SVG... which is definitely a bug in the spec.

iherman avatar May 25 '22 08:05 iherman

Epubcheck gets its schemas from validator.nu, so you should probably open this request there.

mattgarrish avatar Jun 17 '22 10:06 mattgarrish

I think the first step is at the SVG WG; until that is solved, validator.nu will not do anything. That is why I did this https://github.com/w3c/svgwg/issues/884.

The question is whether epubcheck should proactively take care (at least temporarily) of this bug to avoid EPUB creators to run into this problem...

iherman avatar Jun 17 '22 11:06 iherman

I'm closing this issue, since SVG content model is no longer normative (since #1365).

rdeltour avatar Dec 08 '22 09:12 rdeltour