首页 > 解决方案 > 如何在 xsl 中打印任何变量值。bcoz 我们无法调试 xsl

问题描述

<xsl:if test="efile_format = 'PDF' or efile_format = 'Docume`efile_format = 'PDF' or efile_format = 'Document' ">

我想检查 efile_format 的值。因为当我尝试工作时它总是失败但尝试遵循 if 条件仅用于查看条件是否影响或不影响

<xsl:if test="1">

标签: xsltxslt-2.0

解决方案


我假设您缺少第二个或条件:

<xsl:if test="efile_format = 'PDF' or efile_format = 'Docume`efile_format = 'PDF' or efile_format = 'Document' ">

更正的语法可能类似于以下之一:

<xsl:if test="efile_format = 'PDF' or efile_format = 'Docume' or efile_format = 'PDF' or efile_format = 'Document' ">

或者

<xsl:if test="efile_format[(. = 'PDF') or (. = 'Document')]">

或者

<xsl:if test="efile_format=('PDF','Document')">

推荐阅读