View Full Version : is my epub valid or not ?


NASCARaddicted
02-10-2010, 05:36 AM
Hello

I have a strange epub problem. I got a html file (puplic domain). I edited it, so that it was xhtml 1.1 valid (I checked it). Then I loaded it into calibre, added chapters and a cover and converted it to epub.

To make it sure, I used the epub check at threepress.org and here, I was told that my epub is not valid, there is 1 error.

The error message is: ERROR: Rosenresli - Johanna Spyri.epub/content.opf(10): date value '2010-02-08T22:00:00' is not valid, YYYY[-MM[-DD]] expected

I unpacked the epub and looked at it. In line 10 it says <dc:date>2010-02-08T22:00:00</dc:date>

At the first glance, I couldn't see an error (but I am still a novice), so I looked for another epub checker. I found one here on MR, posted by fifisailing, based on java. So I checked the epub again with this program and now I was told that my epub is valid.

So who is right and who is wrong ? Is my epub valid ? Is there anything wrong with my content opf ? As I said, I converted the file with calibre, so I thought everything would be fine.
Are there other (easy to use) epub checkers ? Thanks for your help

netseeker
02-10-2010, 06:47 AM
The error message is: ERROR: Rosenresli - Johanna Spyri.epub/content.opf(10): date value '2010-02-08T22:00:00' is not valid, YYYY[-MM[-DD]] expected

I unpacked the epub and looked at it. In line 10 it says <dc:date>2010-02-08T22:00:00</dc:date>

So who is right and who is wrong ? Is my epub valid ? Is there anything wrong with my content opf ? As I said, I converted the file with calibre, so I thought everything would be fine.
Are there other (easy to use) epub checkers? Thanks for your help
Dublin Core recommends the usage of either just the year (YYYY) or year+month (YYYY-MM). (http://dublincore.org/documents/usageguide/elements.shtml section 4.12.) Aynway, if you still want use a date/time value then you should at least add the time zone according to the W3C's W3CDTF date/time scheme (http://www.w3.org/TR/NOTE-datetime).

Examples:
<dc:date>2010</dc:date>
<dc:date>2010-02</dc:date>
<dc:date>2010-02-08T22:00:00+01:00</dc:date>

I use epubcheck (http://code.google.com/p/epubcheck/) to validate ePub-files...

NASCARaddicted
02-10-2010, 06:56 AM
Dublin Core recommends the usage of either just the year (YYYY) or year+month (YYYY-MM). (http://dublincore.org/documents/usageguide/elements.shtml section 4.12.) Aynway, if you still want use a date/time value then you should at least add the time zone according to the W3C's W3CDTF date/time scheme (http://www.w3.org/TR/NOTE-datetime).

Examples:
<dc:date>2010</dc:date>
<dc:date>2010-02</dc:date>
<dc:date>2010-02-08T22:00:00+01:00</dc:date>

I use epubcheck (http://code.google.com/p/epubcheck/) to validate ePub-files...

Thanks for your help (like so many times before). Personally, I am not really interested in the date. It was just that Calibre added it. Maybe I should contact Kovid about that, on the Calibre Forum ...