Discussion:
two date entries in EPUB package.opf file
Peter Lavin
2014-08-11 16:53:05 UTC
Permalink
Hi,

I'm using the the 1.78.1-ns style sheets to create an EPUB.

Within the book.info tag I want to include both a copyright.year tag and a
pubdate tag--publication dates are quite distinct from copyright years.

When validating using Epubcheck Version 3.0.1 I get the following error:

ERROR: docbook.epub/OEBPS/package.opf(19,14): element "dc:date" not allowed
here

Two date entries are created in the package.opf file, one resulting from
the pubdate tag and one from the copyright.year tag.

<meta property="dcterms:date">2014-09-01</meta>
<dc:date>2014-09-01</dc:date>
<meta property="dcterms:date">2014</meta>
<dc:date>2014</dc:date>

This seems to violate the EPUB requirement that there be only one DCMES
date element. This is easy enough to fix after the fact but I don't see an
easy workaround. Any suggestions?

Thanks.
--
Peter Lavin
Telephone: 1 416 461 4991
Mobile: 1 416 882 9194
Skype: peter.lavin
(GMT -05:00 Canada/US Eastern)
Bob Stayton
2014-08-11 21:21:55 UTC
Permalink
Hi Peter,
Yes, the dates still are not handled quite correctly. Currently the
date can come from <date>, <pubdate>, or copyright/year. There should
be a single template that selects one based on a priority, which I
presume would be pubdate, date, then copyright/year. I'll log this as a
bug.

Currently date and copyright/year are mutually exclusive for the date
metadata, so if you change your pubdate element to a date element in the
info, then it will output a single date in the opf.

Bob Stayton
Sagehill Enterprises
Post by Peter Lavin
Hi,
I'm using the the 1.78.1-ns style sheets to create an EPUB.
Within the book.info <http://book.info> tag I want to include both a
copyright.year tag and a pubdate tag--publication dates are quite
distinct from copyright years.
ERROR: docbook.epub/OEBPS/package.opf(19,14): element "dc:date" not
allowed here
Two date entries are created in the package.opf file, one resulting from
the pubdate tag and one from the copyright.year tag.
<meta property="dcterms:date">2014-09-01</meta>
<dc:date>2014-09-01</dc:date>
<meta property="dcterms:date">2014</meta>
<dc:date>2014</dc:date>
This seems to violate the EPUB requirement that there be only one DCMES
date element. This is easy enough to fix after the fact but I don't see
an easy workaround. Any suggestions?
Thanks.
--
Peter Lavin
Telephone: 1 416 461 4991
Mobile: 1 416 882 9194
Skype: peter.lavin
(GMT -05:00 Canada/US Eastern)
Peter Lavin
2014-08-11 21:48:32 UTC
Permalink
Thanks Bob. It validates just fine now.
Post by Bob Stayton
Hi Peter,
Yes, the dates still are not handled quite correctly. Currently the date
can come from <date>, <pubdate>, or copyright/year. There should be a
single template that selects one based on a priority, which I presume
would be pubdate, date, then copyright/year. I'll log this as a bug.
Currently date and copyright/year are mutually exclusive for the date
metadata, so if you change your pubdate element to a date element in the
info, then it will output a single date in the opf.
Bob Stayton
Sagehill Enterprises
Post by Peter Lavin
Hi,
I'm using the the 1.78.1-ns style sheets to create an EPUB.
Within the book.info <http://book.info> tag I want to include both a
copyright.year tag and a pubdate tag--publication dates are quite
distinct from copyright years.
ERROR: docbook.epub/OEBPS/package.opf(19,14): element "dc:date" not
allowed here
Two date entries are created in the package.opf file, one resulting from
the pubdate tag and one from the copyright.year tag.
<meta property="dcterms:date">2014-09-01</meta>
<dc:date>2014-09-01</dc:date>
<meta property="dcterms:date">2014</meta>
<dc:date>2014</dc:date>
This seems to violate the EPUB requirement that there be only one DCMES
date element. This is easy enough to fix after the fact but I don't see
an easy workaround. Any suggestions?
Thanks.
--
Peter Lavin
Telephone: 1 416 461 4991
Mobile: 1 416 882 9194
Skype: peter.lavin
(GMT -05:00 Canada/US Eastern)
--
Peter Lavin
Telephone: 1 416 461 4991
Mobile: 1 416 882 9194
Skype: peter.lavin
(GMT -05:00 Canada/US Eastern)
Loading...