Hi Sascha
 
Yes namespaces is the solution.
 
Give each include module a distinct namespace.
 
However with includes you are including rather than referencing, so you cannot have
a function library that can be referenced as many times as you like. You must arrange
for your includes to form a disciplined inclusion tree so that everything is defined exactly
once, even as your tree grows. So put all your utilities in a tree of utility functions that
gets included only by your main stylesheet.
 
    Regards
 
        Ed Willink
-----Original Message-----
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


--
This email has been verified as Virus free
Virus Protection and more available at http://www.plus.net