如何在XSL中返回节点结果集后检查null

时间:2018-04-12 19:48:56

标签: xml xslt xslt-2.0

例如:

<xsl:variable name="testing" select="node/nodeset/nodevalueresult"/>

如何使用count函数或任何其他选项检查变量或node/nodeset/nodevalueresult并检查是否返回null。

1 个答案:

答案 0 :(得分:0)

将任何XPath(因为XPath是XSLT使用的表达式语言)标记为http://maxtoroq.github.io/xpath-ref/,并查找像http://maxtoroq.github.io/xpath-ref/fn/empty.html这样的工作的内容,例如: empty($testing)