【发布时间】:2017-06-27 09:29:12
【问题描述】:
我想在 dita/xml 地图上创建一个 pdf 基础,其中一个主题以报纸样式的两列输出格式设置。
我找到了要在我的 layout-masters-attr 样式表中使用的属性:<xsl:attribute name="column-count">2</xsl:attribute>
这将为整个文档创建一个两列输出。所以我在区域主体属性集中添加了一个@outputclass 参数。这并没有给我正确的结果。有人知道如何为 ditamap 中的单个主题创建两列输出吗?
我的样式表定义:
<xsl:attribute-set name="region-body" use-attribute-sets="region-body.odd"/>
<xsl:attribute-set name="region-body.odd">
<xsl:attribute name="margin-top">
<xsl:value-of select="$body-margin"/>
</xsl:attribute>
<xsl:attribute name="margin-bottom">
<xsl:value-of select="$body-margin"/>
</xsl:attribute>
<xsl:attribute name="{if ($writing-mode = 'lr') then 'margin-left' else 'margin-right'}">
<xsl:value-of select="$page-margin-inside"/>
</xsl:attribute>
<xsl:attribute name="{if ($writing-mode = 'lr') then 'margin-right' else 'margin-left'}">
<xsl:value-of select="$page-margin-outside"/>
</xsl:attribute>
<xsl:attribute name="column-count">
<xsl:choose>
<xsl:when test="@outputclass = 'twocol'">2</xsl:when>
<xsl:otherwise>1</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
</xsl:attribute-set>
我的主题定义:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
<topic id="topic_hbq_pxv_yy">
<title>test</title>
<prolog/>
<body outputclass="twocol">
【问题讨论】: