Epubcheck:“解析文件'元素时出错”动画“这里不允许......”

时间:2014-07-28 09:56:12

标签: svg epub epub3

我在v3 epub上从epubcheck 3.0.1收到以下错误,

Error while parsing file 'element "animate" not allowed here; expected the element end-tag or element "desc", "metadata" or "title"'.

以下(严格删除此处)标记。

page0001.xhtml:

<?xml version="1.0"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops">
    <head>
        <title>Title</title>
    </head>
    <body>
        <div class="author-signature">
            <svg version="1.1" id="self-writing-author-signature" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="1918.481px" height="277.577px" viewBox="0 281.535 1918.481 277.577" enable-background="new 0 281.535 1918.481 277.577" xml:space="preserve">
                <path id="sig-by" fill="none" stroke-dasharray="1057.016845703125,1057.016845703125" stroke="none" stroke-width="20" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" d="M263.75,364.167c-7.011,19.632-21.317,39.133-42.25,45l-41.5,30c-3.824,20.125-25.998,31.36-16.174,54.457 c8.2,19.276,25.843,29.402,46.735,24.013c44.587-11.503,34.35-74.295,7.939-101.47l-4.25-45 c0.039,12.186,15.013,38.818,0.276,46.053c-10.267,5.041-27.781,27.543-40.072,18.511c-34.203-25.136-10.987-56.058-18.03-60.148 c-5.601-3.254-14.229-5.121-27.424-4.915l9.5,22.5c6.385,10.05-61.562,77.319-83.436,19.976c-11.739-30.774-5.86-78.666,22.21-98.09 c51.94-35.939,55.01,19.861,37.701,52.102C99.354,396.259,37.558,402.735,10,402.167">
                    <animate attributeName="stroke" from="none" to="#000000" begin="0" dur="100ms" fill="freeze"/>
                    <animate id="byAnim" attributeName="stroke-dashoffset" from="0" to="0" dur="1s" begin="0" fill="freeze" keySplines="0 0.5 0.5 1" calcMode="linear" values="-1057.016845703125;0"/>
                </path>
            </svg>
        </div>
    </body>
</html>

它基本上是SVG动画的一个片段,它显示作者的签名自己。

从我读过的内容以及我通过在线SVG标记验证测试的内容来看,SVG很好。将动画元素作为路径元素的子元素是可以的。我对此很感兴趣,因为从我读过的内容来看,epubcheck对于在数字商店上发布是一个严峻考验,但是我很难找到解决这个错误的方法,除了银行对数字商店的优雅忽略这一点,无论如何都要存货。

任何人都可以帮助解决上述问题吗?

1 个答案:

答案 0 :(得分:2)

EPUB 3不允许使用SVG动画元素,请参阅:

http://www.idpf.org/epub/301/spec/epub-contentdocs.html#sec-svg-restrictions

相关问题