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

Re: problem with Passing Parameters to Templates

Subject: Re: problem with Passing Parameters to Templates
From: "helen li" <helen_p_li@xxxxxxxxxxx>
Date: Mon, 22 Jan 2001 10:09:48 -0500
helen li
Also I have tried to use the following code to find and give the value of the element that is a descendant of the current node that is called 'codec'. It does not work either.

 <xsl:template name="opt_template">
     <xsl:param name="node"></xsl:param>
          <xsl:variable name="node-element"
                   select=".//*[local-name() = $node]" />
         <xsl:if test="$node-element">
           <xsl:value-of select="$node-element" />
         </xsl:if>
  </xsl:template>

Thanks,

Helen

From: "helen li" <helen_p_li@xxxxxxxxxxx>
Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re:  problem with Passing Parameters to Templates
Date: Mon, 22 Jan 2001 09:43:41 -0500

Hi Jeni&David,

Thanks for your help.

What I really want to do is to output the value of element codec(not the
value of variable $node) if the element codec exists.  With the following
code, I did not get the result as expected. Did I do something wrong?

 <xsl:template name="opt_template">
     <xsl:param name="node"></xsl:param>
         <xsl:if test=".//*[$node]">
           <xsl:value-of select=".//*[name()=$node]"/>
         </xsl:if>
 </xsl:template>

 <xsl:call-template name="opt_template">
          <xsl:with-param name="node" select="'codec'"/>
 </xsl:call-template>

Thanks again,

Helen

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


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



_________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


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.