【问题标题】:How to add type metadata element in the OPF file?如何在 OPF 文件中添加类型元数据元素?
【发布时间】:2015-06-24 12:37:27
【问题描述】:

我在OPF 文件中添加了以下内容。

<?xml version="1.0" encoding="UTF-8"?>
<package xmlns="http://www.idpf.org/2007/opf" version="3.0" xml:lang="en" unique-identifier="pub-id">
<metadata xmlns:dc="http://purl.org/dc/elements/1.1/">
    <dc:type>ePub</dc:type>
</metadata>

Epub 验证器 出错。 http://validator.idpf.org/

element "dc:type" not allowed here; expected the element end-tag or element "dc:contributor", "dc:coverage", "dc:creator", "dc:description", "dc:format", "dc:identifier", "dc:language", "dc:publisher", "dc:relation", "dc:rights", "dc:subject", "dc:title", "link" or "meta"

如何在OPF文件中添加type元数据元素?

【问题讨论】:

    标签: epub3


    【解决方案1】:

    包文件 (.opf)

    包文档包含有关图书的信息,包括元数据、清单和

    脊柱。它还定义了版本必须是 3.0。

    <package xmlns="http://www.idpf.org/2007/opf" unique-identifier="bookid" version="3.0" prefix="rendition: http://www.idpf.org/vocab/rendition/#">
    

    元数据

    至少,您必须包括以下项目。

    • 标题

    • ID

    • 语言

    • 类型

    • 修改日期

    例如:

    <dc:title>XXXXXX</dc:title>
    <dc:creator>YYYYYY</dc:creator>
    <dc:source>0000000</dc:source>
    <dc:identifier id="p0000000">URN:ISBN:0000000<dc:identifier>
    <dc:publisher>ZZZZZZ</dc:publisher>
    <dc:language>en</dc:language>
    <dc:type>Text</dc:type>
    <dc:format>100 pages</dc:format>
    

    【讨论】:

    • 是的,赞成,是的,我在 OPF 中有所有元数据。我会再次检查 2maro 并回复你..
    猜你喜欢
    • 2018-05-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-09-04
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多