我definded以下变量:如何在XSLT中检查变量是否为空或空?
<xsl:variable name="pica036E"
select="recordData/record/datafield[@tag='036E']" />
<xsl:variable name="pica036F"
select="recordData/record/datafield[@tag='036F']" />
现在我需要做的一个条件,如果变量pica036E是不是空的,pica036F是空的显示以下信息,否则显示另一条消息。 这是我的代码,但我没有任何输出。 “空或空”正确定义?
<xsl:choose>
<xsl:when test="$pica036E != '' and $pica036F = ''">
<xsl:message>
036F no 036E yes
</xsl:message>
</xsl:when>
<xsl:otherwise>
<xsl:message>
036E no 036F yes
</xsl:message>
</xsl:otherwise>
</xsl:choose>