[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] chunking only the last section in each chapter
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, I have succesfully done this, but the generated toc were lacking information to be precisely processed, so I slightly modified the subtoc template to insert more information. See below. Camille. <xsl:template name="subtoc"> <xsl:param name="nodes" select="NOT-AN-ELEMENT"/> <xsl:variable name="filename"> <xsl:apply-templates select="." mode="chunk-filename"/> </xsl:variable> <xsl:variable name="chunk"> <xsl:call-template name="chunk"/> </xsl:variable> <xsl:if test="$chunk != 0"> <xsl:call-template name="indent-spaces"/> <xsl:text> </xsl:text> <tocentry role="{@role}" name="{name()}" linkend="{@id}"> <xsl:processing-instruction name="dbhtml"> <xsl:text>filename="</xsl:text> <xsl:value-of select="$filename"/> <xsl:text>"</xsl:text> </xsl:processing-instruction> <xsl:apply-templates mode="toc" select="$nodes"/> <xsl:call-template name="indent-spaces"/> </tocentry> <xsl:text> </xsl:text> </xsl:if> </xsl:template> Bob Stayton a écrit : > As you have probably noticed by now, customizing the chunking > stylesheets is challenging. Getting certain pieces chunked isn't too > hard, but getting the Next and Prev and TOC navigation right is harder. > > I would try a different approach. Norm provided in the stylesheet a > means for specifying what gets chunked by using an external table of > contents file. See the section in my book called "Manually control > chunking" in: > > http://www.sagehill.net/docbookxsl/Chunking.html > > You could do a two-pass process, where you write a small stylesheet that > generates the external table of contents file using your criteria for > selecting elements, and then the second pass uses that to generate the > HTML output chunked the way you want. I didn't try it, but I think that > would be easier than customizing the chunking templates. > > Bob Stayton > Sagehill Enterprises > DocBook Consulting > bobs@sagehill.net > > > ----- Original Message ----- From: "Webmaster" <Webmaster@comtrol.com> > To: "apps docbook" <docbook-apps@lists.oasis-open.org> > Sent: Monday, June 26, 2006 5:51 PM > Subject: [docbook-apps] chunking only the last section in each chapter > > >> I know this may seem like a silly request, but how would I go about only >> getting the chunking out the last section in each chapter? (ignore the >> rest >> of the sections) >> >> So If I had: >> >> chapter 1 >> section id=A >> section id=B >> section id=C >> chapter 2 >> section id=A >> section id=B >> section id=C >> chapter 3 >> section id=A >> section id=B >> section id=C >> >> The resulting html chunks would be of only the following. >> >> chapter 1 >> section id=C >> chapter 2 >> section id=C >> chapter 3 >> section id=C >> >> Thanks! >> >> LN >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org >> For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org >> >> >> > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org > For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org > -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFEoYdFjv9P65BfOUMRAnWjAJ9XokeSVyxZz+wQ21EOFxLPSTXGxACglObz i+RKlzSv51z2lPRb52X69yE= =jCl5 -----END PGP SIGNATURE-----
begin:vcard fn;quoted-printable:Camille B=C3=A9gnis n;quoted-printable:B=C3=A9gnis;Camille org:NeoDoc adr:Domaine du petit Arbois BP 88;;CEEI;Aix en Provence Cedex 4;;13545;France email;internet:camille@neodoc.biz tel;work:+33.4.42.22.62.35 tel;cell:+33.6.33.15.10.23 note;quoted-printable:Rejoignez mon r=C3=A9seau sur viaduc:=0D=0A= =0D=0A= http://www.viaduc.com/invitationpersonnelle/002lm14bc0jlkfk x-mozilla-html:FALSE url:http://neodoc.biz version:2.1 end:vcard
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]