[ 
https://issues.apache.org/jira/browse/XALANC-451?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13132579#comment-13132579
 ] 

Steven J. Hathaway commented on XALANC-451:
-------------------------------------------

I found a problem with the sample test program / XalanParamsSample.cpp-rev3.

The static initializers need to be done outside the scope of the 
XalanTransformer instance.

===

main()
{

  XMLPlatformUtils::Initialize();

  XalanTransformer::initialize();

  {

    XalanTransformer theXalanTransformer;


    // do the transformation work


  }
  // Exit from scope automatically calls the destructor for
  // theXalanTransformer.~XalanTransformer()

  // Now we can safely terminate the static content for Xalan and Xerces

  XalanTransformer::terminate();

  XMLPlatformUtils:Terminate();

  return theReturn;

}


===

The sample program will actually try to destroy theXalanTransformer instance 
after the static content for Xalan and Xerces have been removed.

This is why (return value;) from main was entering an infinite CPU processing 
loop and (exit(value)) had no such problem.

===

Sincerely,
Steven J. Hathaway

                
> XalanTransformer setStylesheetParam(key, xobject)
> -------------------------------------------------
>
>                 Key: XALANC-451
>                 URL: https://issues.apache.org/jira/browse/XALANC-451
>             Project: XalanC
>          Issue Type: Improvement
>          Components: XalanC
>    Affects Versions: CurrentCVS
>            Reporter: Tobias Schuette
>         Attachments: SampleTests.txt-rev3, UseStylesheetParam.cpp, 
> UseStylesheetParam.cpp.diff, XalanParamsSample.cpp-rev3, 
> XalanTransformer.cpp, XalanTransformer.cpp-rev3, XalanTransformer.cpp.diff, 
> XalanTransformer.cpp.diff-rev1, XalanTransformer.cpp.diff-rev2, 
> XalanTransformer.hpp, XalanTransformer.hpp-rev3, XalanTransformer.hpp.diff, 
> XalanTransformer.hpp.diff-rev1, XalanTransformer.hpp.diff-rev2, bar.xml-rev3, 
> foo.xml-rev3, foo.xsl, foo.xsl-rev3, foo.xsl.diff
>
>
> it is not supported to pass xobject's as top level args to stylesheets 
> through the XalanTransformer
> this could be easily evaluated because the underlying XSLTEngingeImpl 
> supports passing in top level args as key/xobject pairs.
> attached some patches to store key/xobject pairs in XalanTransformer and a 
> modified version of the UseStylesheetParam sample.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscr...@xml.apache.org
For additional commands, e-mail: xalan-dev-h...@xml.apache.org

Reply via email to