problem using param passed

Subject: problem using param passed
From: jamadagni@xxxxxxxxxxxx
Date: 1 Jul 2000 02:25:09 -0700
Hi,

Kindly have a look at the code below ,  here I am not
able to pass $whichNode parameter , the code doesn't
work for some reason , I hope this is the right way to
use parameters passed to a template.
In the XML file "Article/ArticleTitle" contains several 
"Author" nodes containing author names.
Also surprisingly the code works if "Author" is put in 
$whichNode's place, but that's not the way I want the
code to work.

Any help would be greatly appreciated.

<xsl:template match="*" mode="fieldInNewLine">
      <xsl:param name="fieldName"/>
      <xsl:param name="whichNode"/>
      <xsl:choose><!-- dont print Authors if none is available -->
        <xsl:when test="'' != string($whichNode[position()=1])">  
         <td align="right" valign="top"><b>Author(s): </b></td>
        <td colspan="7" class="left">
          <xsl:for-each select="$whichNode">
            <xsl:apply-templates select="."/>
            <xsl:if test="position() != last()">
             ,<xsl:text> </xsl:text>
            </xsl:if>         
          </xsl:for-each>.
        </td>
        </xsl:when>
      </xsl:choose>
</xsl:template>

<xsl:apply-templates select="Article/ArticleTitle" mode="fieldInNewLine">
       <xsl:with-param name="fieldName">Article Title:</xsl:with-param>
       <xsl:with-param name="whichNode">Author</xsl:with-param>
</xsl:apply-templates>



Regards,

~Manish Jamadagni


______________________________________________________
123India.com - India's Premier Portal 
Get your Free Email Account at http://www.123india.com



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


Current Thread