[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: RE: [docbook-apps] chunk.xsl for cocoon
This functionality doesn't exist in the current stylesheets. This is just an idea, but you may be able to do a stylesheet customization to get this to work: 1) Add a "write.chapters" parameter to your customization layer: <xsl:param name="write.chapters" select="1"/> (Since you don't seem to ever want to write out the book and all of the chapters, you may be able to have this 0 by default. If you pass in the rootid of the chapter, you'll be bypassing the book template below, anyway.) 2) Change the template that matches "book" so that it won't <xsl:apply-templates/> when that parameter is switched off: <xsl:template match="book"> <div class="{name(.)}"> <xsl:call-template name="language.attribute"/> <xsl:if test="$generate.id.attributes != 0"> <xsl:attribute name="id"> <xsl:call-template name="object.id"/> </xsl:attribute> </xsl:if> <xsl:call-template name="book.titlepage"/> <xsl:apply-templates select="dedication" mode="dedication"/> <xsl:call-template name="make.lots"> <xsl:with-param name="toc.params"> <xsl:call-template name="find.path.params"> <xsl:with-param name="table" select="normalize-space($generate.toc)"/> </xsl:call-template> </xsl:with-param> <xsl:with-param name="toc"> <xsl:call-template name="division.toc"/> </xsl:with-param> </xsl:call-template> <xsl:if test="$write.chapters != 0"> <xsl:apply-templates/> </xsl:if> </div> </xsl:template> 3) When the user wants to build the book, pass in the rootid parameter as before, along with the write.chapters=0 Jeff Beal > -----Original Message----- > From: Walsh, Mark [mailto:mawalsh@csu.edu.au] > Sent: Thursday, July 31, 2003 8:04 PM > To: docbook-apps@lists.oasis-open.org > Subject: FW: [docbook-apps] chunk.xsl for cocoon > > > Thanks Gisbert, > > The rootid parameter works well. I am able to generate each > chapter separately where the document contains the equivalent > of <chapter id="ch1">....</chapter>. For example, I just set > the parameter rootid="ch1" and I get the first chapter. > > However, I can not see how to extract only the "table of > contents" page, ie I can't see any tag to add the attribute > id="menu" to. If I do this to the book tag I get the whole document. > > Any ideas on how to generate the "Table of Contents" page only ? > > Regards, > Mark. > > -----Original Message----- > From: Gisbert Amm [mailto:gia@webde-ag.de] > Sent: Thursday, 31 July 2003 18:09 > To: Walsh, Mark; docbook-apps@lists.oasis-open.org > Subject: RE: [docbook-apps] chunk.xsl for cocoon > > > > I currently have some documents in docbook format, that were > > required to be displayed on the web. > > > > Using xhtml/chunk.xsl (docbook-xsl-1.61.3) I have been able > > to convert the docbook documents into html pages. Using > > frames I was able to put the "Table of Contents" in the left > > frame and the "Contents of a Chapter" in the right frame > > (reference > > http://www.sagehill.net/docbookxsl/HtmlFrames.html). All works well. > > > > Instead of batch generating the html files (and storing them > > on the file system), I would like to keep only the docbook > > files on the file system and generate the html upon request. > > Using cocoon and xhtml/docbook.xsl (docbook-xsl-1.61.3), I > > have been able to dynamically generate the html files (ie the > > output of docbook.xsl goes to standard out). All works well. > > > > The only problem is, I create one huge html page. > > > > I would like to create the same effect as I obtained when > > using xhtml/chunk.xsl and frames. I cannot see how to do > > this, as I can't see how to get chunk.xsl to write to > > standard out and not a file. Also I do not know how to tell > > chunk.xsl to only produce the section of document I am > > interested in (eg "table of Contents", chapter 1 etc..) > > > > Any ideas/suggestion would be appreciated. > > > > Probably you could carry on with docbook.xsl, using the > rootid parameter > (http://docbook.sourceforge.net/release/xsl/current/doc/html/r ootid.html) to specify the part of the document you want to transform. Regards, Gisbert Amm --------------------------------------------------------------------- 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
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]