这是我的 xslt 代码:
<xsl:choose>
<xsl:when test="string-length(
//Record/CIMtrek_CI_OPEX_200910_FrDiv
/text())
!= 0">
<select size="1"
style="width:100%;"
name="CIMtrek_CI_OPEX_200910_FrDiv"
id="CIMtrek_CI_OPEX_200910_FrDiv">
<option>
<xsl:attribute name="selected">true</xsl:attribute>
<xsl:value-of select="//Record
/CIMtrek_CI_OPEX_200910_FrDiv
/text()" />
</option>
<option value="S M-SPED">S M-SPED</option>
<option value="S M-PPPVLD">S M-PPPVLD</option>
</select>
</xsl:when>
<xsl:otherwise>
<select size="1"
style="width:100%;"
name="CIMtrek_CI_OPEX_200910_FrDiv"
id="CIMtrek_CI_OPEX_200910_FrDiv">
<option value="0">Select Keywords</option>
<option value="S M-SPED">S M-SPED</option>
<option value="S M-PPPVLD">S M-PPPVLD</option>
</select>
</xsl:otherwise>
</xsl:choose>
但是当没有价值时,当条件总是存在时。
我认为这是线路成本问题,但不确定,
<xsl:when
test="string-length(
//Record/CIMtrek_CI_OPEX_200910_FrDiv/text()
) != 0">
如何解决这个问题?