Thursday, March 28, 2013

[WSO2 ESB] XSLT Mediator Properties


In this post I am discussing how we can use "Properties of the XSLT mediator" in XSLT transformations.

We can inject Properties which we set in the mediation flow to the XSLT script as a XSLT parameter.

Following is a sample configuration of a XSLT mediator having a property.



     



Here PARAM_NAME is the name of the Property and the value is calculated using a xpath expression. Here we assign the value of the "ORDER_ID" property which is in the default scope.

Following is a sample XSLT script.


      
      
         
            
               
            
         
      


First we have to define the parameter as follows. Name should be identical to the name of the property.


Then we can access the value of the parameter as follows.