1
我有两个xslt动态下拉框,需要一个测试语句来测试另一个是否已被使用。xslt从其他节点获取值
<xsl:template match="cat">
<xsl:choose>
<xsl:when test = (if dog has already been selected)
<select id="selectCAT">
<option value="" onchange="submitCAT()">
<option value="shorthair">
</select>
</xsl:when>
<xsl:otherwise>
<select id="selectCAT">
<option value="">
<option value="longhair">
</select>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="dog">
<xsl:choose>
<xsl:when test = (if cat has already been selected)
<select id="selectDOG">
<option value="" onchange="submitDOG()">
<option value="shorthair">
</select>
</xsl:when>
<xsl:otherwise>
<select id="selectDOG">
<option value="">
<option value="longhair">
</select>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
我几乎有两个下拉,只需要调用一个函数,如果唯一已经被选中。我只是无法弄清楚如何判断是否使用了其他的下拉菜单。
谢谢。
请问您可以发布XML样本吗? – 2010-01-25 09:36:35