View Full Version : .OPF errors

06-13-2011, 05:22 PM
I've tried adding metadata to my .opf file, but now my file won't validate.

Can anyone tell me what's wrong with this metadata?

<package version="2.0" xmlns="" unique-identifier="BookId">
<metadata xmlns:dc=""
<dc:title>Globalizing Citizenship</dc:title>
<dc:creator opf:role="aut">Rygiel, Kim</dc:creator>
<dc:publisher>UBC Press</dc:publisher>
<dc:date opf:event="original-publication">2010</dc:date>
<dc:date opf:event="epub-publication">2011-06-12</dc:date>
<dc:subject>Emigration and immigration - Government policy</dc:subject>
<dc:subject>Globalization - social aspects</dc:subject>
<dc:rights>Copyright 2010</dc:rights>
<dc:identifier id="BookId" opf:scheme="ISBN">9780774859486</dc:identifier>
<meta name="cover" content="img_5"/>

epubcheck is giving me the following error message:

1. ERROR: Globalizing Citizenship - Rygiel, Kim.epub/OEBPS/Kim_ISBN9780774859486_epub_opf_r1.opf(20): element "metadata" incomplete; missing required element "dc:identifier"

2. ERROR: Globalizing Citizenship - Rygiel, Kim.epub/OEBPS/Kim_ISBN9780774859486_epub_opf_r1.opf: unique-identifier attribute in package element must reference an existing identifier element id

06-13-2011, 08:55 PM
1. ERROR: Globalizing Citizenship - Rygiel, Kim.epub/OEBPS/Kim_ISBN9780774859486_epub_opf_r1.opf(20)

What's at line 20?

06-24-2011, 11:51 AM
It seems to just be the closing tag for the metadata element. Isn't that odd?

06-24-2011, 01:10 PM
It seems to just be the closing tag for the metadata element. Isn't that odd?

that is where it defaults if it gets totally lost in the file somewhere. It is likely it got lost because an earlier thing was never closed such as a quote mark or tag. It might also be at the end if a required element isn't there.

where is the closing package?


06-25-2011, 01:09 AM
1 The meta block has no error. It passes ePubCheck as I tested.
2 If there's unclosed tag, ePubCheck will show
ERROR: /OPS/content.opf(19): XML document structures must start and end within the same entity.

So there would be other mistake. epubcheck version?