EPUBCheck MED_018: bad SVG fragment in overlay
Updated:
EPUBCheck MED_018 is a warning message: “URL fragment should be an SVG fragment identifier, but found '#…'.” A media overlay text reference into an SVG document uses a fragment that is not an SVG fragment identifier. EPUB recommends SVG fragment identifiers there, because reading apps may not support other schemes; EPUBCheck warns and shows the fragment.
The official message
URL fragment should be an SVG fragment identifier, but found '#%1$s'.
- Default severity
- Warning. The EPUB is still valid, but something is likely to cause problems in some reading apps. EPUBCheck exits with 0 unless you pass --failonwarnings.
- EPUBCheck version
- 5.4.0
EPUBCheck prints this ID with an underscore instead of a hyphen; this page uses the ID exactly as EPUBCheck reports it.
%1$s, %2$s… are filled in with the file, value or element EPUBCheck found.
Typical causes
- Fragments written for XHTML used on an SVG page, such as in fixed-layout comics with narration.
- A typo in the fragment.
How to fix it
- Point the text src to an element id in the SVG, or use an SVG fragment identifier such as a view or viewBox fragment.
- Check that the id really exists in the SVG file.
- Rebuild the EPUB and run EPUBCheck again to confirm the message is gone.
When it's not this
For XHTML chapters the equivalent warning is MED_017.
Terms used here
Other MED messages
MED_017URL fragment should indicate an element ID, but found '#…'.MED_016Media Overlays total duration should be the sum of the durations of all Media Overlays documents.MED_015Media overlay text references must be in reading order. Text target "…" is before the previous link target in … order.MED_014Media overlay audio file URLs must not have a fragment, but found '#…'.MED_013Media Overlay Document referenced from the "media-overlay" attribute does not contain a reference to this Content Document.MED_012The "media-overlay" attribute does not match the ID of the Media Overlay that refers to this document.
Sources
Message text and severity from EPUBCheck 5.4.0 (W3C, BSD-3-Clause). Explanation by EpubCC.