-
Notifications
You must be signed in to change notification settings - Fork 61
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
Recommend that path-absolute-URL strings not be used to reference resources #1725
Conversation
Very very minor editorial remark: I would move the note in §6.1.3 to the end of that subsection; at present, it really breaks the reading flow too much for my taste. I realize it is a note regarding the preceding paragraph (and maybe it is worth adapting the language) but the really main message for the reader is the text and example after the note and that gets a bit de-emphasized by the note... |
(Interestingly and somewhat annoyingly, if the file itself is reviewed, as opposed to the diff file, it now shows tons of differences that are irrelevant, essentially changes line break places. I presume that may be related to another PR having been merged since the creation of this one. Very annoying indeed, so reviewers should only look at the diff file...) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Personally I'm not a big fan of this resolution. I don't see why we have to make a specific statement about path-absolute URL strings if the URI resolution mechanism is well defined. A note would be enough.
Additionally, I'm not sure where "Reasing Systems are not required to create the Root Directory when unpacking the EPUB container" is defined. Nor why it is exactly relevant (since we know RS are not required to unpack anything in the first place).
I understand it is a useful example to understand the issue with root-relative paths, but then it shouldn't be in normative text, but in a note.
I suggest that we make a resolution on #1374 before merging this and fixing #1681.
Could be, but we've been tackling the issues one at a time. There's no harm if a future resolution undoes this change as far as I'm concerned. By merging, though, we can look at the next issue in context of what we have so far instead of trying to solve multiple issues all at the same time.
There isn't a requirement to do anything with the root directory so It's only mentioned in the definition:
https://w3c.github.io/epub-specs/epub33/core/#dfn-root-directory I still think the normative-sounding part should be a real normative statement (i.e., that the directory is "virtual in nature" should link to the normative statement after the colon which we put somewhere in the RS specification).
Notes tend to be a bit more explanatory than a single example. It's a little too lengthy for an "e.g.", plus there's already a parenthetical in the preceding sentence so it would make for a lengthy run-on. I'll take a look and see if there's a way to make it more "note-worthy", though. |
I agree with taking these issues one at a time, but the order sounds counter intuitive to me 😁 |
…nzipping; add statement that root directory does not have to be created to RS requirements; fix the formatting of the container requirements list to match new pattern
…to fix/issue-1681
Ya, not sure if we should get into that here, though. Took me a while to figure out that a "language specification" is just a "specification" or "format specification". Sounded like I'd dropped into a section on language codes. I'm not 100% sure what the note is even saying. We already say the base is defined per format, so is this note saying that relative paths are also bound to specific rules of the format? If so, is that really a note or a normative requirement? |
Ya, looks like line formatting changed, but that it affects text we haven't updated recently is odd. Can't explain. |
All roads lead to somewhere in the end, right? 😉 I've added a note and changed the text to instead note that it's the variability of the root (root directory or package document location) that causes the issue. Unzipping manifests it more obviously, but even packed this appears to be the source of resources not being available. I've also moved the text about creating the root directory being optional to the ocf container requirements. But I'm sure there will be more changes before we're done. If you have a proposal for closing #1374, feel free to suggest it. |
I was wondering which formats this note would refer to, but I do not think I have anything in mind right now. Maybe nuke the note altogether? |
# Conflicts: # epub33/core/index.html
I fixed this in main and merged into this branch so the diffs now look better. |
The issue was discussed in a meeting on 2021-07-02
View the transcript2. Are root-relative paths valid?See github issue #1681, #1374. See github pull request #1725. Dave Cramer: What more needs to happen or can happen in the spec for root-relative paths? Ivan Herman: one problem we need to address is that we have a problem with iBooks and others that rely on Adobe ADE, namely that they rely on a specific way of organizing the files, which is not in the standard. Romain Deltour: the test was done with valid ePub with shared resources - there is still the issue of root-relative URL paths and paths that would go outside the container. I think we need the spec to address that. John Foliot: Is an unintended consequence that a publisher would have to create two versions, one for iBooks and another for other reading systems? Dave Cramer: I don't see huge problems around interoperability because EPUBs are consistent with folder structure, generally. Ivan Herman: Whatever works for iBooks works for others - but there are perfectly valid ePubs that iBooks doesn't take. Romain Deltour: these are edge cases, we don't see this problem often if ever. Ivan Herman: it would be helpful to have a clearly-worded proposal for reading systems. Hoping Romain's help with this. Dave Cramer: everyone seems to agree that having Hadrien Gardeur: from a reading system perspective, they need to resolve URIs, and expose the HTML resource (or any resource) to web view. Ivan Herman: What precisely should the recommendation in the reading system spec be to cover all implementations? Hadrien Gardeur: we don't know how each RS works behind the scenes, we can only speculate. Ivan Herman: If we put something in the spec, it's up to RS how to implement Hadrien Gardeur: On the web, we don't think about files and root containers. For reading systems, we are deciding how an EPUB behaves. So weary of this conceptual approach. Dave Cramer: we are really talking about edge cases here. Hoping that we can build some tests based on the write-up and what we are trying to achieve. Hadrien Gardeur: difficult to test everywhere - gets tricky when you have to consider different CSS, etc Dave Cramer: let's get some proposals down with Romain's help, and get Matt to take a look at them, and proceed from there. Ivan Herman: Must have a clear statement somewhere whether we intend to restrict EPUB content and define organization of EPUB package. |
# Conflicts: # epub33/core/index.html
The issue was discussed in a meeting on 2021-10-29 List of resolutions:
View the transcript2.3. "IRI of the Package Document": what is this exactly? (issue epub-specs#1374)See github issue epub-specs#1374.
Romain Deltour: I may summarize.
Romain Deltour: for using this algorith we have to now the base URL (https://example.org).
Romain Deltour: I'm going to show other examples.
Romain Deltour: in this case I'm going outside of the EPUB.
Romain Deltour: that's why I think we should define which is the base URL, also for security issues. Ivan Herman: I remember that one solution may be to consider an EPUB as a localhost (with a unique port). Romain Deltour: yes, there are different approches. One is to use domains, another is to use a custom protocol scheme:.
Romain Deltour: I don't know which one is better. Ivan Herman: I think defining a URI scheme for that is not a good idea. Romain Deltour: I don't think we'll come with a solution that will be used by the end user. Brady Duga: I think there are 4 cases: local URLs, online URLs, jar URLs. Romain Deltour: yes, but also referencing to resources outside the package. Brady Duga: do we need to tell people how to display URLs inside on EPUBs (using fragments)?.
Hadrien Gardeur: referencing everything outside the archive is problematic specially for the content document. Romain Deltour: removing that paragraph about the URL of the package document won't work. Romain Deltour: at a minimium, we should base everything on the assumption that there is a url for the root of the container. See github issue epub-specs#1843. Dan Lazin: there is another issue: #1843. Romain Deltour: this might not answer entirely. Dan Lazin: is it a predicable url?. Romain Deltour: this scripting mechanism is only about an origin--could be an opaque origin, doesn't have to be a url. Ivan Herman: where do we go from here?. Dave Cramer: do we ask for help?. Ivan Herman: we have tried and failed before. Romain Deltour: I was supposed to come up with a proposal. Ivan Herman: we can't go to CR with this stuff open. Dave Cramer: could we talk to ping?. Romain Deltour: could we liase with Anne at WhatWG?. Ivan Herman: I worry about that. Tzviya Siegman: talking to Tess would be good. Ivan Herman: if we have a proposal that romain can put together. Romain Deltour: I can summarize the problem statement. Laurent Le Meur: tests will take time.
Laurence Zaysser: could we have a fifth objective, easy to move to web publication?. Romain Deltour: it's about any relative urls. Just dealing with path-relative won't solve the issue. See github pull request epub-specs#1725. Matt Garrish: we have 1725 PR, which forbids path-absolute URLs. Is there any reason we shouldn't merge that?. Wendy Reid: have we exhausted this?. Ivan Herman: to answer matt, that one can go in.
Ivan Herman: using root-relative IRIs is a bad idea for something like epub, where the root url is unclear.
|
Fixes #1681
Preview | Diff