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

Metadata links (EPUB parsing) #28

Open
danielweck opened this issue Apr 24, 2019 · 2 comments
Open

Metadata links (EPUB parsing) #28

danielweck opened this issue Apr 24, 2019 · 2 comments

Comments

@danielweck
Copy link
Member

How should we parse <link rel="cc:license" href="http://creativecommons.org/licenses/by-sa/3.0/"/> (for example).

What is the JSON Schema equivalent?
https://github.com/readium/webpub-manifest/blob/master/schema/metadata.schema.json

Complete OPF example (note the <link rel="cc:license" refines="#cover" ... />):
https://github.com/IDPF/epub3-samples/blob/master/30/wasteland/EPUB/wasteland.opf

<?xml version="1.0" encoding="UTF-8"?>
<package xmlns="http://www.idpf.org/2007/opf" version="3.0" unique-identifier="uid" xml:lang="en-US" prefix="cc: http://creativecommons.org/ns#">
    <metadata xmlns:dc="http://purl.org/dc/elements/1.1/">
        <dc:identifier id="uid">code.google.com.epub-samples.wasteland-basic</dc:identifier>
        <dc:title>The Waste Land</dc:title>
        <dc:creator>T.S. Eliot</dc:creator>
        <dc:language>en-US</dc:language>
        <dc:date>2011-09-01</dc:date>
        <meta property="dcterms:modified">2012-01-18T12:47:00Z</meta>
        <!-- rights expressions for the work as a whole -->
        <dc:rights>This work is shared with the public using the Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) license.</dc:rights>        
        <link rel="cc:license" href="http://creativecommons.org/licenses/by-sa/3.0/"/>
        <meta property="cc:attributionURL">http://code.google.com/p/epub-samples/</meta>
        <!-- rights expression for the cover image -->       
        <link rel="cc:license" refines="#cover" href="http://creativecommons.org/licenses/by-sa/3.0/" />
        <link rel="cc:attributionURL" refines="#cover" href="http://en.wikipedia.org/wiki/Simon_Fieldhouse" />        
        <!-- cover meta element included for 2.0 reading system compatibility: -->
        <meta name="cover" content="cover"/>
    </metadata> 
    <manifest>
        <item id="t1" href="wasteland-content.xhtml" media-type="application/xhtml+xml" />
        <item id="nav" href="wasteland-nav.xhtml" properties="nav" media-type="application/xhtml+xml" />
        <item id="cover" href="wasteland-cover.jpg" media-type="image/jpeg" properties="cover-image" />
        <item id="css" href="wasteland.css" media-type="text/css" />
        <item id="css-night" href="wasteland-night.css" media-type="text/css" />
        <!-- ncx included for 2.0 reading system compatibility: -->
        <item id="ncx" href="wasteland.ncx" media-type="application/x-dtbncx+xml" />
    </manifest>
    <spine toc="ncx">
        <itemref idref="t1" />        
    </spine>    
</package>

Related issue: readium/r2-shared-js#16

@danielweck
Copy link
Member Author

The parser doc should be updated too:
https://github.com/readium/architecture/blob/master/streamer/parser/metadata.md

@HadrienGardeur
Copy link
Collaborator

For <link rel="cc:license" href="http://creativecommons.org/licenses/by-sa/3.0/"/> we could do the following:

  • add a Link Object in links
  • extend the rel into a full URI: http://creativecommons.org/ns#license

refines is the problematic part, we don't really have the ability to support this on every metadata or resource listed in the publication.
We can refine a contributor, a publisher, a collection or a series, but we can't do this on resources listed readingOrder or resources.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants