5. DTD
Prev | Chapter 7. Configuration elements | Next

## 5. DTD

    <dtd
      systemId = anyURI
      publicId = non empty token
    />

Use the DTD specified by this element to constrain the document.

Note that

- if a document contains a document type declaration (<!DOCTYPE>) which defines elements,

- or if the root element of a document has `xsi:schemaLocation`/`xsi:noNamespaceSchemaLocation` attributes,

- of if a document contains a <?xxe-relaxng-schema location="..."?> processing instruction,

the grammar specified this way is used and the DTD specified in the configuration file is ignored.

Example:

      <dtd publicId="-//W3C//DTD XHTML 1.0 Strict//EN"
           systemId="dtd/xhtml1-strict.dtd" />

### Caution

When using this configuration, also specify `<saveOptions saveCharsAsEntityRefs="false">`. Otherwise, if the added DTD specifies character entities as it is often the case, you may end up creating documents which cannot be interchanged with other applications. The other applications would see such DTD-less documents containing references to named character entities as being non-well formed.

Prev | Up | Next
4. css | Home | 6. detect