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

problem using param passed

Subject: problem using param passed
From: jamadagni@xxxxxxxxxxxx
Date: 1 Jul 2000 02:25:09 -0700
xsl using param
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

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.