Skip to content

Does/should EPUB support HTML <base>? #1699

Closed

Description

@dlazin

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.

Activity

  1. OriKuttner commented on Jun 11, 2021

    @OriKuttner
  2. iherman commented on Jun 11, 2021

    @iherman
    Member

    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.

  3. mattgarrish commented on Jun 11, 2021

    @mattgarrish
    Member

    We should probably avoid that, i.e., disallow it.

    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.

  4. added
    Agenda+Issues that should be discussed during the next working group call.
    on Jun 16, 2021
  5. dauwhe commented on Jun 16, 2021

    @dauwhe
    Contributor

    Just a bit worried about saying there are HTML elements that we shouldn't use in EPUB.

  6. mattgarrish commented on Jun 16, 2021

    @mattgarrish
    Member

    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?

  7. iherman commented on Jun 18, 2021

    @iherman
    Member

    The issue was discussed in a meeting on 2021-06-18

    List of resolutions:

    View 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: 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

  8. added a commit that references this issue on Jun 23, 2021
    46a42d0
  9. removed
    Agenda+Issues that should be discussed during the next working group call.
    on Jun 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    EPUB33Issues fixed in the EPUB 3.3 revisionSpec-EPUB3The issue affects the core EPUB 3.X Recommendation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions