From: Gustaf Liljegren <gustafl@al...> - 2002-12-28 22:25:04
[Just forgot to send this to the list too...]
Trevor Nash wrote:
>This is correct - a DTD doesn't have a 'root' element as such, the
>root for a particular document must be specified in the DTD
Thanks, I'll remember who I learned that from. I see many things about DTDs
are more or less implied in XML, so without the experience in SGML it's
hard to know.
>Sorry I cannot help with your other problem - I presume everything
>works OK with real paths instead of using the catalog? If so, check
>your mappings are right - you might be reading the wrong file at some
>point, perhaps trying to treat an XML file as if it were a DTD?
It worked out. It was not a catalog problem. I had removed the encoding
declaration from the text declaration in the DTD, with the implied meaning
of "this is UTF-8". But since <?xml version="1.0"?> is an XML declaration
(not a text declaration), the parser complained. The error message
'whitespace required (found "?")' was right, but AElfred should have
complained on the DTD file instead of the document.
This is easy to stumble on. In a DTD, this is legal:
<?xml version="1.0" encoding="UTF-8"?>
But this isn't: