You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In today's WG meeting, while discussing #1681 (root-relative URLs) and #1456 (xml:base), I asked whether reading systems do or should support the <base> tag.
IMO, whether we support <base> affects whether root-relative URLs should be supported.
The <base> tag can have either absolute or relative URL-s as values. Setting an absolute URL as a value for a content document is messy at best... because all relative links will point out of the package. We should probably avoid that, i.e., disallow it.
I could see a value for hand-edited EPUBs to have a <base> tag as a relative URL as value. I am a little bit worried, though, that authors would feel it inconsistent to allow for the <base> element in HTML while xml:base has been disallowed.
Seems kind of indiscriminate to disallow absolute URLs that are easy to understand where the resolved relative paths are going but allow relative URLs that are more likely to lead to weird outcomes like resources seemingly appearing outside the container.
It's not really a "base" tag anymore, in the sense it makes relative paths absolute. More of a thing you stick in front of relative paths and then see if they're still relative paths in which case you don't use this thing again but find the actual base of the document and add that on, too.
Are there any known uses of base in epubs, though?
Even for packaging web pages this seems problematic, as it's more likely you'd have to remove any base tags to to get working relative paths.
It might be better to simply recommend authors not use the tag.
Wendy Reid: this came up in last week's session in discussion about root-relative URLs, HTML base, etc.
… perhaps we recommend authors not use it? or avoid discussing it entirely?
Ivan Herman: problem i see is what it means if base is given the value of a relative URI
… an absolute URL value is also problematic because it goes out of the package
… and then mgarrish pointed out that it makes it complicated if we start specifying how HTML elements can be used
… so I think we should just discourage using it
Matt Garrish: if we're discouraging xml:base, we might as well do same for HTML base to keep some consistency
… no formal warning, but just advice to discourage
Romain Deltour: q_
Romain Deltour: why is the discouraged constructs section not normative?
Matt Garrish: we don't really want to step in and start forbidding things that are in HTML
… just that these HTML things don't make sense in epub, really
… so we say we don't think authors should be using them
Romain Deltour: okay, makes sense
Matt Garrish: probably just an info message in epubcheck or something
Wendy Reid: there was one comment in support of allowing it, but no real rationale provided with that comment
Romain Deltour: do we have any sense of RS support for this element?
Wendy Reid: i've never seen it
Romain Deltour: no, me neither to be honest
Brady Duga: same
Ivan Herman: i've rarely even seen it in HTML
Proposed resolution: Discourage the use of <base> in EPUB, close issue 1699(Wendy Reid)
Ivan Herman: +1
Matt Garrish: +1
Matthew Chan: +1
Ben Schroeter: +1
Romain Deltour: +1
Masakazu Kitahara: +1
Brady Duga: +1
Toshiaki Koike: +1
Deborah Kaplan: +1
Bill Kasdorf: +1
Wendy Reid: +1
Gregorio Pellegrino: +1
George Kerscher: +1
Resolution #1: Discourage the use of <base> in EPUB, close issue 1699
Activity
OriKuttner commentedon Jun 11, 2021
iherman commentedon Jun 11, 2021
The
<base>tag can have either absolute or relative URL-s as values. Setting an absolute URL as a value for a content document is messy at best... because all relative links will point out of the package. We should probably avoid that, i.e., disallow it.I could see a value for hand-edited EPUBs to have a
<base>tag as a relative URL as value. I am a little bit worried, though, that authors would feel it inconsistent to allow for the<base>element in HTML whilexml:basehas been disallowed.mattgarrish commentedon Jun 11, 2021
Seems kind of indiscriminate to disallow absolute URLs that are easy to understand where the resolved relative paths are going but allow relative URLs that are more likely to lead to weird outcomes like resources seemingly appearing outside the container.
It's not really a "base" tag anymore, in the sense it makes relative paths absolute. More of a thing you stick in front of relative paths and then see if they're still relative paths in which case you don't use this thing again but find the actual base of the document and add that on, too.
Are there any known uses of base in epubs, though?
Even for packaging web pages this seems problematic, as it's more likely you'd have to remove any base tags to to get working relative paths.
It might be better to simply recommend authors not use the tag.
dauwhe commentedon Jun 16, 2021
Just a bit worried about saying there are HTML elements that we shouldn't use in EPUB.
mattgarrish commentedon Jun 16, 2021
We tepidly crossed that bridge when we started "discouraging" things... https://w3c.github.io/epub-specs/epub33/core/#sec-xhtml-deviations-discouraged
Could be the place for this, too?
iherman commentedon Jun 18, 2021
The issue was discussed in a meeting on 2021-06-18
List of resolutions:
<base>in EPUB, close issue 1699View the transcript
1. Does/should EPUB support the
<base>element?See github issue #1699.
Wendy Reid: this came up in last week's session in discussion about root-relative URLs, HTML base, etc.
… perhaps we recommend authors not use it? or avoid discussing it entirely?
Ivan Herman: problem i see is what it means if base is given the value of a relative URI
… an absolute URL value is also problematic because it goes out of the package
… and then mgarrish pointed out that it makes it complicated if we start specifying how HTML elements can be used
… so I think we should just discourage using it
Matt Garrish: if we're discouraging
xml:base, we might as well do same for HTML base to keep some consistency… no formal warning, but just advice to discourage
Romain Deltour: why is the discouraged constructs section not normative?
Matt Garrish: we don't really want to step in and start forbidding things that are in HTML
… just that these HTML things don't make sense in epub, really
… so we say we don't think authors should be using them
Romain Deltour: okay, makes sense
Matt Garrish: probably just an info message in epubcheck or something
Wendy Reid: there was one comment in support of allowing it, but no real rationale provided with that comment
Romain Deltour: do we have any sense of RS support for this element?
Wendy Reid: i've never seen it
Romain Deltour: no, me neither to be honest
Brady Duga: same
Ivan Herman: i've rarely even seen it in HTML
Discourage the usage of base elements