unique-identifier error--please help!

10 posts / 0 new
Last post

I get this error: meta@dtb:uid content 'uid' should conform to unique-identifier in content.opf: 'Aspose'

I created my EPub file with Aspose...is there a way to fix this? Or is there an EPub converter that would work better?
Thank you all.

You've got mismatching identifiers in your epub.

If you unzip your epub and open the content.opf file, you'll see the unique-identifier attribute on the <package> element points to a <dc:identifier> element containing the unique identifier. Your error message is telling you that this dc:identifier element has the value 'Aspose'.

This unique identifier also has to be included in the NCX file (the EPUB 2 navigation document), as per this requirement in EPUB 2:

The list of required metadata provided in http://www.niso.org/workrooms/daisy/Z39-86-2005.html#NavMeta does not apply to EPUB; the only required meta is that which contains a content reference to the OPF unique ID. For backwards compatibility reasons, the value of the name of that meta remains dtb:id.

I opened an issue about this a long time back, though, because dtb:id here is supposed to be dtb:uid, since there is no dtb:id metadata element defined in the NCX specification.

In other words, if you open the NCX file in your EPUB, you're supposed to find a meta tag like this with the same unique identifier value:

<meta name="dtb:uid" content="Aspose"/>

It's value has to match the unique identifier in the package document, but in your case it doesn't which is why you're getting that error. It could be that the value hasn't been inserted, or it could be that the developers of the program you used followed the incorrect guidance in the specification and added a dtb:id meta tag I can't answer that for you.

If you're comfortable unpacking, fixing and repacking your epub, it shouldn't take you more than a minute or two to make the above fix, but sounds like something you should report to the developers of the program.

The name 'Aspose' isn't a particularly "unique" identifier to be giving to generated epus, either, although most reading system cope with multiple books giving themselves the same ID.

Hope this helps.

Thanks...is there a good program for unpacking it?

An EPUB is just a zip file, so you can use any handy zip program you have to unpack it.

To properly zip the contents back up (there's a required order to the files), you can use epubcheck like this:

java -jar epubcheck.jar -mode exp -save /path/to/unpack/directory

If the contents validate, epbcheck will generate a new .epub file for you (in whatever directory you run the command from).

If you're using a Mac, there is also a freely-available script to zip/unzip here: https://code.google.com/p/epub-applescripts/downloads/list


Actually, since this is likely an epub2 file, you could use a program like Sigil to edit the content without unzipping the file.

I don't trust sigil for epub3 files, though, as it does at least one epub2 auto-correction I've seen, adding an unwanted NCX.

1. I received the same error message as Valerie (#1): I get this error: meta@dtb:uid content 'uid' should conform to unique-identifier in content.opf: 'Aspose'

2. I tried to follow the instructions posted by Matt (#2) - where I need to update the ncx file to be: <meta name="dtb:uid" content="Aspose"/>

3. I opened the files in Sigil, as suggested - but could locate where to correct the identifier (unfortunately I am ignorant of the html language). Here are the 1st statements in the ncx file:

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<!DOCTYPE ncx PUBLIC "-//NISO//DTD ncx 2005-1//EN"
<ncx xmlns="http://www.daisy.org/z3986/2005/ncx/" version="2005-1" xml:lang="en-US"><head><meta content="uid" name="dtb:uid"/><meta content="1" name="dtb:depth"/><meta content="Aspose.Words for .NET" name="dtb:generator"/><meta content="0" name="dtb:totalPageCount"/><meta content="0" name="dtb:maxPageNumber"/

4. I tried 2 updates of ncx but Sigil gave me errors (whereas without the updates I receive a message that there are no errors - but java - jar gives the error message as noted above)

5. Can you please tell me exactly what to update in the ncx file.

Thank you very much! Michael Weiss

This line is causing your error:

<meta content="uid" name="dtb:uid"/>

You have the to fix the value "uid" to "Aspose".

It's not surprising that sigil doesn't report an error; it uses the old flightcrew validator. To get into many bookstores you need to have a file that validate against epubcheck, so treat sigil as more of an informative validation pass.

Hello Matt, many many thanks for your quick response. It is most appreciated.

I made the change to: <meta content="Aspose" name="dtb:uid"/>
Sigil reported 'No problems found' and I did a java -jar check and received: "No errors or warnings detected". Finally. (-:

[Before trying Aspose I tried to create the ePub file with Calibre, with Sigil, and also created a Google docs version from the Word, but received quite a few errors. Looks like Aspose does its job.]

I guess I am not up to speed with the newer technologies. I tried to open the ePub file with the one Adobe version I have – Adobe Reader X, and received an error message that it cannot open the file. I did some googling and learned I needed Adobe Digital. So I downloaded this and was able to open my ePub file… thanks to you. I see I need to do some formatting – can you possibly tell me why new chapters (h1) do not appear at top of page?

If you like to read international thrillers… about terrorists and an atomic bomb planned to be detonated in the Middle East… only to be saved by two heroes – one Muslim, one Israeli, then would be pleased to send you…

Thank you again

When you create dynamically paginated EPUBs, it's not dissimilar to thinking of what would happen to a web page if only a segment at a time could be displayed (and each segment called a "page"). The layout engines, to generalize, will render the entire document and then present it by chunk -- how much being seen with each "page turn" depending on the font family, size, etc.

Since there is nothing special about headings by default, forcing a page break (when the pages don't really exist), is not something the engines are designed to do (and you'd have people then asking how to stop the behaviour). In theory, the CSS page-break-before property could be used to set a page break before a heading, but in reality the property isn't supported.

The only reliable way to force a page break before a heading is to split your content up into separate files by major heading. Each time a new content document in the spine is loaded, the previous is unloaded, so the new content will start at the top of the viewport (page).

I believe aspose has an option to split content by heading that will do this chunking automatically for you, but unfortunately that means you'll have to do a redo on anything you've done since you generated your content, unless you're comfortable chunking documents manually and adding them to the package document manifest and spine.

Thanks for error helping center site. This forum place is very helpful. Always we have to faced the problem.

Jahid Khan

Secondary menu