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

           Summary: XalanTransformer::transform() doesn't work on Xalan 1.2
                    and it did on Xalan 1.1
           Product: XalanC
           Version: 1.2.x
          Platform: Sun
        OS/Version: Solaris
            Status: NEW
          Severity: Blocker
          Priority: Other
         Component: XalanC
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]
                CC: [EMAIL PROTECTED]


My function:
int ExecTransform( const char *xslFileName, DOM_Document &XMLDoc, char 
*pResultHTML, int SizeResultHTML )
{
int theResult = 0;

   XercesDocumentBridge xdb( XMLDoc );

   XalanNode *node = xdb.getFirstChild();
   if ( node == NULL ) return -99;

   XSLTInputSource inputSource( node );

   XSLTInputSource stylesheetSource( xslFileName );

   ostrstream mi_strout( pResultHTML, SizeResultHTML );
   XSLTResultTarget outputTarget( &mi_strout );

   XalanTransformer::initialize();

   XalanTransformer theXalanTransformer;

   theResult = theXalanTransformer.transform( inputSource, 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;
}
In Xalan 1.1 it works fine, but in the new Xalan 1.2 it does not. 
XalanTransformer::transform() always returns -2 with the text "An exception 
occured! Type:RuntimeException, Message:The primary document entity could not 
be opened. Id={null}".
I have seen that the function that returns -2 is the 
XalanTransformer::parseSource().
I have tried to insert XMLDecl node into my xml and the result is the same.

My xml:
<root>
   <abysal_command>ack</abysal_command>
</root>
My xsl:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
<xsl:template match="/">
<wml>
<card>PRUEBA</card>
</wml>
</xsl:template>
</xsl:stylesheet>

Can anybody help me?
Thank you and best regards.

Reply via email to