View Full Version : Epub validation error


Pixie25
04-18-2012, 08:51 PM
I'm getting Epub validation errors

WARNING OEBPS/content.opf 6 24 title element is empty
ERROR OEBPS/content.opf 18 46 character content of element "dc:identifier" invalid; must be a string with length at least 1 (actual length was 0)

Used Indesign CS 5.5 to create.

Any help would be great.

Toxaris
04-19-2012, 01:55 AM
There must be an unique identifier in the opf file. Most people use the ISBN number when available. More or less the same is valid for the title. The title element in the opf is required in the ePUB specifications.
I assume that in ID this can be done in the metadata.

mmat1
04-19-2012, 03:39 AM
WARNING OEBPS/content.opf 6 24 title element is empty
ERROR OEBPS/content.opf 18 46 character content of element "dc:identifier" invalid; must be a string with length at least 1 (actual length was 0)

Used Indesign CS 5.5 to create.


Maybe you missed to fill in some options before creating your epub ?

You may try sigil to correct it, it has a metadata-editor

Pixie25
04-19-2012, 08:00 AM
Thank you both.

Issue fixed.:thanks:

stephentiano
06-30-2012, 08:15 PM
I know I'm months late to this thread, but I was pleased to find it. Only it leaves me with other questions. For instance, if I'm just trying to put together a sample epub doc from a print book I did design and layout on, what can I use for ID info, since the ISBN is not mine to fool around with? Also, is there generally a "rule book" or operations manual that decodes validator error messages in plain, non-techie English?

Thank you.

AlexBell
07-01-2012, 02:46 AM
I'm just trying to put together a sample epub doc from a print book I did design and layout on, what can I use for ID info, since the ISBN is not mine to fool around with?

Anything you like as long as it's unique. For example I use afjbnnn where afjb are my intials, and nnn is a three digit number. If I ever get to my thousandth ePub I'll use afjb1000

Jellby
07-01-2012, 04:09 AM
I use "Jellby:YYYYMMDD", where YYYYMMDD is the date when I create the OPF file. If I create several ones in a single day, I add "b", "c", etc. My identifier looks like this:

<dc:identifier id="BookId">Jellby:20120701</dc:identifier>

AlPe
07-01-2012, 04:26 AM
I use UUID (http://en.wikipedia.org/wiki/Universally_unique_identifier), generated by the standard "uuidgen -r" command on any GNU/Linux box.

stacyl276
09-11-2012, 01:10 PM
I am getting the error: character content of element "dc:identifier" invalid; must be a string with length at least 1. Sounds like the fix is to open the source code and place the ISB number into the dc: identifier. Can someone post what code and am looking for to add this to? May sound trivial but I am new with code.
Also, the validator is telling me to take the spaces out of my file names. I can't do this since the TOC uses these names. Is this going to be a problem in final validation?

mmat1
09-11-2012, 03:42 PM
I am getting the error: character content of element "dc:identifier" invalid; must be a string with length at least 1. Sounds like the fix is to open the source code and place the ISB number into the dc: identifier. Can someone post what code and am looking for to add this to? May sound trivial but I am new with code.
Also, the validator is telling me to take the spaces out of my file names. I can't do this since the TOC uses these names. Is this going to be a problem in final validation?

Jellby has posted a perfect solution 3 messages above. You should replace the whole "<dc:identifier"- line in content.opf with one that matches the sample above.

Btw: Doing this would be easy by using sigil, but which tool do you use ?? Building a toc from filenames is a bit unusual. Spaces and other special character's (such like ) in Filenames could cause problems (somewhere in the universe :) ), but i never heard about a case, where they are a real problem.

stacyl276
09-12-2012, 01:25 AM
What program opens the .opf file. I assumed a text editor or Dreamweaver would do this but neither let me. I'm not seeing where I can fix this in the metadata panel (in InDesign) either. I tried to use sigil but I am on OS 10.5.8 and can't seem to find an older download of Sigil anywhere. The newest version needs OS 10.6.

JSWolf
09-12-2012, 01:45 AM
What program opens the .opf file. I assumed a text editor or Dreamweaver would do this but neither let me. I'm not seeing where I can fix this in the metadata panel (in InDesign) either. I tried to use sigil but I am on OS 10.5.8 and can't seem to find an older download of Sigil anywhere. The newest version needs OS 10.6.

An ePub container is just a ZIP file. Just unZIP the OPF file, make your changes using a text editor and put it back in.

AlexBell
09-12-2012, 02:12 AM
What program opens the .opf file. I assumed a text editor or Dreamweaver would do this but neither let me. I'm not seeing where I can fix this in the metadata panel (in InDesign) either. I tried to use sigil but I am on OS 10.5.8 and can't seem to find an older download of Sigil anywhere. The newest version needs OS 10.6.

It's just a text file, and my Windows HTML editor opens it without problem. There must be an HTML editor which works on Apples.

Or you could try renaming content.opf to content.txt (or whatever Apple uses for text files) and then rename it back to content.opf when you've edited it.

mzmm
09-18-2012, 09:39 AM
What program opens the .opf file...

i have a mac and use textwrangler to edit just about all epub content documents (including your opf). also it's free.

what can I use for ID info, since the ISBN

i've also used http://www.famkruithof.net/uuid/uuidgen to generate unique identifiers