-
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
Are fragment identifiers allowed in manifest? #1303
Comments
They should be allowed as they're needed for refines, links, previews, and probably other things. There's just no defined reading system support for them, even for refines, I believe. |
I didn't realize we had an open issue for this, but I've tried to address this in the PR #1670 for the URL standard. The URL standard differentiates "relative-URL string" from "relative-URL-with-fragment string". For manifest items (and media overlay audio elements) I've replaced the general requirement for IRI references with the stricter non-fragment URL strings. Is there any case where a manifest resource can be a fragment of another? Allowing |
The issue was discussed in a meeting on 2021-05-13 List of resolutions:
View the transcript4. Are fragment identifiers allowed in manifest?See github issue #1303. Dave Cramer: i made an epub that had fragment identifier in href Ben Schroeter: would we need to do some epubcheck work if we were to decide to allow these fragment identifiers? Dave Cramer: yes, but that shouldn't be an obstacle, not big code change Ben Schroeter: any downside? could it be abused? Matt Garrish: just curious what the expectation is for RS if it is a fragment? What is RS supposed to do? Dave Cramer: i think this is the same as activating a link in toc, i.e., yes to scroll Brady Duga: how would that work in the spine? So chapter 1 is beginning of chapter, but chapter 2 is link to middle of the book? Dave Cramer: yes, but we could have a note to say not to do that Ben Schroeter: is there a legitimate reason to do this? Matt Garrish: suspect this has something to do with the requirement to point to a resource, not a fragment of that resource Brady Duga: maybe if you want to skip some kind of chapter heading for each chapter, so that you start with the first paragraph of the chapter? Wendy Reid: we've had some cases where the entire book is in a single HTML file Ben Schroeter: what about the fact that fragments need to be allowed for refines and stuff like that? Matt Garrish: that's not in the manifest Dave Cramer: a valid reason for changing the spec is to make it match reality, and given that we already enforce this, allowing a fragment here would vastly complicate the responsibilities of an RS Matt Garrish: and the URL spec has a type that specifically can't have fragments Wendy Reid: is that the current test in the PR that you have out? Matt Garrish: yeah (I didn't know we had an issue out for this at the time)
|
@mattgarrish I did not close the issue until #1670 is open; we shouldn't forget to do it. |
Right, and I have this issue linked from the PR so it should close automatically with it. |
See w3c/epubcheck#1085
It appears that
href
attributes anywhere in the package file must be IRIs.But we don't appear to forbid fragment identifiers. All we say about
href
isEPUBCheck complains loudly about fragment identifiers, I think because it misinterprets them as incorrect file extensions.
I'm not sure if we need to do anything here.
The text was updated successfully, but these errors were encountered: