[Home] [By Thread] [By Date] [Recent Entries]
My question is where, in general, is the best place to use these functions: I just stumbled onto a subtle (at least to me) difference between these two nominally equivalent forms: <xsl:template match="foo[util:is_applicable()]"> and <xsl:template match="foo"> <xsl:if test="util:is_applicable()"> Which is that in the first case all *inapplicable* foo elements fall through to the default template, which if there's no explicit template for "foo", means that the content of foo will likely flow to the output, therefore failing to suppress inapplicable foo elements. Doh! Given that, it suggests that putting the check in the match= value is the least attractive as it requires at least a single separate template with a lower priority to catch all elements that fail the applicability check, while doing the check at select time ensures that only applicable elements will be processed at all. Cheers, Eliot -- W. Eliot Kimber Professional Services Innodata Isogen 9030 Research Blvd, #410 Austin, TX 78758 (512) 372-8122 eliot@xxxxxxxxxxxxxxxxxxx www.innodata-isogen.com
|

Cart



