re-apply a template

How do I re-apply a template - without re-processing the whole file again?
e.g., I have
<filename role="unix">stdio.h</filename>

and I want to turn it into a link to the SUS doc:

<xsl:template match="filename[@role='unix']">
 <a class="{@role}" href="{$unix.top}basedefs/{translate(.,'/','')}.html"
    >&lt;<xsl:apply-imports/>&gt;</a>
</xsl:template>

the above works, but "<>" are not formatted as <filename>.

I want something like this:

<xsl:template match="filename[@role='unix']">
 <a class="{@role}" href="{$unix.top}basedefs/{translate(.,'/','')}.html"
  ><xsl:call-template name="filename">&lt;<xsl:value-of select="."/>&gt;</xsl:call-template></a>
</xsl:template>

unfortunately, the default "filename" template does not have a name(?):
runtime error: file common.xsl line 40 element call-template
xsl:call-template : template filename not found

so, what should I do?
(I would rather not process the file twice)

-- 
Sam Steingold (http://www.podval.org/~sds) running w2k
<http://www.iris.org.il> <http://truepeace.org> <http://ffii.org/>
<http://www.openvotingconsortium.org/> <http://www.camera.org>
Trespassers will be shot.  Survivors will be prosecuted.

Received on Sunday, 28 August 2005 03:06:13 UTC