View Single Post
Old 06-19-2016, 02:44 PM   #1
crankypants
Hmm.
crankypants ought to be getting tired of karma fortunes by now.crankypants ought to be getting tired of karma fortunes by now.crankypants ought to be getting tired of karma fortunes by now.crankypants ought to be getting tired of karma fortunes by now.crankypants ought to be getting tired of karma fortunes by now.crankypants ought to be getting tired of karma fortunes by now.crankypants ought to be getting tired of karma fortunes by now.crankypants ought to be getting tired of karma fortunes by now.crankypants ought to be getting tired of karma fortunes by now.crankypants ought to be getting tired of karma fortunes by now.crankypants ought to be getting tired of karma fortunes by now.
 
Posts: 124
Karma: 2016606
Join Date: Oct 2015
Device: Android 4.2 Google Play Reader
ERROR in EPUB content.opf

I'm getting an error in my epub2 content.opf. It's a simple EPUB I'm using to test validation. Here's the error:

Code:
Error while parsing file 'element "metadata" incomplete; missing required 
elements "ns:identifier", "ns:language" and "ns:title" (with 
xmlns:ns="http://purl.org/dc/elements/1.1/")'.
Here's the content.opf file. The error is line 13 position 12:
Code:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<package xmlns="http://www.idpf.org/2007/opf" unique-identifier="BookId" version="2.0">
<metadata xmlns:dc="http://purl.org/dc/elements/1.1" xmlns:opf="http://www.idpf.org/2007/opf">
<dc:title>My test title</dc:title>
<dc:language>en</dc:language>
<dc:identifier id="BookId" opf:scheme="ISBN">mytesttitle-20160601</dc:identifier>
<dc:creator opf:role="aut">John Smith</dc:creator>
<dc:creator opf:role="aut">Sally Jones</dc:creator>
<dc:subject>test subject</dc:subject>
<dc:subject>boats</dc:subject>
<dc:subject>travel</dc:subject>
<dc:date opf:event="modification">20160619</dc:date>
</metadata>
 
<manifest>
  <item id="ncx" href="toc.ncx" media-type="application/x-dtbncx+xml" />
  <item href="Text/ch1.xhtml" id="ch1.xhtml" media-type="application/xhtml+xml" />
  <item href="Text/ch2.xhtml" id="ch2.xhtml" media-type="application/xhtml+xml" />
  <item id="main-css" href="OEBPS/Style/note.css" media-type="text/css"/>
</manifest>
 
<spine toc="ncx">
  <itemref idref="ch1.xhtml" />
  <itemref idref="ch2.xhtml" />
</spine>
 
<guide>
  <reference href="Text/ch1.xhtml" title="Cover" type="cover" />
</guide>
</package>
I tried using Google to find a solution to the error but found no solution. Can someone help me? What are the formats of the data I'm missing in content.opf?

There's also another error in content.opf which is possibly related:
Code:
The unique-identifier 'BookId' was not found.
Thanks.
crankypants is offline   Reply With Quote