Sorry, I lost the thread a bit there. You could have your special
"filename" template call the "link" template, but add a new parameter to
express different behavior. Then you could customize the "link" template to
accept the new parameter, and behave somewhat differently when it is set.
<xsl:template match="filename[@role = 'module']">
...
<xsl:call-template name="link">
<xsl:with-param name="linkend" select="@path"/>
<xsl:with-param name="caller">filename</xsl:with-param>
</xsl:call-template>
...
</xsl:template>
<xsl:template match="link" name="link">
<xsl:param name="caller" select="''"/>
...
<xsl:choose>
<xsl:when test="$caller = 'filename'">
...
Bob Stayton
Sagehill Enterprises
DocBook Consulting
bobs@sagehill.net