首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >分析属性"ibooks:readaloud“的前缀"ibooks”时出错

分析属性"ibooks:readaloud“的前缀"ibooks”时出错
EN

Stack Overflow用户
提问于 2019-09-01 21:04:46
回答 1查看 103关注 0票数 1

我正在尝试验证以下html:

代码语言:javascript
复制
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml" 
xmlns:epub="http://www.idpf.org/2007/ops" epub:prefix="ibooks: http://vocabulary.itunes.apple.com/rdf/ibooks/vocabulary-extensions-1.0/">
    <head>
        <title>Moby-Dick</title>
        <link rel="stylesheet" href="css/stylesheet.css" type="text/css"/>
        <meta charset="utf-8"/>
        <meta name="viewport" content="width=1024, height=600"/>
    </head>
    <body>
        <p ibooks:readaloud="startstop">Read Aloud</p>
    </body>
</html>

但是我得到了一个错误:

代码语言:javascript
复制
Validating using EPUB version 3.0.1 rules.
FATAL(RSC-016): ./30/moby-dick-mo.epub/OPS/chapter_001.xhtml(11,41): Fatal Error while parsing file 'The prefix "ibooks" for attribute "ibooks:readaloud" associated with an element type "p" is not bound.'.
ERROR(RSC-005): ./30/moby-dick-mo.epub/OPS/chapter_001.xhtml(-1,-1): Error while parsing file 'The prefix "ibooks" for attribute "ibooks:readaloud" associated with an element type "p" is not bound.'.

我做错了什么?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2019-09-01 21:17:38

必须声明XML名称空间前缀,才能使XML文档具有良好的名称空间格式。您对ibooks命名空间前缀的声明已损坏。要修复它,请更改

代码语言:javascript
复制
epub:prefix="ibooks: http://vocabulary.itunes.apple.com/rdf/ibooks/vocabulary-extensions-1.0/"

代码语言:javascript
复制
xmlns:ibooks="http://vocabulary.itunes.apple.com/rdf/ibooks/vocabulary-extensions-1.0/"
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/57746219

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档