【问题标题】:XSL: nested <?choose?> in RTF TemplateXSL:在 RTF 模板中嵌套 <?choose?>
【发布时间】:2015-05-13 20:35:31
【问题描述】:

我无法让我的 RTF 模板在我的第一个单元格中接受嵌套选择。我有:

<?choose?>
  <?when: FIRST_COLOR='Red'?>
    <?FIELD_VALUE?>
  <?end when?>
  <?otherwise?>
    <?choose?>
      <?when: SECOND_COLOR?>
        <?xdofx:FIELD_VALUE_2||'Z'?>
      <?end when?>
      <?otherwise?>
        <?FIELD_VALUE_2?>
      <?end otherwise?>
    <?end choose?>
  <?end otherwise?> 
<?end choose?>

我也尝试在 when 语句中不使用冒号,但没有出现错误,我只得到 50 条记录中的两条。

【问题讨论】:

    标签: xslt bi-publisher


    【解决方案1】:

    我发现嵌套 if 可以代替。

    <?xdofx:if FIRST_COLOR='Red' then
        FIELD_VALUE
      else
      if SECOND_COLOR!='' then
        FIELD_VALUE_2||'Z'
      else 
        FIELD_VALUE_2
    end if?>
    

    【讨论】:

      【解决方案2】:

      如果您的原始示例是您实际使用的代码,则您缺少冒号。应该是:

      &lt;?otherwise:?&gt;

      这会导致问题,但我不能说它是否会导致您的问题,因为您没有指定您遇到的确切错误。

      【讨论】:

        猜你喜欢
        • 2012-02-20
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2011-03-08
        • 1970-01-01
        • 2012-02-14
        • 2012-01-20
        相关资源
        最近更新 更多