Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

variable substituion in xsl...

Status
Not open for further replies.

schocku

Programmer
Nov 20, 2001
23
US
I am calling the template PrintFullMessage as follows :

<xsl:call-template name=&quot;PrintFullMessage&quot;>
<xsl:with-param name=&quot;mIDParam&quot; select=&quot;$mID&quot;/>
<xsl:with-param name=&quot;mPosParam&quot; select=&quot;$mPos2&quot;/>
<xsl:with-param name=&quot;attributeName&quot; select=&quot;'_Name'&quot;/>
</xsl:call-template>

In the template definition I want to display the value of the attribute in the particular node. The following &quot;@($attributeName)&quot; throws an error message. Any help is appreciated.

<xsl:template name=&quot;PrintFullMessage&quot;>
<xsl:param name=&quot;mIDParam&quot;/>
<xsl:param name=&quot;mPosParam&quot;/>
<xsl:param name=&quot;attributeName&quot;/>

<xsl:for-each select=&quot;/DataModels/dataModelNEW/DATA_MODEL/CLASS[@_ID=$mIDParam]&quot;>
<xsl:if test=&quot;number($mPosParam) = position()&quot;>
<h3>_ID# <xsl:value-of select=&quot;$mIDParam&quot;/> in NewDataModel: <xsl:value-of select=&quot;$attributeName&quot;/> :: <xsl:value-of select =&quot;@($attributeName)&quot;/> </h3>
</xsl:if>
</xsl:for-each>
</xsl:template>


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top