Metadata vocabularies (dc vs dcterms)

4 posts / 0 new
Last post

Hi ePubers :)

I would like to know why this does not work:



... and what is the difference between that above and:

<meta property="dcterms:date">2025</meta>

... particularly why the first thing does not work and the second does (logically I would chosen the first attitude; and more, the non-working sample I have met on some serious blog about metadata). Is there any rule about what should be treated like <meta> item and item simply in a form like <dc:date> ?? Or is the form <dc:something> allowed simply in the case of the basic vocabulary and others must have the second notation?

I would expect (as I have just read a lot about RDF) this must work too:

<dc:date dcterms:date>2025</dc:date dcterms:date>

Any help more than welcome!

Dublin Core defines both in the same way: 'A point or period of time associated with an event in the lifecycle of the resource.'

EPUB tries to redefine dc:date only as a publication date. Because the Element is in the namespace of Dublin Core, of course technically only the Dublin Core definition applies,
but still some may prefer the modified meaning as mentioned in EPUB.
Due to this attempt to redefine the meaning of dc:date, EPUB 3 allows only one such element, if you need more, you need to use the dcterms:date.

<dc:date dcterms:date>2025</dc:date dcterms:date> is not even XML, forget about this.
Technically this is possible:
with your prefix definitions...
But maybe an EPUB validator may not like the second one, better to use
<meta property="dcterms:date">2025</meta>

Effectively, most viewers will ignore such information anyway, maybe some will mentiion the dc:date as a publication date.

Reading the full names will tell you a lot: Dublin Core Metadata ELEMENT Set versus the DCMI Metadata TERMS. One is for expressing XML elements and the other is an RDF vocabulary.

To the original poster, I expect you're getting confused with RDF/XML, which is a serialization of RDF in XML form. The epub package metadata is not RDF/XML but plain old XML, so you can't write RDF properties as XML elements.

To express properties from an RDF vocabulary, you use the meta element with the properties attribute:

<meta property="dcterms:date">2015</meta>

The vocabulary also contains a subset of properties from the element set, so it's also possible to write:

<meta property="dc:date">2015</meta>

But to do this you need to declare a dc: prefix as only dcterms: is reserved and can be used without declaration. You can see the full list of reserved prefixes here:

Wow, thanks a lot! Really helpful!

Well, I know about reserved vocabularies. That's the reason I would expect that declaring the namespace in metadata tag and later using any of these vocabularies in the most simple way could work. But I understand the problem could be with epubcheck "strictness".


<meta property="dc:creator">xyz</meta>
<meta property="dcterms:creator">xyz</meta>
<meta property="marc:aut">xyz</meta>

... could be equivalent (theoretically) ...?

Secondary menu