为什么if-condition在when-block中不起作用?
<xsl:choose>
<xsl:when test="type = 'news'">
<xsl:if test="string-length(subtitle) > 0">
<filter_subtitle><i>In <xsl:value-of select="subtitle"/></i></filter_subtitle>
</xsl:if>
</xsl:when>
<xsl:otherwise>
<filter_subtitle><xsl:value-of select="subtitle"/></filter_subtitle>
</xsl:otherwise>
</xsl:choose>
答案 0 :(得分:0)
<xsl:when test="type='news' and string-length(subtitle)>0">
工作正常!