epubcheck: SVG with custom namespace fails check
Checking a SVG using a custom namespace fails with an error–epubcheck doesn’t seem to recognize the custom namespace. Here’s a minimal, valid test SVG:
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:test="https://example.org" version="1.1" viewBox="0 0 10 10" test:foo="bar">
</svg>
Expected result: The valid SVG should not generate check errors.
Actual result: Error while parsing file ‘attribute “test:foo” not allowed here; expected attribute “alignment-baseline”, “baseProfile”, “baseline-shift”, “class”, “clip”, “clip-path”, “clip-rule”, “color”, “color-interpolation”, “color-interpolation-filters”, “color-profile”, “color-rendering”, “contentScriptType”, “contentStyleType”, “cursor”, “direction”, “display”, “dominant-baseline”, “enable-background”, “externalResourcesRequired”, “fill”, “fill-opacity”, “fill-rule”, “filter”, “flood-color”, “flood-opacity”, “font-family”, “font-size”, “font-size-adjust”, “font-stretch”, “font-style”, “font-variant”, “font-weight”, “glyph-orientation-horizontal”, “glyph-orientation-vertical”, “height”, “id”, “image-rendering”, “kerning”, “letter-spacing”, “lighting-color”, “marker-end”, “marker-mid”, “marker-start”, “mask”, “ns:type”, “onabort”, “onactivate”, “onclick”, “onerror”, “onfocusin”, “onfocusout”, “onload”, “onmousedown”, “onmousemove”, “onmouseout”, “onmouseover”, “onmouseup”, “onresize”, “onscroll”, “onunload”, “onzoom”, “opacity”, “overflow”, “pointer-events”, “preserveAspectRatio”, “requiredExtensions”, “requiredFeatures”, “shape-rendering”, “stop-color”, “stop-opacity”, “stroke”, “stroke-dasharray”, “stroke-dashoffset”, “stroke-linecap”, “stroke-linejoin”, “stroke-miterlimit”, “stroke-opacity”, “stroke-width”, “style”, “systemLanguage”, “text-anchor”, “text-decoration”, “text-rendering”, “unicode-bidi”, “visibility”, “width”, “word-spacing”, “writing-mode”, “x”, “xml:base”, “xml:lang”, “xml:space”, “y” or “zoomAndPan” (with xmlns:ns=“http://www.idpf.org/2007/ops”)’.
About this issue
- Original URL
- State: closed
- Created 10 years ago
- Comments: 17 (12 by maintainers)
@murata2makoto I’ve made a start in PR #970. Feel free to improve on it.
@jacqueslelezard, my understanding is that namespaces should be supported because the specs for EPUB 3.1 and 3.0.1 require versions of SVG that use the same namespace rules as XML.