XHTML has two DTDs:
a so-called Strict DTD, which is content-oriented,
and another one, much more compatible with traditional HTML, called the Transitional DTD.
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
element of your document.body
In such case, you have two solutions:
Recommended: using a text editor, add the proper <!DOCTYPE> to your XHTML document.
OR Slightly change the configuration of XXE. For that (quick and dirty method):
Open
using a text editor and change:XXE_install_dir
/addon/config/xhtml/xhtml_strict.xxe
<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" /> -->
Then open
using a text editor and change:XXE_install_dir
/addon/config/xhtml/xhtml_loose.xxe
<!-- <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" />
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.