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

Question about enforcement of dcterms:modified metadata element #11

Closed
nleme opened this issue Jul 11, 2013 · 6 comments
Closed

Question about enforcement of dcterms:modified metadata element #11

nleme opened this issue Jul 11, 2013 · 6 comments

Comments

@nleme
Copy link
Contributor

nleme commented Jul 11, 2013

Hi,

I'm taking a look at the code for Readium SDK, and I noticed the following piece of code in the file package.cpp, lines 539-540:

    if ( !foundModDate )
        HandleError(EPUBError::OPFMissingModificationDateMetadata);

Basically, what that does is to make mandatory that the OPF for a given ePub must have the "dcterms:modified" metadata element. Because of that, if a given ePub does not have that metadata element, the Readium SDK will not be able to open that ePub.

I'm not aware of the discussions around that definition on the spec, however, is that metadata element that critical? I think that maybe the standard could be more forgiving around this specific piece of data.

@AlanQuatermain
Copy link
Member

The ePub 3 spec says that property is required, as it's used in the generation of the publication's unique ID. It wasn't required for earlier versions of the spec though.

Sent from my iPhone

On Jul 11, 2013, at 6:02 PM, Nelson Leme notifications@github.com wrote:

Hi,

I'm taking a look at the code for Readium SDK, and I noticed the following piece of code in the file package.cpp, lines 539-540:

if ( !foundModDate )
    HandleError(EPUBError::OPFMissingModificationDateMetadata);

Basically, what that does is to make mandatory that the OPF for a given ePub must have the "dcterms:modified" metadata element. Because of that, if a given ePub does not have that metadata element, the Readium SDK will not be able to open that ePub.

I'm not aware of the discussions around that definition on the spec, however, is that metadata element that critical? I think that maybe the standard could be more forgiving around this specific piece of data.


Reply to this email directly or view it on GitHub.

@danielweck
Copy link
Member

Just out of interest: can the actual error handler implementation behind "HandleError" be overridden / specified on the client side of the API, so that the Readium SDK can potentially be used in a context different than a reading system app? (e.g. authoring tool => report error / warning, but do not emit a fatal error)
_daniel

@AlanQuatermain
Copy link
Member

Yes, the function called by the API here actually calls a user-specified error handler. That makes the decision on whether to throw an exception or not. Probably it could return an enumerated constant instead: throw exception, fail, or ignore.

Sent from my iPhone

On Jul 11, 2013, at 6:13 PM, danielweck notifications@github.com wrote:

Just out of interest: can the actual error handler implementation behind "HandleError" be overridden / specified on the client side of the API, so that the Readium SDK can potentially be used in a context different than a reading system app? (e.g. authoring tool => report error / warning, but do not emit a fatal error)
_daniel


Reply to this email directly or view it on GitHub.

@rkwright
Copy link
Member

This is truly ancient and the question posed by Nelson seems to have been answered. Closing.

@danielweck
Copy link
Member

Note that this issue is now discussed here: readium/SDKLauncher-Android#33

@danielweck
Copy link
Member

Note that cancellable warning messages (popup dialogs) have been implemented in iOS, OSX and Android launchers as "error handlers" (as per the SDK terminology):
readium/SDKLauncher-iOS#45
readium/SDKLauncher-OSX#33
readium/SDKLauncher-Android#33
However, this still leaves the issue of discriminating EPUB 2 vs 3 when detecting invalidity problems (should the hard-coded repository of error types include additional EPUB version info?) See new issue: #133

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

4 participants