Root element name not declared
"Martin v. Löwis"
martin at v.loewis.de
Tue Oct 23 23:37:15 CEST 2007
> <?xml version="1.0"?>
> <!DOCTYPE MyMessage SYSTEM "mymessage.dtd">
> <MyMessage release="2.0">
> <!ENTITY % MyMessage "">
> Being both the file and the dtd provided by the supplier, I believe
> they're correct so I don't understand what's wrong. MyMessage IS
> declared... isn't it sufficient?
No. MyMessage is declared above as a Parameter Entity (PE), not
as an element. Look for definitions that start with <!ELEMENT.
Also, look for for occurrences of IGNORE around any such definition.
If you see MyMessage used, try to find out what it's "normal"
definition is; the definition you gave is IGNOREd unless
UsingLocalNames is defined to INCLUDE (which I assume it is not).
For example, if there was the fragment
<!ENTITY % MyMessage "Envelope">
<!ELEMENT %MyMessage; (From|To)>
then the name of the root element would not be MyMessage, but
More information about the Python-list