You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xalan.apache.org by mi...@cartilage.demon.co.uk on 2004/07/23 10:21:05 UTC
Bridging to deprecated Xerces DOM_Document
Hi,
I'm attempting to port an old Xalan-based app to Xalan 1.8 + Xerces 2.5.0. I am providing a deprecated Xerces DOM_Document to the Xalan transformer, using the following idiom:
DOM_Document xercesDoc = ...;
XercesDOMSupport support;
XercesParserLiaison liaison(support);
XalanDocument* xalanDoc = liaison.createDocument(xercesDoc, false, false);
XSLTInputSource in(xalanDoc);
ostrstream out = ...;
XalanTransformer transformer = ...;
transformer.transform(in, "mystylesheet.xsl", out);
This results in a RuntimeException "The primary document entity could not be opened".
I am running on Solaris and have built Xalan with -DXALAN_BUILD_DEPRECATED_DOM_BRIDGE.
Any insights into this problem would be appreciated.
--Mike
Re: Bridging to deprecated Xerces DOM_Document
Posted by da...@us.ibm.com.
> Hi,
>
> I'm attempting to port an old Xalan-based app to Xalan 1.8 + Xerces
2.5.0.
> I am providing a deprecated Xerces DOM_Document to the Xalan transformer,
> using the following idiom:
>
> DOM_Document xercesDoc = ...;
> XercesDOMSupport support;
> XercesParserLiaison liaison(support);
> XalanDocument* xalanDoc = liaison.createDocument(xercesDoc, false,
false);
> XSLTInputSource in(xalanDoc);
> ostrstream out = ...;
> XalanTransformer transformer = ...;
> transformer.transform(in, "mystylesheet.xsl", out);
>
> This results in a RuntimeException "The primary document entity could not
be opened".
>
> I am running on Solaris and have built Xalan with
-DXALAN_BUILD_DEPRECATED_DOM_BRIDGE.
>
> Any insights into this problem would be appreciated.
You should take a look at the ParsedSourceWrappers sample, which does
exactly what you're trying to achieve.
Thanks!
Dave