tor 2008-04-17 klockan 16:08 -0700 skrev Bob Stayton:
> Oh, right, the page numbering starts over because the context node is
> article when the page.sequence template is called by name.
> Instead, that template can be called using appy-templates in a mode:
Thanks, that worked well!
Since I want my bibliography after the index, I did the same thing for
that. Thinking about it again, I put it in a <for-each>, to use the
order from the source. Like this:
<xsl:for-each select="d:index|d:bibliography">
<xsl:variable name="trailer" select="."/>
<xsl:apply-templates select="." mode="page.sequence">
<xsl:with-param name="content">
<xsl:apply-templates select="."/>
</xsl:with-param>
</xsl:apply-templates>
</xsl:for-each>
I also customised the template for d:index, adding a span="all"
attribute to the right block, so the title spans all columns. The line
with the "HERE" comment is the only line modified.
<!-- Copied from index.xsl, modified to let index header span columns
-->
<xsl:template match="d:index">
<xsl:variable name="id">
<xsl:call-template name="object.id"/>
</xsl:variable>
<xsl:if test="$generate.index != 0">
<xsl:choose>
<xsl:when test="$make.index.markup != 0">
<fo:block>
<xsl:call-template name="generate-index-markup">
<xsl:with-param name="scope"
select="(ancestor::d:book|/)[last()]"/>
</xsl:call-template>
</fo:block>
</xsl:when>
<xsl:otherwise>
<fo:block id="{$id}" span="all"><!-- HERE -->
<xsl:call-template name="index.titlepage"/>
</fo:block>
<xsl:apply-templates/>
<xsl:if test="count(d:indexentry) = 0 and count(d:indexdiv) =
0">
<xsl:call-template name="generate-index">
<xsl:with-param name="scope"
select="(ancestor::d:book|/)[last()]"/>
</xsl:call-template>
</xsl:if>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
</xsl:template>
> Regarding a parameter for index column count, that actually already
> exists as the column.count.index parameter: [...] But it only applies
> when an index has its own page-sequence [...] I think what you want is
> a parameter to set an article index in its own page-sequence so the
> other parameter can apply.
I think what I really would like is a way to have something that is not
a page-sequence hold multiple columns. But it seems xsl-fo requires a
page master for holding the columns?
--
Rasmus Kaj <[EMAIL PROTECTED]>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]