-
Notifications
You must be signed in to change notification settings - Fork 23
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
Adding information about the profile in the manifest #65
Comments
I believe that using One could imagine for example publishing a collected edition of a podcast using our audiobook profile, in which case:
|
Please also see: readium/architecture#134 |
In this case, we'll need to manage a small registry of profiles. If we consider https://readium.org/webpub-manifest/#8-extensibility plus the pdf we also need to handle, we'll define:
re. epub, shouldn't it be |
There's already a registry of profiles available at https://readium.org/webpub-manifest/profiles/ |
This is the pointer to the specification of conformsTo in the W3C Publication Manifest: (defined as a string or list, with the note 'The conformsTo property can also be used to indicate conformance to other specifications and standards (e.g., to [wcag21]).' |
Is this settled? In the navigator, should we by default not inject any JavaScript nor Readium CSS in Readium Web Publications, unless the manifest contains this?
|
I implemented it in Swift in readium/swift-toolkit#19 I also added a Publication helper /// Returns whether this manifest conforms to the given Readium Web Publication Profile.
public func conforms(to profile: Publication.Profile) -> Bool {
guard !readingOrder.isEmpty else {
return false
}
switch profile {
case .audiobook:
return readingOrder.allAreAudio
case .divina:
return readingOrder.allAreBitmap
case .epub:
// EPUB needs to be explicitly indicated in `conformsTo`, otherwise
// it could be a regular Web Publication.
return readingOrder.allAreHTML && metadata.conformsTo.contains(.epub)
case .pdf:
return readingOrder.all(matchMediaType: .pdf)
default:
break
}
// Fallback for extension profiles.
return metadata.conformsTo.contains(profile)
} Apps are encouraged to switch to this to check if a |
Currently, RWPM doesn't contain any information about its profile (e.g. Audiobook, DiViNa...), but we need this information for example to figure out which Navigator to use.
At the moment, we're using different heuristics per profiles:
http://schema.org/Audiobook
for its@type
property, or contains only resources with an audio type in its reading order.This can be source of errors, and it would be useful to have the profile indicated in the manifest itself instead. Any thoughts on how it could look like? A
conformsTo
property, for example.The text was updated successfully, but these errors were encountered: