【问题标题】:DITA Open Toolkit CHM (HTML Help Workshop) outputDITA Open Toolkit CHM(HTML 帮助研讨会)输出
【发布时间】:2014-08-14 14:23:27
【问题描述】:

我使用 DITA Open Toolkit 将我的 DITA 文件转换为 CHM(HTML Help Worskhop)和 tocjs (HTML) 格式。

我需要将 1 个主题的内容复制到我的地图的所有其他主题中(例如头文件)。

我测试了创建一个标题模板:

<xsl:template name="ShortDescriptionTemplate">
<p class="Dx:ShortDescription">
 <!--<xsl:apply-templates select="*[contains(@class,' topic/shortdesc ')]"/>-->
  <xsl:variable name="shortDv1"><xsl:apply-templates select="shortdesc"/></xsl:variable>
  <xsl:value-of select="normalize-space($shortDv1)"/>
</p><xsl:value-of select="$newline"/>   
</xsl:template>
<xsl:template match="/|node()|@*" mode="gen-user-header">
<div id="header">
  <xsl:if test="contains(@class,' topic/topic ')">
     <xsl:text>Bonjour 1</xsl:text><!-- Works!!! Displays on all topics -->
      <xsl:call-template name="ShortDescriptionTemplate"/>
     <!-- Doesn't Works!!! Displays on my shortdesc topic but nothing in the others topics-->
    <xsl:copy-of select="shortdesc"/> <!-- nothing in the others topics-->
</div>
</xsl:template>

有人帮我吗?

谢谢,

【问题讨论】:

    标签: xslt chm dita dita-ot


    【解决方案1】:

    请参阅http://dita-ot.sourceforge.net/1.6/ 的文档

    我不使用最新版本,但最近 1.6,您可以通过使用参数“args.hdr”来设置运行标头。新的可能是一样的。请参阅 Ant 参数主题。

    如果你想走另一条路,你可以使用@conref。请参阅 DITA 规范中的“内容包含”http://docs.oasis-open.org/dita/v1.2/os/spec/DITA1.2-spec.html

    【讨论】:

    • 带参数“args.hdr”,类型*.xml是必须的?或者我可以使用 *.html, *.xslt ?因为我需要用模板xslt恢复一个数据
    • 我创建了一个标头 *.xml,但没有任何改变。我需要将 1 个主题(第一个主题)的内容复制到地图的所有其他主题中。我怎样才能将这个主题的文本恢复到 *.xml 文件中?我用的是1.8.M2版本
    猜你喜欢
    • 2010-09-12
    • 1970-01-01
    • 1970-01-01
    • 2017-10-15
    • 1970-01-01
    • 2010-12-29
    • 2011-01-15
    • 1970-01-01
    • 2017-10-25
    相关资源
    最近更新 更多