This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: [docbook-apps] dbhtml dir PI and slides XSL
- From: "Mauritz Jeanson" <mj at johanneberg dot com>
- To: <docbook-apps at lists dot oasis-open dot org>, "M. Sean Gilligan" <seanlist at msgilligan dot com>
- Date: Sun, 11 Jul 2004 10:15:54 +0200
- Subject: Re: [docbook-apps] dbhtml dir PI and slides XSL
- References: <p0521061bbd14843523bb@[192.168.111.130]>
- Reply-to: "Mauritz Jeanson" <mj at johanneberg dot com>
----- Original Message -----
From: "M. Sean Gilligan"
> I'm using the Slides XSL sheets to make multiple presentations and processing them in a batch (using the XSLT Ant task). I am using the base.dir attribute to specify the output directory, and am trying to use the following:
>
> <slides><?dbhtml dir="Prez1" ?>
>
> in each document to put the output for each presentation in a different sub-directory. Otherwise, the files from different presentations (like "foil01.html") overwrite each other.
>
> It looks like the slides XSL files don't support this PI (processing instruction)
>
> Any suggestions?
Here is my hack to get it working... (slides-common.xsl):
1. Changed mode="filename" to mode="chunk-filename" in two places
<xsl:template match="foil">
<xsl:param name="thisfoil">
<xsl:apply-templates select="." mode="chunk-filename"/> <!-- MJ: changed -->
</xsl:param>
=============
<xsl:template match="foilgroup">
<xsl:param name="thisfoilgroup">
<xsl:apply-templates select="." mode="chunk-filename"/> <!-- MJ: changed -->
</xsl:param>
2. Added <xsl:value-of select="$dir"/> for foil and foilgroup
<xsl:when test="name(.)='foil'">
<xsl:variable name="foilnumber">
<xsl:number count="foil" level="any"/>
</xsl:variable>
<xsl:value-of select="$dir"/> <!-- MJ: added -->
<xsl:text>foil</xsl:text>
<xsl:number value="$foilnumber" format="01"/>
<xsl:value-of select="$html.ext"/>
</xsl:when>
========
<xsl:when test="name(.)='foilgroup'">
<xsl:variable name="foilgroupnumber">
<xsl:number count="foilgroup" level="any" format="01"/>
</xsl:variable>
<xsl:value-of select="$dir"/> <!-- MJ: added -->
<xsl:text>foilgroup</xsl:text>
<xsl:number value="$foilgroupnumber" format="01"/>
<xsl:value-of select="$html.ext"/>
</xsl:when>
3. Added $dir for toc and titlefoil
<xsl:template match="slides" mode="toc">
<xsl:variable name="id">
<xsl:call-template name="object.id"/>
</xsl:variable>
<xsl:variable name="home" select="/slides"/>
<xsl:variable name="up" select="/slides"/>
<xsl:variable name="next" select="(foil|foilgroup)[1]"/>
<xsl:variable name="tocfile" select="''"/>
<xsl:variable name="dir"> <!-- MJ: added -->
<xsl:call-template name="dbhtml-dir"/>
</xsl:variable>
<xsl:call-template name="write.chunk">
<xsl:with-param name="indent" select="$output.indent"/>
<xsl:with-param name="filename" select="concat($base.dir, $dir, $toc.html)"/> <!-- MJ: added $dir -->
<xsl:with-param name="content">
==============
<xsl:template match="slidesinfo">
<xsl:variable name="id">
<xsl:call-template name="object.id"/>
</xsl:variable>
<xsl:variable name="next" select="(/slides/foil|/slides/foilgroup)[1]"/>
<xsl:variable name="tocfile" select="$toc.html"/>
<xsl:variable name="dir"> <!-- MJ: added -->
<xsl:call-template name="dbhtml-dir"/>
</xsl:variable>
<xsl:call-template name="write.chunk">
<xsl:with-param name="indent" select="$output.indent"/>
<xsl:with-param name="filename" select="concat($base.dir, $dir, $titlefoil.html)"/> <!-- MJ: added $dir-->
<xsl:with-param name="content">
/MJ
To unsubscribe from this list, send a post to docbook-apps-unsubscribe@lists.oasis-open.org, or visit http://www.oasis-open.org/mlmanage/.