# DTD

The &binding.impl.name; is shipped with experimental DTD support, which lets you compile XML DTDs.

To compile a DTD `test.dtd`, run the XJC binding compiler as follows:

    $ xjc.sh -dtd test.dtd

All the other command-line options of the XJC binding compiler can be applied. Similarly, the `xjc` ant task supports DTD. The generated code will be no different from what is generated from W3C XML Schema. You'll use the same &binding.spec.name; API to access the generated code, and it is portable in the sense that it will run on any &binding.spec.name; implementation.

### Customization

The customization syntax for DTD is roughly based on the ver.0.21 working draft of the &binding.spec.name; specification, which is available at xml.coverpages.org. The deviations from this document are:

- The `whitespace` attribute of the `conversion` element takes " `preserve`", " `replace`", and " `collapse`" instead of " `preserve`"," `normalize`", and " `collapse`" as specified in the document.

- The `interface` customization just generates marker interfaces with no method.