SYMPTOMS

Validating an XML Document with MSXML gives the following error message:

0xC00CE01E. Use of default namespace declaration attribute in DTD not supported.

STEPS TO REPRODUCE BEHAVIOR

1 - Start XMLBlueprint.

2 - Paste the following code into a new text document, and save the file as book.xml:

<?xml version="1.0" encoding="utf-8"?>

<!DOCTYPE book SYSTEM "book.dtd">

<book>

<chapter/>

</book>

3 - Paste the following code into a new text document, and save the file as book.dtd in the same folder as book.xml:

<!ELEMENT book (chapter)*>

<!ATTLIST book xmlns CDATA #FIXED "http://www.xmlblueprint.com/book">

<!ELEMENT chapter (#PCDATA)>

4 - Open file book.xml and validate by clicking XML > Validate. The error message will appear in the Output Window.

SOLUTION

To avoid this error, change <book> to <book xmlns="http://www.xmlblueprint.com/book">:

<?xml version="1.0" encoding="utf-8"?>

<!DOCTYPE book SYSTEM "book.dtd">

<book xmlns="http://www.xmlblueprint.com/book">

<chapter/>

</book>