That's what I figured.
The issue arose when using the <saxon:call-template name="{$tname}"/> instruction. We're dynamically creating a few templates on an external source, out of our control.
But not ALL the named templates are constructed dynamically. Occasionally there's an error when a template is called with no matching named pair. So it would've been a simple way to check for existence inside the stylesheet itself before deciding which templates to call. (Apart from examining the input documents)
Just to be clear, you can't use "element-available()" to check for a NAMED called template instruction rather than the generic one.
Thanks!
|