>the whole DTD document should be wrapped into one element
It helps to try and use the correct terminology - it avoids a lot of misunderstandings. There's no such thing as a "DTD document", and the thing you are wrapping it in isn't an element.
A DTD that exists in a file of its own is called an "external DTD subset". This never contains the <!DOCTYPE ... > delimiters. The <!DOCTYPE ... > delimiters always appear in the instance document, immediately after the XML declaration if there is one. For example your instance document can be:
<!DOCTYPE doc SYSTEM "my.dtd">
<doc>Hello</doc>
which refers to an external DTD subset in file my.dtd that might contain the single line:
<!ELEMENT doc (#PCDATA)>
The syntax you showed is appropriate for an internal DTD subset (a DTD contained within the instance document that it describes, which might be:
<!DOCTYPE doc[
<!ELEMENT doc (#PCDATA)>
]>
<doc>Hello</doc>
I've left out the XML declaration <?xml version="1.0"?> in these examples because it's optional.
I'm not sure exactly what you did to get the error message from XML Spy.
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference