xslt - 如何在 XSL-FO 中的第一次匹配之前插入表头?
问题描述
你好。
我有一个不寻常的情况,即基于一系列条件构建产品表。但是,由于处理 XSL 的工具的限制,我需要在选择/当语句的第一个结果之前插入一个标题。
我试过这个无济于事:
<xsl:when test="number(translate($_dsSub1/lotCharges_l, ',', '.'))>'0' or number(translate($_dsSub1/price/_price_item_price_each, ',', '.'))>'0' or $_dsSub1/leadTimeMax_l>'0' and $_dsSub1/item_l/_part_custom_field8 = 'Services'">
<xsl:choose>
<xsl:when test="position() = 1">
<h1>Table Header goes here</h1>
</xsl:when>
<xsl:otherwise>0</xsl:otherwise>
</xsl:choose>
<fo:table-row keep-together.within-page="1" padding="5px" margin="0px" border-collapse="collapse" top="0px" bottom="0px" height="5px">
...```
解决方案
我最终将条件逻辑从各个表行中移出,并将 where 子句放在构建表之前。
推荐阅读
- html - 如何围绕圆形边距旋转对象(div)?仅 CSS
- javascript - 在 macOS 上从节点项目运行 zeromq 会出错
- swift - 包含 Swift 包时如何解决冗余的协议一致性错误?
- c++ - 空格后不打印单个单词
- c# - 如何从代码中在 CollectionView 中添加 SelectionChanged?
- r - 更改置信区间带的颜色?
- asp.net-core - 如何在 Asp.net Core 中将 LTI 与 nearpod.com 或 MCGRAWHILL 平台集成
- firebase - Firebase 模拟器通过 REST 功能访问数据库
- html - 你好,这里的第一个问题。我一直试图在我的网站上放一张图片,但它不起作用,我就是不知道原因。我的代码 HTML
- sql - 我们可以批量执行类似合并的操作吗?