Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
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
Old 06-19-2016, 03:53 PM   #2
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
Your signature indicates that you use Sigil. Open the ePUB with Sigil and save it. That should fix this. It seems allright. What is reporting the error?
Toxaris is offline   Reply With Quote
Advert
Old 06-20-2016, 01:21 AM   #3
dgatwood
Curmudgeon
dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.
 
dgatwood's Avatar
 
Posts: 629
Karma: 1623086
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
It might be dropping the identifier because the contents aren't valid, i.e. "mytesttitle-20160601" is not an ISBN.
dgatwood is offline   Reply With Quote
Old 06-20-2016, 08:48 AM   #4
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
Quote:
Originally Posted by dgatwood View Post
It might be dropping the identifier because the contents aren't valid, i.e. "mytesttitle-20160601" is not an ISBN.
Nope. I have another EPUB made like that from another program that validates just fine.

I'm not using Sigil anymore so I took it out of my sig.
crankypants is offline   Reply With Quote
Old 06-20-2016, 09:01 AM   #5
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Another possibility to check ... the unique-identifier in the OPF is also supposed to match one of the <meta> items in the NCX file e.g.
Code:
<meta content="your_unique_identifier_here" name="dtb:uid"/>
jackie_w is offline   Reply With Quote
Advert
Old 06-20-2016, 09:19 AM   #6
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
@crankypants:

Your dc namespace attribute is missing the final slash:

Code:
<metadata xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:opf="http://www.idpf.org/2007/opf">
BTW, your modification date entry format is also invalid:

Code:
<dc:date opf:event="modification">20160619</dc:date>
You'll need to use:

Code:
<dc:date opf:event="modification">2016-06-19</dc:date>
Doitsu is offline   Reply With Quote
Old 06-21-2016, 07:34 AM   #7
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
That was it Doitsu! Thank you!

That's one of those weird things that is hard to see.
crankypants is offline   Reply With Quote
Old 06-23-2016, 01:22 AM   #8
dgatwood
Curmudgeon
dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.
 
dgatwood's Avatar
 
Posts: 629
Karma: 1623086
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
Wow, that was subtle. Nice catch.
dgatwood is offline   Reply With Quote
Reply

Tags
content.opf, epub2


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
2 content.opf, one throws error, other doesn't mrmikel ePub 2 09-29-2014 04:47 PM
Change opf filename from content.opf to title.opf northstar7 Sigil 3 09-23-2013 12:44 PM
epub check tells me "Version not found" in my content.opf NASCARaddicted ePub 4 01-26-2013 08:10 AM
ePub OPF file error soulartist ePub 4 10-03-2011 05:09 PM
Can I cut and paste the Calibre opf into the ePub opf? wannabee ePub 0 07-12-2011 02:09 AM


All times are GMT -4. The time now is 09:19 AM.


MobileRead.com is a privately owned, operated and funded community.