Re: [XML-SIG] Problem using schema instead of DTD
by Tim van Erven other posts by this author
Jan 18 2005 7:11AM messages near this date
Re: [XML-SIG] Problem using schema instead of DTD
|
Re: [XML-SIG] Problem using schema instead of DTD
& XSLT 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:
http://apps.gotdotnet.com/xmltools/xsdvalidator/
It stopped complaining after removing the DOCTYPE declaration - thanks
Andrew Clover!:
if document.doctype is not None:
document.removeChild(document.doctype)
Thanks for the explanation. This solves my problem.
Regards,
Tim
--
Tim van Erven <tve@[...].net>
_______________________________________________
XML-SIG maillist - XML-SIG@[...].org
http://mail.python.org/mailman/listinfo/xml-sig
Thread:
Tim van Erven
Andrew Clover
Mike Brown
Tim van Erven
Tim van Erven
|