Page 1 of 1

Evaluation of a XSL parameter in Xalan C++ transformation ?

Posted: Sat Jul 17, 2004 12:12 am
by Phil
Hi everybody,


I am using the Xalan 1.8 C++ API in a real-time financial application which need to apply XSLT transformations on XML input messages received on-the-fly.
On the process output, I get the transformed output XML.

In the XSLT stylesheet, I defined several templates which take input parameters (like function calls) and I also defined global XSL variables.

For security reasons, I need to log everything. I use the "XalanTransformer" object to make the transformation and I implemented the "TraceListener" object to log most of the parser/transformer events.


=> I am pretty happy with this but I have still have this problem :

I did not find any way to display the params or global variables values during the transforming.

I know that a "StylesheetExecutionContext" object implements the "getVariable()" and "getParamVariable()" methods which should allow to do this.

The problem is the "StylesheetExecutionContext" provided in the "TracerEvent" and "SelectionEvent" only provide a "const" instance of the "StylesheetExecutionContext" object which help from calling the "getVariable()" and "getParamVariable()" methods which are not "const".

Does anybody know a way to log the params/global variable values during the parsing/transforming ?

Can anybody tell me what I missed in the Xalan API philosophy ?


Thanks in advance for your help.



Phil