Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Meta properties + one or zero cardinality #1121

Closed
JayPanoz opened this issue Mar 26, 2020 · 3 comments · Fixed by #1205
Closed

Meta properties + one or zero cardinality #1121

JayPanoz opened this issue Mar 26, 2020 · 3 comments · Fixed by #1205
Labels
spec: EPUB 3.x Impacting the support of EPUB 3.x specifications status: has PR The issue is being processed in a pull request type: false-negative This issue is about invalid content being incorrectly accepted
Milestone

Comments

@JayPanoz
Copy link

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.

refine-role.zip

@mattgarrish
Copy link
Member

Epubcheck bug. It should report properties used more than their cardinality allows.

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.

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
Copy link
Author

Thanks for the clarification! All clear now.

@rdeltour rdeltour added spec: EPUB 3.x Impacting the support of EPUB 3.x specifications status: accepted Ready to be further processed type: false-negative This issue is about invalid content being incorrectly accepted labels Aug 14, 2020
@rdeltour rdeltour added this to the v4.2.5 milestone Aug 14, 2020
rdeltour added a commit that referenced this issue Feb 26, 2021
The cardinality of refining properties defined with the `meta` element
is defined in Appendix C "Meta Properties Vocabulary":
  https://www.w3.org/publishing/epub32/epub-packages.html#app-meta-property-vocab

Summary:
- add schematron rules to check that properties defined as
"zero or one" are not defined more than once
- add test for all properties
- rename some existing tests for consistency

Fixes #1121
@rdeltour rdeltour added status: has PR The issue is being processed in a pull request and removed status: accepted Ready to be further processed labels Feb 26, 2021
rdeltour added a commit that referenced this issue Feb 26, 2021
The cardinality of refining properties defined with the `meta` element
is defined in Appendix C "Meta Properties Vocabulary":
  https://www.w3.org/publishing/epub32/epub-packages.html#app-meta-property-vocab

Summary:
- add schematron rules to check that properties defined as
"zero or one" are not defined more than once
- add test for all properties
- rename some existing tests for consistency

Fixes #1121
rdeltour added a commit that referenced this issue Feb 26, 2021
The cardinality of refining properties defined with the `meta` element
is defined in Appendix C "Meta Properties Vocabulary":
  https://www.w3.org/publishing/epub32/epub-packages.html#app-meta-property-vocab

Summary:
- add schematron rules to check that properties defined as
"zero or one" are not defined more than once
- add test for all properties
- rename some existing tests for consistency

Fixes #1121
@wareid
Copy link

wareid commented 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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
spec: EPUB 3.x Impacting the support of EPUB 3.x specifications status: has PR The issue is being processed in a pull request type: false-negative This issue is about invalid content being incorrectly accepted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants