I'd like to create a pdf base don a dita/xml map where one of the topics is formatted in a newspaper style two-column output.
I've found the attribute to use in my layout-masters-attr style sheet: <xsl:attribute name="column-count">2</xsl:attribute>
This creates an two-column output for the whole document. So i've added an @outputclass
argument to the region body attribute-set. This doen't give me the correct result. Does anybody know how to create a two-column output for a single topic in a ditamap?
My style sheet definition:
<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>
My topic definition:
<?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">