我正在使用带有 Antenna House Formatter v6.3 的 XSL-FO 来设计飞行手册。
许多信息属于“如果条件 X 做这做那,否则做其他事情”的类型。在当前情况下,我有以下 XML:
<crewDrill>
<case>
<caseCond>Hot inside:</caseCond>
<if>
<caseCond>Yes</caseCond>
<crewDrillStep>
<para>Adjust thermostat</para>
</crewDrillStep>
<crewDrillStep>
<para>Open the window</para>
</crewDrillStep>
</if>
</case>
<crewDrillStep>
<para>Enjoy life</para>
</crewDrillStep>
</crewDrill>
此 XML 的所需输出将是:
编辑:所以我担心使用 XSLT 将 XML 转换为 XSL-FO(包括 Antenna House Formatter 中的功能)所需的输出是否可行,如果是这样,解决问题的正确方法是什么?鉴于我对 XSL-FO 的了解,我能做到这一点的唯一方法是使用表。也许有更好的方法。
编辑 2:正如@Tomalak 指出的那样,这实际上是两个问题——XSL-FO 结构的外观以及 XSLT 转换的外观。我主要关心的是表示所需输出的 XSL-FO 结构的外观。给定一个目标结构,我大概能够找出转换。很抱歉最初的问题不清楚,感谢@Tomalak 澄清了我的担忧。
使用的 XML 模式源自 S1000D 4.1 Crew 模式