【发布时间】:2019-11-19 15:08:46
【问题描述】:
我可以根据需要处理我的 2 个表达式:
<xsl:if test="string-length(.) > 15">
<xsl:if test="not(contains(., ' '))">
<xsl:attribute name="font-size">5pt</xsl:attribute>
</xsl:if>
</xsl:if>
但是我不清楚为什么我不能把它写成一个test:
<xsl:if test="string-length(.) > 15 && not(contains(., ' '))">
<xsl:attribute name="font-size">5pt</xsl:attribute>
</xsl:if>
这会引发我的处理器 (Apache XSL FO) 的未知错误。
我正在尝试测试我所在的当前节点,看看它是否包含超过 15 个字符且没有空格。如果满足该匹配,我将字体大小减小到5pt。
【问题讨论】: