Apart from the correct replies that you need to <xsl:include>
or <xsl:import>
(I'd recommend the latter as the former can often result in duplication errors), your other problem is the following:
A function name must belong to a namespace.
The namespace must be declared (defined and bound to a prefix) in the same file in which the function is defined.
Any call to the function has to prefix the name of the function and that prefix must be bound to the same namespace to which the function name belongs
Here is a simple example:
I. File deleteA.xsl
defines the function my:double
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:my="my:my"
>
<xsl:function name="my:double" as="xs:double">
<xsl:param name="pArg" as="xs:double"/>
<xsl:sequence select="2*$pArg"/>
</xsl:function>
</xsl:stylesheet>
II. File deleteB.xsl
imports file deleteA.xsl
and uses the function my:double
:
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:my="my:my">
<xsl:import href="deleteA.xsl"/>
<xsl:output method="text"/>
<xsl:template match="/">
<xsl:sequence select="my:double(.)"/>
</xsl:template>
</xsl:stylesheet>
III. The transformation contained in deleteB.xsl
is applied on the following XML document:
<t>1</t>
and the correct result is produced:
2
Additional comment: At present no browser supports XSLT 2.0 transformations -- xsl:function
is only available in XSLT 2.0 +.