[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] Re: How to call a template that can generate a file name from an element

Subject: [xsl] Re: How to call a template that can generate a file name from an element
From: Ian Lang <ianplang@xxxxxxxxx>
Date: Wed, 14 Jan 2004 09:29:37 -0800 (PST)

Oops don't I feel like a heel.  After reading more of
the list and looking at some other samples I realized
I was making it too hard.  I just switched to:
  <xsl:template name="createBaseFrameFileName">
    <xsl:value-of select="concat($outputDir,
        $fileSep, @name, '_index', '.html')"/>
And calling it thus:
  <xsl:variable name="generatedName">

At the moment it does not look like I will have to
pass another element to this method (other than the
context) but what if I do?  Since passing the element
as a parameter and then using '$element[@name]' did
not work is there another way?



--- Ian Lang <ianplang@xxxxxxxxx> wrote:
>   <xsl:template name="createBaseFrameFileName">
>     <xsl:param name="element"/>
>     <xsl:value-of select="$element[@name]"/>
>  <!--    <xsl:value-of select="concat($outputDir,
> $fileSep, $element[@name], '_index', '.html')"/> -->
>   </xsl:template>
>   <!-- Generate the top level html file which sets
> up
> the frames -->
>   <xsl:template match="cabinet|content"
> mode="CreateBaseFrame">
>     <xsl:param name="title"/>
>     <xsl:param name="generator" select="'Our
> Generator'"/>
>     <xsl:param name="description" select="''"/>
>     <xsl:param name="keywords" select="''"/>
>     <xsl:variable name="generatedName">
>       <xsl:call-template
> name="createBaseFrameFileName">
>         <xsl:with-param name="element"
>       </xsl:call-template>
>     </xsl:variable>

Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread