[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: How to call a template that can generate a file na

Subject: 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)
ian lang
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')"/>
  </xsl:template>
 
And calling it thus:
  <xsl:variable name="generatedName">
    <xsl:call-template 
          name="createBaseFrameFileName"/>
  </xsl:variable>

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?

Thanks,

Ian

--- Ian Lang <ianplang@xxxxxxxxx> wrote:
<snip>
>   <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"
select="."/>
>       </xsl:call-template>
>     </xsl:variable>
<snip>

__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus

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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.