0

XSL does not compile when and only I use xalan:evaluate.

Setting in system properties

sysProps.setProperty("javax.xml.transform.TransformerFactory", "org.apache.xalan.xsltc.trax.SmartTransformerFactoryImpl");

XSLT snippet

<xsl:stylesheet version="1.0"  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"  xmlns:xalan="http://xml.apache.org/xalan" exclude-result-prefixes="xalan">

<xsl:template name="my_test_template">
<xsl:param name="my_test_param" />

<xsl:if test="xalan:evaluate($my_test_param)">
some statements
</xsl:if>

<xsl:if test="not(xalan:evaluate($my_test_param))">
some statements
</xsl:if>

</xsl:template>

ERROR LOG

ERROR:  'Cannot find external method 'org.apache.xalan.lib.Extensions.evaluate' (must be public).'
2015-04-14 08:19:52,509 XslTransform ERROR> Error creating 16 template, will skip compile and use interpretive mode instead
javax.xml.transform.TransformerConfigurationException: Could not compile stylesheet
    at org.apache.xalan.xsltc.trax.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:832)
    at org.apache.xalan.xsltc.trax.SmartTransformerFactoryImpl.newTemplates(SmartTransformerFactoryImpl.java:319)
2
Contributors
1
Reply
3
Views
2 Years
Discussion Span
Last Post by xml_looser
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.