Error definition

4 posts / 0 new
Last post

I got an error report (my first one ever), and what does this message mean:

File: OEBPS/content.opf

Message: unique-identifier attribute in package element must reference an existing indntifier element id. . .

JIm

If you open the opf file, on the package element root is an attribute called unique-identifier. The value of this attribute has to be a reference to the dc:identifier element containing the unique identifier for your publication (i.e., the value of the attribute must be the same as the id attribute value of a dc:identifier).

For example, "uid" is a reference to the isbn identifier:

<package ... unique-identifier="uid">
   <metadata>
      <dc:identifier id="uid">urn:isbn:xxx</dc:identifier>
      ...
   </metadata>
   ...
</package>

In your case, the value you have in the unique-identifier attribute does not match the id attribute of any dc:identifier element in the metadata. You'll need to fix the value to reference the dc:identifier containing the publication's unique id, or add the missing id to a dc:identifier element depending on the precise problem.

Matt, thank you.
However I am a graphic designer designing books and don't speak HTML. Are you just saying there is something wrong with the ISBN number?
Jim

The opf file is an xml document that's basically the heart of the EPUB. It lists all the resources in the file, defines the spine (the order in which to render the documents) and includes the publication-level metadata such as the author(s), title(s) and, most importantly for you, the identifier(s).

You may never see/deal with this file if you're just exporting the EPUB, and it sounds like you're not mucking around manually in the file, but it also means your export broke somewhere.

I put an isbn in just as an example of an identifier that is commonly used, but the value actually isn't terribly important to your problem, so don't focus on it.

The problem you've got is a linking one. Every publication has to have a unique identifier, and the connection that says "this is the unique identifier" is missing or broken in yours.

I can't give you an easy solution, unfortunately, other than to go back to whatever progam you exported the EPUB from, make sure that you've included an identifier in the metadata and try again.

The only other solution is to go into the EPUB container (which is just a slightly special zip file), find the opf file and manually figure out whether your identifier has been deleted, has had its id changed, or if the unique-identifier attribute needs to be fixed. As I mentioned above, the value of the unique-identifier attribute has to match the value of the id attribute on a dc:identifier element.

If you want (/can), send me the file and I can let you know more specifically what broke. (Take my username and add gmail.com.)

Secondary menu