You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by bu...@apache.org on 2001/11/21 22:42:46 UTC
DO NOT REPLY [Bug 3805] -
XalanTransformer::transform() doesn't work on Xalan 1.2 and it did on Xalan 1.1
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3805>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3805
XalanTransformer::transform() doesn't work on Xalan 1.2 and it did on Xalan 1.1
David_N_Bertoni@lotus.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
------- Additional Comments From David_N_Bertoni@lotus.com 2001-11-21 13:42 -------
This is fixed in the latest CVS code. See the class
XercesDOMWrapperParsedSource in XalanTransformer. The only limitation is that
you will not be able to start the transformation from the first child. I'm not
sure why you would want to do this, but we can't really support it. Here's a
code snippet for how it would work:
int
ExecTransform(
const char *xslFileName,
const DOM_Document &XMLDoc,
char *pResultHTML,
int SizeResultHTML )
{
if (XMLDoc.getFirstChild().isNull() == true)
return -99;
int theResult = 0;
XalanTransformer::initialize();
{
XercesParserLiaison liaison;
XercesDOMSupport support;
const XercesDOMWrapperParsedSource xmlSource(XMLDoc, liaison, support);
const XSLTInputSource stylesheetSource( xslFileName );
ostrstream mi_strout( pResultHTML, SizeResultHTML );
const XSLTResultTarget outputTarget( &mi_strout );
XalanTransformer theXalanTransformer;
theResult = theXalanTransformer.transform(xmlSource, stylesheetSource,
outputTarget );
if ( theResult != 0 )
{
fprintf( stderr, "XSLT: ERROR %d during transform:\n", theResult );
fprintf( stderr, "%s\n", theXalanTransformer.getLastError() );
theResult = -99;
}
}
XalanTransformer::terminate();
return theResult;
}