-
Notifications
You must be signed in to change notification settings - Fork 23
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
TOC may contain entries with text but no link #23
Comments
IMO the title of this issue is confusing. It's perfectly fine having In EPUB, we could say that the ToC is a tree structure where some nodes do not have an Since we're using the same Link Object everywhere, this means that when we parse an EPUB, we need a default value for cc @JayPanoz as well since this is related to parsing |
In the TypeScript deserialization process there is a informative (non-breaking) "verifier" which checks that "no-href is okay if there are link children" ... but it's really just a workaround at the moment. I would hate to change the EPUB parser at this stage, because of regression bugs. There are clients that consume / expect nil-href in order to render the TOC correctly (i.e. with a "group" heading and no actual link). If we now add "#" to missing |
Changing the Link Object for the same reason is IMO even worse since it affects pretty much everything in RWPM and OPDS 2.0. We would have to duplicate this requirement for |
Can't the JSON Schema check for non-nil |
It's always possible to craft something, but it goes against the core model (that we use everywhere right now) and it probably means that we wouldn't be able to re-use the Link Object JSON Schema anymore. That's not a very attractive proposal IMO. |
JSON Schema:
webpub-manifest/schema/link.schema.json
Lines 64 to 66 in e289dbb
For example, "Childrens Literature":
https://idpf.github.io/epub3-samples/30/samples.html#childrens-literature
https://github.com/IDPF/epub3-samples/tree/master/30/childrens-literature
https://github.com/IDPF/epub3-samples/blob/50415310ce853c1bc52ceb19f0e3319b470bc524/30/childrens-literature/EPUB/nav.xhtml#L23-L25
Scroll down to TOC
"title": "Abram S. Isaacs"
:https://readium2.herokuapp.com/pub/L2FwcC9taXNjL2VwdWJzL2NoaWxkcmVucy1saXRlcmF0dXJlLmVwdWI%3D/manifest.json/show/all
(or if the above link fails to load:
https://readium2.now.sh/pub/L2hvbWUvbm93dXNlci9zcmMvbWlzYy9lcHVicy9jaGlsZHJlbnMtbGl0ZXJhdHVyZS5lcHVi/manifest.json/show/all
)
title
,children
, but nohref
:The text was updated successfully, but these errors were encountered: