You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Mingfei Peng <mf...@excite.com> on 2000/08/07 08:46:08 UTC

DocType is missing with XSLT DOM out

I find a problem when I output XSLT result directly to a DOM tree. In XSL
file, I use:

<xsl:output method="xml" version="1.0" doctype-system=
"http://www.wapforum.org/DTD/wml_1.1.xml"
doctype-public="-//WAPFORUM//DTD WML 1.1//EN"/>

After calling XSLTEngineImpl::process(),I cannot get docType from the result
node, the code is:
	XalanDocument* docOut = xmlParserLiaison.createDocument();
	XSLTResultTarget theResultTarget(docOut);

	processor.process(theInputSource,
			theResultTarget,
			theExecutionContext);

	XalanDOMString doctypeSystem;
	XalanDOMString doctypePublic;
	XalanDocumentType* pDocType = docOut->getDoctype();
	... ...
I want to get publicId and systemId from pDocType, but it is NULL. However,
if I output the result to a file with the class FormatterToXML, I find that
the DocType exists:
         <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" 
"http://www.wapforum.org/DTD/wml_1.1.xml">
The reason is that I set the doctype parameters for FormatterToXML by
StylesheetRoot::getOutputDoctypeSystem() and getOutputDoctypePublic().

I think that the doctype should be contained in the XSLT result node,
otherwise we cannot print it without the stylesheet. 





_______________________________________________________
Say Bye to Slow Internet!
http://www.home.com/xinbox/signup.html