在 rtf OBIP 模板中以不同方式编写时,同样的简单逻辑不起作用

问题描述 投票:0回答:1

因此,我在 rtf OBIP 模板中有两个布尔变量(假设为 x 和 y)和一个非常简单的代码:

<?if x="false"?>
   <?if y="false"?>
      Some text1
   <?end if?>
   <?if y="true"?>
      Some text2
   <?end if?>
<?end if?>
<?if x="true" and y="false"?>
      Some text3
<?end if?>

在 x = true 且 y 值没有差异的特定情况下,此逻辑失败(没有写入任何文本,事实上,它折叠了放入此块的表中的整行)。 但是,如果我将其更改为这样的:

<?if x="false" and y = "false"?>
   Some text1
<?end if?>
<?if x="false" and y="true"?>
   Some text2
<?end if?>
<?if x="true" and y="false"?>
   Some text3
<?end if?>

效果很好。 逻辑是一样的,只是写法不同而已。请注意,该模板非常复杂,但在深入研究我正在处理的错误后,它归结为这个问题。没有任何语法错误,两个人仔细检查了所有内容,这太令人困惑了。 可能是什么问题?

xml ms-word rtf bi-publisher
1个回答
0
投票

您的

IF
语法似乎是错误的

你有

<?if x="false"?>

应该是

<?if:x="false"?>
© www.soinside.com 2019 - 2024. All rights reserved.