-
Notifications
You must be signed in to change notification settings - Fork 402
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: allow multiple roles for creator, contributor, and publisher (#…
…1258) In EPUB 3.2, the 'role' property was only allowed to refine 'contributor' or 'creator' properties, and only once per property. A new check was introduced in EPUBCheck v4.2.5, and some users reported that it cause issues with existing EPUB catalogs. EPUB 3.3 will relax this by allowing authors to attach several roles to creators, contributors, and publishers. This commit proactively implements the relaxed EPUB 3.3 rules. Fixes #1230
- Loading branch information
Showing
4 changed files
with
42 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
src/test/resources/epub3/files/package-document/metadata-meta-role-valid.opf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<package xmlns="http://www.idpf.org/2007/opf" version="3.0" unique-identifier="uid" | ||
xmlns:dc="http://purl.org/dc/elements/1.1/"> | ||
<metadata> | ||
<dc:title>Title</dc:title> | ||
<dc:language>en</dc:language> | ||
<dc:identifier id="uid">NOID</dc:identifier> | ||
<meta property="dcterms:modified">2019-01-01T12:00:00Z</meta> | ||
<dc:creator id="creator1">Jane Doe</dc:creator> | ||
<dc:creator id="creator2">John Doe</dc:creator> | ||
<dc:contributor id="contributor">Claudia Contributor</dc:contributor> | ||
<dc:publisher id="publisher">Paula Publisher</dc:publisher> | ||
<!-- Multiple roles for a single creator --> | ||
<meta property="role" refines="#creator1">aut</meta> | ||
<meta property="role" refines="#creator1">ill</meta> | ||
<!--Role for another creator--> | ||
<meta property="role" refines="#creator2">aut</meta> | ||
<!-- Multiple roles for a contributor --> | ||
<meta property="role" refines="#contributor">ill</meta> | ||
<meta property="role" refines="#contributor">bkd</meta> | ||
<!-- Multiple roles for a publisher --> | ||
<meta property="role" refines="#publisher">pbl</meta> | ||
<meta property="role" refines="#publisher">pbd</meta> | ||
</metadata> | ||
<manifest> | ||
<item id="t001" href="contents.xhtml" properties="nav" media-type="application/xhtml+xml"/> | ||
</manifest> | ||
<spine> | ||
<itemref idref="t001"/> | ||
</spine> | ||
</package> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters