[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] dbhtml dir PI and slides XSL
Thanks, Mauritz, that did the trick! I'm using version 3.3.1 of slides, and I had to make one additional change of "foilgrp" to "foilgroup" to fix a bad link. The complete diff is below: 4,6d3 < < <!-- With changes for supporting the dbhtml dir="xyz" processing instruction < from Mauritz Jenson in a 7/11/04 posting to docbook-apps --> 396,399d392 < <xsl:variable name="dir"> <!-- MJ: added --> < <xsl:call-template name="dbhtml-dir"/> < </xsl:variable> < 402c395 < <xsl:with-param name="filename" select="concat($base.dir, $dir, $titlefoil.html)"/> <!-- MJ: added $dir--> --- > <xsl:with-param name="filename" select="concat($base.dir, $titlefoil.html)"/> 616,619d608 < <xsl:variable name="dir"> <!-- MJ: added --> < <xsl:call-template name="dbhtml-dir"/> < </xsl:variable> < 622c611 < <xsl:with-param name="filename" select="concat($base.dir, $dir, $toc.html)"/> <!-- MJ: added $dir --> --- > <xsl:with-param name="filename" select="concat($base.dir, $toc.html)"/> 827c816 < <xsl:apply-templates select="." mode="chunk-filename"/> <!-- MJ: changed --> --- > <xsl:apply-templates select="." mode="filename"/> 1014c1003 < <xsl:apply-templates select="." mode="chunk-filename"/> <!-- MJ: changed --> --- > <xsl:apply-templates select="." mode="filename"/> 1276c1265 < <xsl:text>foilgroup</xsl:text> --- > <xsl:text>foilgrp</xsl:text> 1469d1457 < <xsl:value-of select="$dir"/> <!-- MJ: added --> 1480,1481c1468 < <xsl:value-of select="$dir"/> <!-- MJ: added --> < <xsl:text>foilgroup</xsl:text> --- > <xsl:text>foilgroup</xsl:text> At 10:15 AM +0200 7/11/04, Mauritz Jeanson wrote: >----- 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 -- --------------------------------------------------------------------------- M. Sean Gilligan : 831-466-9788 x11 Catalla Systems, Inc. ---------------------------------------------------------------------------
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]