This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: problem with Passing Parameters to Templates


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]