I would create an XSLT function that does the ditaval evaluation so that you
can then use that bindly from match expressions, i.e.:
<xsl:function name=local:isIncluded as=xs:Boolean>
<xsl:param name=context as=element()/>
<xsl:param name=ditaval as=document-node()/>
<xsl:variable name=result as=xs:boolean>
<!hard work goes here -->
</xsl:variable>
<xsl:sequence select=$result/>
</xsl:function>
And then in your template you can do:
<xsl:template match="*[not(local:isIncluded(., $ditaval))]"/>
Or maybe the better name is isExcluded() so your check can be
local:isExcluded() but you get the idea.
|