David Bertoni wrote:
Kelly Graus wrote:
I am transforming an XML document to XHTML using a simple XSLT transform. When I let Xalan output to a file, everything works fine. However, I want the output in a Xerces DOM. I use a FormatterToXercesDOM object to output to the Xerces DOM, then a DOMWriter to output to a file. The output file is correct, except it's missing the DOCTYPE tag. I can manually set it when I create the Xerces DOMDocument, but that kind of defeats the purpose. Is there a way to tell the FormatterToXercesDOM object to put the DOCTYPE tag in the DOM? Or maybe a way to retrieve it from Xalan and set it in the Xerces DOM?

You can get the values of the system and public IDs through accessor member functions of the class StylesheetRoot. You can then call the necessary Xerces-C DOM APIs to modify the DOCTYPE.

Dave
Thanks for the reply.  This worked great!

Kelly

Reply via email to