diff --git a/src/main/resources/com/adobe/epubcheck/schema/30/package-30.sch b/src/main/resources/com/adobe/epubcheck/schema/30/package-30.sch index 2383716a4..83d7273d7 100644 --- a/src/main/resources/com/adobe/epubcheck/schema/30/package-30.sch +++ b/src/main/resources/com/adobe/epubcheck/schema/30/package-30.sch @@ -128,10 +128,8 @@ - Property "role" must refine a "creator" or "contributor" property. - Property "role" cannot be declared more than once to refine a single "creator" or "contributor" property. + Property "role" must refine a "creator", "contributor", or "publisher" property. diff --git a/src/test/resources/epub3/files/package-document/metadata-meta-role-cardinality-error.opf b/src/test/resources/epub3/files/package-document/metadata-meta-role-refines-disallowed-error.opf similarity index 63% rename from src/test/resources/epub3/files/package-document/metadata-meta-role-cardinality-error.opf rename to src/test/resources/epub3/files/package-document/metadata-meta-role-refines-disallowed-error.opf index cd542d640..5ce088a99 100644 --- a/src/test/resources/epub3/files/package-document/metadata-meta-role-cardinality-error.opf +++ b/src/test/resources/epub3/files/package-document/metadata-meta-role-refines-disallowed-error.opf @@ -2,15 +2,11 @@ - Title + Title en NOID 2019-01-01T12:00:00Z - Jane Doe - John Doe - aut - edt - aut + title diff --git a/src/test/resources/epub3/files/package-document/metadata-meta-role-valid.opf b/src/test/resources/epub3/files/package-document/metadata-meta-role-valid.opf new file mode 100644 index 000000000..2bfc3eda0 --- /dev/null +++ b/src/test/resources/epub3/files/package-document/metadata-meta-role-valid.opf @@ -0,0 +1,31 @@ + + + + Title + en + NOID + 2019-01-01T12:00:00Z + Jane Doe + John Doe + Claudia Contributor + Paula Publisher + + aut + ill + + aut + + ill + bkd + + pbl + pbd + + + + + + + + diff --git a/src/test/resources/epub3/package-document.feature b/src/test/resources/epub3/package-document.feature index 9989afecf..310ebacd5 100644 --- a/src/test/resources/epub3/package-document.feature +++ b/src/test/resources/epub3/package-document.feature @@ -730,10 +730,14 @@ Feature: EPUB 3 ▸ Packages ▸ Package Document Checks And the message contains "the meta-auth property is deprecated" And no other errors or warnings are reported - Scenario: 'role' metadata cannot be defined more than once to refine the same expression - When checking file 'metadata-meta-role-cardinality-error.opf' + Scenario: 'role' metadata can be used once or more to refine a creator, contributor, or publisher + When checking file 'metadata-meta-role-valid.opf' + Then no errors or warnings are reported + + Scenario: 'role' metadata cannot be used to refine properties other than creator, contributor, or publisher + When checking file 'metadata-meta-role-refines-disallowed-error.opf' Then error RSC-005 is reported - And the message contains '"role" cannot be declared more than once' + And the message contains '"role" must refine a "creator", "contributor", or "publisher" property' And no other errors or warnings are reported Scenario: 'source-of' metadata can be used to refine the pagination source