Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


problem using param passed

From: jamadagni@------------
To:
Date: 6/30/2000 7:25:00 PM
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


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent