An xsl:function, like a named xsl:template or a top-level xsl:variable, should have global scope - it should be accessible in all modules of the stylesheet including those that import/include or are imported/included by the module that declares the function. So could you provide the evidence of the problem please?
 
Michael Kay
http://www.saxonica.com/


From: saxon-help-admin@lists.sourceforge.net [mailto:saxon-help-admin@lists.sourceforge.net] On Behalf Of Sascha Punzmann
Sent: 15 February 2006 15:53
To: saxon-help@lists.sourceforge.net
Subject: [saxon] XSLT 2.0 using xsl:function within multiple stylesheets?

Hi, maybe this is easy to solve, but I can't find a solution.

I use the a main stylesheet, the includes several other stylesheets (templates). The whole processing works!

When I declare and use custom functions (<xsl:function) in the main sheet, this function is only available in the main stylesheet, but not in the included templates!

Does any of have an idea how I can make those <xsl:functions> available within all of my stylesheet, even the imported ones?

I thought about including them through a namespace declaration, but I don't know if and how this can be done!

Regards

Sascha