How to add type metadata element in the OPF file?

941 views Asked by At

I added following in the OPF file.

<?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>

but getting error by Epub validator. 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"

How to add type metadata element in the OPF file?

1

There are 1 answers

1
SekDinesh On BEST ANSWER

Package Document (.opf)

The Package Document contains information about the book including the metadata, manifest, and

spine. It also defines the version must be 3.0.

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

The Metadata

Minimum, you must include the following items.

  • Title

  • ID

  • Language

  • Type

  • Modified-date

For Example:

<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>