Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Xerces Perl - Don't want DOCTYPE

Reply
Thread Tools

Xerces Perl - Don't want DOCTYPE

 
 
Bob
Guest
Posts: n/a
 
      01-13-2004
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CSS Newbie - CSS Works With Invalid DOCTYPE. Fails With Valid DOCTYPE. Larry Lindstrom HTML 19 06-12-2012 02:07 PM
xerces: entity and doctype with DOMPrint __PPS__ XML 2 09-26-2005 11:47 PM
Want to Validate a DOM Tree Against a Schema - Xerces C/C++ Novitas XML 1 09-14-2005 12:24 AM
Upgrade of Xalan 1.2.2 and Xerces 1.4.4 to Xalan 2.6 and Xerces 2.6.2 cvissy XML 0 11-16-2004 07:06 AM
Regression Apache Xerces ? DOCTYPE and XMLSchema BODIN XML 0 12-08-2003 12:36 PM



Advertisments