You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by "Kapa, Madhavi" <ma...@marconimed.com> on 2000/10/17 21:04:13 UTC
xsl:with-param question
Hello,
I have a question about xsl:with-param. This is the code that I am trying to
use. In the template, displayComboBox, when I try to access the value of the
node variable in for-each block, I don't get any output. But, when I
substitute
/core-response/PatientInformationDelegate/IM_Patient/GenderStatus/Option in
place of $node, everything works fine. Does anybody have any idea why? Am I
doing something that is not right?
<xsl:call-template name="displayComboBox">
<xsl:with-param
name="node">/core-response/PatientInformationDelegate/IM_Patient/GenderStatu
s/Option
<xsl:with-param>
<xsl:with-param name="comboBoxName">sex</xsl:with-param>
<xsl:with-param name="tabIndValue">3</xsl:with-param>
</xsl:call-template>
<xsl:template name="displayComboBox">
<xsl:param name="node"/>
<xsl:param name="comboBoxName"/>
<xsl:param name="tabIndValue"/>
<td>
<select name="{$comboBoxName}" size="1" disabled="true"
tabIndex="{$tabIndValue}">
<xsl:for-each select="$node">
<xsl:variable name="isSelected"> <xsl:value-of select="
./@Selected"/ <ma...@Selected> > </xsl:variable>
<xsl:variable name="databaseValue"> <xsl:value-of select="
./@Value"/ <ma...@Value> > </xsl:variable>
<xsl:if test="$isSelected = 'true'">
<option value="{$databaseValue}"> <xsl:value-of select="
./@Description"/ <ma...@Description> > </option>
</xsl:if>
</xsl:for-each>
</select>
</td>
</xsl:template>