1. The XHTML Strict DTD versus the XHTML Transitional DTD

XHTML has two DTDs:

XMLmind XML Editor supports both DTDs using the same configuration. However, if you have created your XHTML document using an editor which does not add:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

or

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

at the top of the document, XXE will consider that your document conforms to the Strict DTD.

Therefore, if, in fact, your XHTML document conforms to the Transitional DTD, you'll get a lot of false validity errors. For example: "element contains characters other than white space [cvc-complex-type.2.3]" where element points to the body element of your document.

In such case, you have two solutions:

  1. Recommended: using a text editor, add the proper <!DOCTYPE> to your XHTML document.

  2. OR Slightly change the configuration of XXE. For that (quick and dirty method):

    1. Open XXE_install_dir/addon/config/xhtml/xhtml_strict.xxe using a text editor and change:

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

      to:

      <!--
        <dtd publicId="-//W3C//DTD XHTML 1.0 Strict//EN"
             systemId="dtd/xhtml1-strict.dtd" />
      -->
    2. Then open XXE_install_dir/addon/config/xhtml/xhtml_loose.xxe using a text editor and change:

      <!--
        <dtd publicId="-//W3C//DTD XHTML 1.0 Transitional//EN"
             systemId="dtd/xhtml1-transitional.dtd" />
      -->

      to:

        <dtd publicId="-//W3C//DTD XHTML 1.0 Transitional//EN"
             systemId="dtd/xhtml1-transitional.dtd" />
    3. From now, XXE will consider that XHTML documents not having a <!DOCTYPE> conform to the Transitional DTD.

      Restart XXE. Reopen your XHTML document. If you still have validity errors, this time, these are real errors.