[Home] [By Thread] [By Date] [Recent Entries]
John McGowan wrote:
As an alternative (thinking out loud here) you could do this: <xsl:function name="my:function-available" as="xs:boolean">
<xsl:param name="function-name" />
<xsl:sequence select="$function-name = ('func1', 'func2'...)" />
</xsl:function>and include that function always. mmm, no, not really. I guess the situation is not that simple that it is all about a simple list of functions? As an alternative (it could even be made part of FXSL, if not already), you can do the following: <xsl:function name="my:function-available" as="xs:boolean"> <xsl:param name="function-name" /> <xsl:sequence select="$function-name = document(document('')/*/xsl:import/@href)/*/xsl:function/@name" /> </xsl:function> but now you must place this in your principal document, and you need some extra logic if you want to recursively go through all imported / included documents. If you do not place it in your principal document, you can use any of several techniques to pass it the name of the principal stylesheet. None of these techniques give you perfect results though. Cheers, -- Abel
|

Cart



