Validator gives error on “href” attribute in manifest item for remote resources

Bug #1339766 reported by semelina on 2014-07-09
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

I know that you don't guarantee that an EPUB produced by Calibre is valid ( but I found a small bug which probably can be fixed easily and might help a lot.

Remote audio and video resources have to be included in the manifest as a separate item element, which according to the epub3 specifications require a “href” attribute.

The validator, however, marks the entry with the use of “href“ as an error while the use of “src“ seems to be valid. Unfortunately some reading software also accepts “src” and also the well-known “PUB 3 Best Practices by Matt Garrish and Markus Gylling” wrongly use “src“ in their example. So many people might also try using “src” and are assured by calibres validation and then wonder why the resources are not found by some devices.

I'm not sure what you're asking me. calibre does not support EPUB 3 in
any form whatsoever. audio and video resources, whether local or remote
are EPUB 3. So what exactly are you asking for?

 status incomplete

Changed in calibre:
status: New → Incomplete
semelina (semelina) wrote :

Sorry, but I was not aware of that and suddenly I'm very glad my epub3 file turned out so well at all.

I was asking that the validator does not mark the use of “href” and an url in the manifest as an error. Or at least that the same error should occur for the use of “src” so that the user is not lead to believe that that is correct.

Or maybe just include the note in the validator output messages that you do not support epub3. I really had not noticed that until now.

Kovid Goyal (kovid) wrote :

what validator are you refering to? The Check Book function in the
editor, that is not a validator. That checks your book for things
that are likely to not work on most reader devices. And using remote video
resources most definitely is likely to not work.

Also, having href on manifest items (I ssume you meam <item> tags) is
perfectly valid. The problem is having hrefs that refer to resources not
inside the book, which is what the error message states "A file listed
in the manifest is missing, you should either remove it from the
manifest or add the missing file to the book"

 status invalid

Changed in calibre:
status: Incomplete → Invalid
semelina (semelina) wrote :

Yes, I was referring to the Check Book tool, which did look a lot like a validator to me. Sorry if I got that wrong.

As for the check: I was just confused because there was no error message for the <item> tag when used with “src” and a url even if the specified resource was outside the book.
What if the Check Book tool would mark a missing “href” attribute inside an <item> tag as an error? That would help a lot and not just for remote resources.

Thanks for the fast replies and the generally awesome epub editor you included in calibre.

Kovid Goyal (kovid) wrote :

Sure, adding a check for a missing href is no problem.

Fixed in branch master. The fix will be in the next release. calibre is usually released every Friday.

 status fixreleased

Changed in calibre:
status: Invalid → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers