You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Holger Flörke <fl...@doctronic.de> on 2001/05/22 17:21:32 UTC
Use XalanTransformer-API with DOM
I would like to change my application to use the XalanTransformer-API. But
how can I use my hand made DOM_Document as a source in transform?
I have created an XSLTInputSource by doing:
// create an XSLT Input-Source
DOM_Document oDoucument= DOM_Document::createDocument();
DOM_Element oElement = oDocument.createElement(DOMString("me"));
oDocument.appendChild(oElement);
XalanDocument* poDocument = oParserLiaison.createDocument(oDocument);
XSLTInputSource oInputSource(poDocument);
oInputSource.setSystemId(XalanDOMString("DOM").data());
oInputSource.setPublicId(XalanDOMString("DOM").data());
If I call:
// Do the transform.
theResult = theXalanTransformer.transform(
oInputSource,
"out.xsl",
"res.xml");
Xalan always says the "The Primary DocumentEntity could not be opened" and
crashes with a NULL-Pointer exception...
TIA
HolgeR
--
holger floerke d o c t r o n i c
email floerke@doctronic.de information publishing + retrieval
phone +49 (0) 2222 9292 90 http://www.doctronic.de
fax +49 (0) 2222 9292 99