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

OPF package metadata link element + prefix (support is missing) #16

Open
danielweck opened this issue Mar 18, 2019 · 6 comments
Open

OPF package metadata link element + prefix (support is missing) #16

danielweck opened this issue Mar 18, 2019 · 6 comments

Comments

@danielweck
Copy link
Member

danielweck commented Mar 18, 2019

For example:
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>

EDIT: see comment below #16 (comment)

Note how <meta property="cc:attributionURL">http://code.google.com/p/epub-samples/</meta> is missing in the ReadiumWebPubManifest:
http://readium2.herokuapp.com/pub/L2FwcC9taXNjL2VwdWJzL3dhc3RlbGFuZC1vdGYtb2JmLmVwdWI%3D/manifest.json/show/all
(or https://readium2.now.sh/pub/L2hvbWUvbm93dXNlci9zcmMvbWlzYy9lcHVicy93YXN0ZWxhbmQtb3RmLW9iZi5lcHVi/manifest.json/show/all )

{
    "@context": "https://readium.org/webpub-manifest/context.jsonld",
    "metadata": {
        "@type": "http://schema.org/Book",
        "title": "The Waste Land",
        "identifier": "code.google.com.epub-samples.wasteland-otf-obfuscated",
        "author": "T.S. Eliot",
        "language": "en-US",
        "modified": "2019-04-24T16:58:39.677Z",
        "published": "2011-09-01T00:00:00.000Z",
        "description": "OTF font obfuscated using algorithm defined in OCF 3.0, fallback to sans-serif system font",
        "rights": "This work is shared with the public using the Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) license."
    }
}
@danielweck
Copy link
Member Author

Also, prefix="cc: http://creativecommons.org/ns#"

@danielweck danielweck changed the title OPF package metadata link element (support is missing) OPF package metadata link element + prefix (support is missing) Mar 18, 2019
@danielweck
Copy link
Member Author

danielweck commented Mar 18, 2019

If I am not mistaken, the ReadiumWebPublicationManifest (aka RWPM) does not encode the EPUB OPF package > metadata > link as such. See the JSON Schema:
https://github.com/readium/webpub-manifest/blob/master/schema/metadata.schema.json

EDIT: see issue readium/webpub-manifest#28

Consequently, the TypeScript model reflects that too:
https://github.com/readium/r2-shared-js/blob/develop/src/models/metadata.ts

However, the OPF model should indeed include support for the link XML element of OPF. It currently does not:
https://github.com/readium/r2-shared-js/blob/develop/src/parser/epub/opf-metadata.ts

I am not seeing a clear definition in the architecture document either:
https://github.com/readium/architecture/blob/master/streamer/parser/metadata.md
...so perhaps this is an opportunity to contribute, once we figure out the formal definition of link parsing (CC @JayPanoz )

@danielweck
Copy link
Member Author

Related issue (Readium "1" C++ SDK): readium/readium-sdk#318 (comment)

@danielweck
Copy link
Member Author

danielweck commented Apr 24, 2019

Prominent use case: accessibility metadata, e.g.

http://kb.daisy.org/publishing/docs/metadata/evaluation.html
a11y:certifiedBy ( http://www.idpf.org/epub/vocab/package/a11y/# )
dcterms:conformsTo

http://kb.daisy.org/publishing/docs/metadata/schema-org.html
schema:accessModeSufficient

http://www.idpf.org/epub/a11y/accessibility.html#sec-disc-package

@danielweck
Copy link
Member Author

See: readium/webpub-manifest#14

@danielweck
Copy link
Member Author

danielweck commented Mar 23, 2023

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

1 participant