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

Media type parameters for EPUB #1026

Closed
HadrienGardeur opened this issue Apr 16, 2018 · 14 comments
Closed

Media type parameters for EPUB #1026

HadrienGardeur opened this issue Apr 16, 2018 · 14 comments
Labels
EPUB33 Issues addressed in the EPUB 3.3 revision Spec-EPUB3 The issue affects the core EPUB 3.3 Recommendation Status-Deferred The issue has been deferred to another revision Topic-OCF The issue affects the OCF section of the core EPUB 3 specification

Comments

@HadrienGardeur
Copy link

While all EPUB files share the same media type and file extension, there are a number of things that can make a specific file impossible to open or render correctly on a given device and/or app.

The top two reasons why you might not be able to render an EPUB correctly are:

  • FXL
  • use of a specific DRM

Adding these two info in the media type of the EPUB would make it possible for apps to trigger specific behavior: for instance an OPDS client could display a warning when downloading an FXL EPUB or it could disable the download button if the file is protected by an unsupported DRM.

@GarthConboy
Copy link

Do you mean something additional in the package? Or augmenting "application/epub+zip" (and ".epub")?

@HadrienGardeur
Copy link
Author

Nothing in the package, just a media type parameter.

For example this could be:

  • application/epub+zip; layout=pre-paginated
  • application/epub+zip; drm=lcp

@TzviyaSiegman
Copy link
Contributor

Wouldn't this break backward compat, the whole goal of 3.2?

@HadrienGardeur
Copy link
Author

I don't think media type parameters would break anything.

@GarthConboy
Copy link

Probably okay from a backward compatibility perspective, as it's serving time only. But, I do kinda worry about information duplication (from package and encryption.xml, respectively), and the need to define a couple of more vocabularies.

@iherman
Copy link
Member

iherman commented Apr 16, 2018

It depends. Proper HTTP toolkits or media type 'managing' libraries separate the media parameter from the rest, ie, if a client is not interested in those (as now) then the new parameters would not bother anyone. However, it is not impossible that some tools parse the media type 'by hand', via some regular expression, for example, and does not take the extra type into account: those may get it wrong. One could argue, though, that such implementations should be considered as buggy...

@HadrienGardeur
Copy link
Author

But, I do kinda worry about information duplication (from package and encryption.xml, respectively), and the need to define a couple of more vocabularies.

In the case of an API (like OPDS), this wouldn't be duplication since this could trigger specific behaviour before you download that file.

For FXL publications, some of them can be massive. It would make a real impact (not in a good way) if we had to download those to figure this out.

@murata2makoto
Copy link
Contributor

Media type parameters are hard to sell.

In my understanding, EPUB A11Y recommends that bookstores should extract metadata from EPUB publications and use it for filtering of EPUB publications. I think that we should do the same thing.

@HadrienGardeur
Copy link
Author

Bookstores typically receive this kind of information in ONIX where there are specific tags and code lists.
This can identify if an EPUB is an FXL or interactive, and it can identify which DRM is used.

But we need a solution that works for everyone and is not dependent on ONIX.

@dauwhe
Copy link
Contributor

dauwhe commented Apr 17, 2018

Just to confirm, you're proposing that the mimetype file at the root of the package would optionally contain a media type parameter, with new values to be determined?

@HadrienGardeur
Copy link
Author

No, I'm proposing that we update our IANA registration to include additional parameters that would be used in HTTP headers and hypermedia APIs.

If you already have the package, it's too late too rely on such hint.

@dauwhe dauwhe added Topic-OCF The issue affects the OCF section of the core EPUB 3 specification Agenda+ Issues that should be discussed during the next working group call. labels Jun 12, 2018
@BigBlueHat
Copy link
Member

There's a separate parameters registry, fwiw: https://www.iana.org/assignments/media-type-sub-parameters/media-type-sub-parameters.xhtml

If the application/epub+zip definition does get an update, perhaps using this separate registry for parameters would serve long term goals better than updating the media type definition every time a parameter is added.

However, I'd share @dauwhe's concern that adding these to the mimetype file should be tested thoroughly as I'd be concerned that implementers may only be doing string matches at that level.

@dauwhe dauwhe added Status-Deferred The issue has been deferred to another revision and removed Agenda+ Issues that should be discussed during the next working group call. labels Jun 14, 2018
@dauwhe
Copy link
Contributor

dauwhe commented Jun 14, 2018

Consensus on the CG call today was this was not something we're ready to due with the 3.2 revision. With more implementer interest it would be worth discussing for EPUB 4.

@dauwhe dauwhe added the Agenda+ Issues that should be discussed during the next working group call. label Feb 24, 2021
@iherman
Copy link
Member

iherman commented Mar 5, 2021

The issue was discussed in a meeting on 2021-03-04

List of resolutions:

View the transcript

1. Media type parameter for EPUB

See github issue #1026.

Wendy Reid: epub type parameter would add hint to epub mime type about the specific epub
… e.g. is it FXL? Does it have a special DRM?
… these hints can be interpreted by RS for specific functionality
… there was a concern about backwards compatibility, but it was determined that that wasn't really an issue
… however, a lot of this same info can be found in package metadata

Brady Duga: clarify that this is changing IANA registration, not the mimetype file

Wendy Reid: benjamin posted that there is an existing registry of IANA properties

Matthew Chan: dauwhe joining by call-in

Dave Cramer: without interest from multiple implementers I'm not sure that we should invest in this issue speculatively

Proposed resolution: Close issue #1026, will not implement (Wendy Reid)

Matt Garrish: +1

Brady Duga: +1

Masakazu Kitahara: +1

Marisa DeMeglio: +1

Wendy Reid: +1

Toshiaki Koike: +1

Matthew Chan: +1

Resolution #1: Close issue #1026, will not implement

@iherman iherman closed this as completed Mar 5, 2021
@dauwhe dauwhe removed the Agenda+ Issues that should be discussed during the next working group call. label Apr 21, 2021
@mattgarrish mattgarrish added the EPUB33 Issues addressed in the EPUB 3.3 revision label May 2, 2021
@mattgarrish mattgarrish added the Spec-EPUB3 The issue affects the core EPUB 3.3 Recommendation label Sep 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
EPUB33 Issues addressed in the EPUB 3.3 revision Spec-EPUB3 The issue affects the core EPUB 3.3 Recommendation Status-Deferred The issue has been deferred to another revision Topic-OCF The issue affects the OCF section of the core EPUB 3 specification
Projects
None yet
Development

No branches or pull requests

8 participants