# OPF-073: DOCTYPE identifier not allowed, how to fix it

Source: https://epubcc.com/epubcheck/opf-073/ (updated 2026-11-04)

EPUBCheck OPF-073 is an error message: “External identifiers must not appear in the document type declaration.” An XML document's DOCTYPE uses an external identifier (a public or system id) that EPUB does not allow for that media type. EPUB only permits a short list, such as the SVG 1.1, MathML 3.0 and NCX DTDs.

- Official message (EPUBCheck 5.4.0): External identifiers must not appear in the document type declaration.
- Default severity: Error

## Typical causes

- An XHTML chapter in an EPUB 3 with an XHTML 1.1 or XHTML 1.0 DOCTYPE carried over from EPUB 2.
- An SVG file exported with a DOCTYPE for another SVG version.
- A DOCTYPE copied from a web page template.

## How to fix it

1. Open the file EPUBCheck points to and look at its DOCTYPE line.
2. For EPUB 3 XHTML, use <!DOCTYPE html> or no DOCTYPE at all.
3. For other files, use the identifier listed for their media type in EPUB 3.3, or remove the DOCTYPE.

## When it's not this

If the XHTML DOCTYPE is merely obsolete, EPUBCheck reports HTM-004 instead.

## Sources

- EPUB 3.3, §3.9 XML conformance: https://www.w3.org/TR/epub-33/#sec-xml-constraints (read 2026-11-04)
- EPUB 3.3, §B. Allowed external identifiers: https://www.w3.org/TR/epub-33/#app-identifiers-allowed (read 2026-11-04)

Message text and severity: EPUBCheck (W3C, BSD-3-Clause). Explanation: EpubCC.
