Bob (archive)
Usenet Archive
- Joined
- Apr 12, 2000
- Messages
- 597
- Reaction score
- 0
I use Xerces/Perl to create an XML document that will use Schemas instead of DTDs for validation. When I attempt to create a document with a docType of null, I get an error.
This works:
$docType = eval{$impl->createDocumentType("none", '', '')}; $doc = eval{$impl->createDocument($nameSpace, 'dfStudy', $docType)};
But then I'm stuck with a line in my XML file "<!DOCTYPE none>" (which, of course, is garbage)
This does not work:
$doc = eval{$impl->createDocument($nameSpace, 'dfStudy', '')};
The error message is:
No matching function for overloaded 'DOMImplementation_createDocument' at...
Of course, the easy way to get rid of the DOCTYPE line would be to sed the output of the DOMWriter, but I'd rather make it clean by not having it there in the first place. Any ideas?
Thanks
This works:
$docType = eval{$impl->createDocumentType("none", '', '')}; $doc = eval{$impl->createDocument($nameSpace, 'dfStudy', $docType)};
But then I'm stuck with a line in my XML file "<!DOCTYPE none>" (which, of course, is garbage)
This does not work:
$doc = eval{$impl->createDocument($nameSpace, 'dfStudy', '')};
The error message is:
No matching function for overloaded 'DOMImplementation_createDocument' at...
Of course, the easy way to get rid of the DOCTYPE line would be to sed the output of the DOMWriter, but I'd rather make it clean by not having it there in the first place. Any ideas?
Thanks