-
Notifications
You must be signed in to change notification settings - Fork 60
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
file
URLs in manifest items
#1688
Comments
+1 to that! |
The issue was discussed in a meeting on 2021-06-10 List of resolutions:
View the transcript2. URLs and the package documentSee github issue #1681, #1374, #1688, #1686. Dave Cramer: this is a bunch of issues that revolve around how you interpret URLs in the package document, especially if they're absolute URLs Matt Garrish: in epubcheck there was a root-relative URL that caused an error, and that spawned all of this Dave Cramer: in issue 1688 Romain he suggests that manifest items should have one of the special schemes (except Matt Garrish: there are edge cases where file scheme items make sense, but not generally for epub Dave Cramer: it goes against epub as a portable format, and the file scheme ties the epub to a specific file system Matt Garrish: never heard of one Dave Cramer: okay, so what if we just say no file URLs in epub? Matt Garrish: most RS probably won't do anything with file URL Wendy Reid: depending on platform you might not even be able to access parts of the file system (e.g. iOS apps) Dave Cramer: can we start by resolving on this point from 1688?
Dan Lazin: is there a use case for some of these other schemes? Why would you have an FTP in your epub? Matt Garrish: if we go too far, do we prevent future stuff? will we have to come back and re-add this in the future? Ben Schroeter: is the idea that if we disallow file scheme, then we also disallow "slash URLs"? Matt Garrish: not sure those are the same Dave Cramer: what would be the consequences of forbidding root-relative paths? Matt Garrish: not sure there are any, because epubcheck had forbidden these until a recent update Dave Cramer: and this is just for href on manifest? Matt Garrish: no, this would be anywhere, e.g. in content docs too Dan Lazin: do we support the base tag? Dave Cramer: we've been phasing out Dan Lazin: the base tag allows you to define what the relative path is relative to Matt Garrish: base would force you to have all external resources, right? It exists, but I don't imagine anyone really going there
Marisa DeMeglio: there was a resolution a few weeks ago about dumping Dave Cramer: and that's separate from the HTML base element Dan Lazin: if you set base to some website, and then use root-relative URLs, your URLs would appear to be relative, when they are actually absolute Dave Cramer: but can we really say anything about base because its part of HTML? Matt Garrish: so you must not use root-relative URLs unless you use a base? Dan Lazin: what was the harm in not banning root-relative? Matt Garrish: because the RS might treat zip root as the root, but they could also treat location of package doc as root Dan Lazin: maybe permit it, but use SHOULD NOT? Dave Cramer: yes, e.g. with books that only work with iBooks because of scripting support Matt Garrish: maybe just a note that root-relative could cause issues if authors use it? Dave Cramer: so does that mean that there are epubs that could be built to work in some RS, but expose an interop issue if opened in another RS? Matt Garrish: right Dave Cramer: not sure what the right course of action is, but maybe we can continue this another time with Romain present Wendy Reid: we need RS people here on next call that know exactly what RSes are doing right now Marisa DeMeglio: one of the github threads has a sample, but I wasn't able to download it
Matt Garrish: also, there's not much hand authoring, and most tools will put all the content into one folder |
The [WG resolution](https://www.w3.org/publishing/groups/epub-wg/Meetings/Minutes/2021-06-10-epub#resolution2) says "SHOULD NOT" and not "MUST NOT", so this is what the PR uses. There may be a question whether "MUST NOT" is more appropriate here. Fixes #1688.
Manifest items can identify resources with absolute URLs. So an EPUB can theoretically use local file system resource with
file
URLs.Using
file
URLs in the manifest is not a good practice, but has never been strictly forbidden (as far as I know). I think it's probably often used by mistake rather than intentionally. But there might be legit use cases, like an internal documentation system (as @mattgarrish pointed out in #1374).Would it be reasonable to say that absolute URLs SHOULD have a special scheme that is not
file
?In parallel we can also make it explicit what Reading Systems can/should do with absolute URLs as manifest entries.
The text was updated successfully, but these errors were encountered: