[XML-SIG] Problem using schema instead of DTD

Tim van Erven tve at vormig.net
Tue Jan 18 16:10:48 CET 2005

On Fri, 14/01/2005 10:19 -0700, Mike Brown wrote:
> Tim van Erven wrote:
>> And the output of my program looks like this, which won't validate:
>> <?xml version="1.0" encoding="UTF-8"?>
>> <!DOCTYPE ltp> 
>> <ltp xmlns="http://www.example.org/info"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> xsi:schemaLocation="http://www.example.org/info someschema.xsd">
>> <text>This is some modified sample text.</text>
>> </ltp>
>> Does anyone know how to get rid of the !DOCTYPE line? Is that the right
>> thing to do anyway?

> Another possibility is that the tool you are using does not recognize the 
> minimal DOCTYPE declaration that is being added to your document. Such a 
> declaration serves no real purpose, but is permitted to exist by the XML spec. 
> It is an often-overlooked 'feature' of XML though; some parsers may reject it 
> out of ignorance.

I'm using the validator at:


It stopped complaining after removing the DOCTYPE declaration - thanks
Andrew Clover!:

  if document.doctype is not None:

Thanks for the explanation. This solves my problem.


Tim van Erven <tve at vormig.net>

More information about the XML-SIG mailing list