Repository navigation
Description
Hi,
At this point I can’t really tell whether it’s a bug but I guess it’s at least worth opening an issue in case it can be clarified and labeled properly for people in the future in case it’s a wontfix.
So I’m referring to the “meta properties” section of EPUB Packages 3.2.
So let’s start with zero or more cardinality. Obviously, people are aware of alternate-script e.g.
<dc:creator id="creator1">Jane Doe</dc:creator>
<meta property="alternate-script" refines="#creator1" xml:lang="ja">山田花子</meta>
<meta property="alternate-script" refines="#creator1" xml:lang="ar">فُلانة الفُلانيّة</meta>
Which is obviously fine.
But then I have a doubt with zero or one cardinality, as EPUBCheck doesn’t report anything for:
<dc:creator id="creator1">Jane Doe</dc:creator>
<meta property="role" refines="#creator1" scheme="marc:relators">aut</meta>
<meta property="role" refines="#creator1" scheme="marc:relators">edt</meta>
nor:
<dc:title id="t1">Title of the book</dc:title>
<meta property="title-type" refines="#t1">main</meta>
<meta property="title-type" refines="#t1">subtitle</meta>
Is this a bug, is this the spec? I honestly can’t tell at this point – and we have a hard time finding a common interpretation amongst a group of people, hence why I prefer to open this issue too.
Mind you, it would not be unreasonable for a creator or contributor to have different roles in a contribution so OK at least that makes sense. And then I go back to the introduction of the section and there is this:
the Cardinality field indicates the number of times the property MAY be attached to another property.
And now as someone who has to parse that, I must admit I’m not so sure what to make of that anymore. I know of at least one authoring app that will enforce only one meta for role, title-type, etc. (Zero or 1 cardinality) even if you put multiple in its metadata editor but are they right, or wrong?
Anyways, here’s a test file if that happens to be a bug.
Activity
mattgarrish commentedon Mar 26, 2020
Epubcheck bug. It should report properties used more than their cardinality allows.
Yes, we had this discussion at some point in the working group. The cardinality was restricted to one so that it would align with the EPUB 2 opf:role attribute, and also to keep discovery as simple as possible. You'd have to repeat the creator/contributor for each role if it's critical to specify that information.
JayPanoz commentedon Mar 26, 2020
Thanks for the clarification! All clear now.
feat: check required cardinality of meta properties
feat: check required cardinality of meta properties
feat: check required cardinality of meta properties
wareid commentedon Mar 26, 2021
@rdeltour We discussed this issue in the EPUB WG meeting this week and Matt will be working on a PR to change the cardinality. This will be accepted as a change in EPUB 3.3, but we leave it up to the EPUBCheck team to decide how to handle these changes!
w3c/epub-specs#1129 (comment)