Hi,
Use <saxon:xslt expression="..."> attribute to specify reference to the
actual expression instead of using <saxon:expression> element.
There is several types of expressions (and you can create your own types).
Let's take following example:
<saxon:xslt service="setest:saxon-xslt-dynamic"
endpoint="saxon-xslt-dynamic-endpoint" expression="#myExpression">
You can define for example:
<bean id="myExpression"
class="org.apache.servicemix.expression.PropertyExpression">
<property name="property" value="my.custom.propertyName" />
</bean>
This will try to find property named "my.custom.propertyName" in your
NormalizedMessage. If it can't find such a property, then PropertyExpression
will try to do the same with your MessageExchange. The value of the property
will be used as a name for you xslt filename.
Other expression implementations you might be interested in are:
FileExtensionPropertyExpression, JAXPXPathExpression, JaxenXPathExpression,
or just write your own by implementing
org.apache.servicemix.expression.Expression.
Regards,
Piotr
--
View this message in context:
http://www.nabble.com/how-can-i-select-XSLT-stylesheet-dynamically--tf3981472s12049.html#a11304862
Sent from the ServiceMix - User mailing list archive at Nabble.com.