[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: AW: [docbook-apps] Listings placeable at the End of Printed Output?
Kai, I checked the example as well, using Xalan/FOP1.1 and DB4.5. Everything is fine, and I received the LOTs within my appendix at the end of the document. Maybe some ideas: -
Check if you had an appendix element with a role attribute filled with ‘lot’. -
Check your template. The template below is not well formed by the way (missing closing xs:if element.) Regards, Ben Von: Eisele, Kai Alexander [mailto:k.eisele@cenit.de]
No problem... I had also already tried leaving out the namespace prefix, the result is the same: No appendix is created at the end of the PDF. Currently, I am using the following customization (extract): <?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:d="http://docbook.org/ns/docbook"
version="1.0"> ... <xsl:import href=""> ... <xsl:param name="generate.toc"> appendix nop <!-- tried also: toc,title resp. toc,title,figure,table,example --> ... book toc,title ... </xsl:param> <!-- Template adjustment to have lists of titles (figures, tables, examples) attached to the end of printed output --> <xsl:template match="appendix[@role = 'lot']"> <xsl:variable name="lot-master-reference"> <xsl:call-template name="select.pagemaster"> <xsl:with-param name="pageclass" select="'lot'"/> </xsl:call-template> </xsl:variable> <xsl:if test="//figure"> <xsl:call-template name="page.sequence"> <xsl:with-param name="master-reference" select="$lot-master-reference"/> <xsl:with-param name="element" select="'toc'"/> <xsl:with-param name="gentext-key" select="'ListofFigures'"/> <xsl:with-param name="content"> <xsl:call-template name="list.of.titles"> <xsl:with-param name="titles" select="'figure'"/> <xsl:with-param name="nodes" select="//figure"/> </xsl:call-template> </xsl:with-param> </xsl:call-template> <xsl:if test="//table"> <xsl:call-template name="page.sequence"> <xsl:with-param name="master-reference" select="$lot-master-reference"/> <xsl:with-param name="element" select="'toc'"/> <xsl:with-param name="gentext-key" select="'ListofTables'"/> <xsl:with-param name="content"> <xsl:call-template name="list.of.titles"> <xsl:with-param name="titles" select="'table'"/> <xsl:with-param name="nodes" select="//table"/> </xsl:call-template> </xsl:with-param> </xsl:call-template> </xsl:if> <xsl:if test="//example"> <xsl:call-template name="page.sequence"> <xsl:with-param name="master-reference" select="$lot-master-reference"/> <xsl:with-param name="element" select="'toc'"/> <xsl:with-param name="gentext-key" select="'ListofExamples'"/> <xsl:with-param name="content"> <xsl:call-template name="list.of.titles"> <xsl:with-param name="titles" select="'example'"/> <xsl:with-param name="nodes" select="//example"/> </xsl:call-template> </xsl:with-param> </xsl:call-template> </xsl:if>
</xsl:template> ... </xsl:stylesheet> For me it seems as if only the standard creation of Lists of Titles in the document's front were working in DocBook V4.5 Kai Alexander Eisele CENIT AG -----Ursprüngliche Nachricht----- Sorry, I assumed you were using DocBook5 and the namespaced version of
the stylesheets, now I see that you are using DocBook 4. In the
customization I gave you, just remove the "d:" namespace prefix from the element names, then the stylesheet will recognize the elements in your document. Bob Stayton Sagehill Enterprises On 4/17/2015 2:54 AM, Eisele, Kai Alexander wrote: > Hi, > > Sorry, but this does not work for me. > > Here some relevant data, that may be necessary for further analysis: > > _Used tools/software_ > > __ > > XSLT Processor: Saxon Version 9-5-1-8 > > FO Processor: Apache FOP 1.1 > > XSL Stylesheet Files Distribution: ZIP-Release 1.78.1 downloaded from
> sourceforge.net > > DocBook V4.5 edited with XMLmind XML Editor Professional Edition 6.1.0 > > I inserted the following passages into my XSL customization layer: > > <?xml version='1.0'?> > > <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > xmlns:fo="http://www.w3.org/1999/XSL/Format" > xmlns:d="http://docbook.org/ns/docbook" version="1.0"> > > ... > > <xsl:import > href=""> > > ... > > <xsl:param name="generate.toc"> > > appendix nop <!-- tried also: toc,title resp. > toc,title,figure,table,example --> > > ... > > book toc,title > > ... > > </xsl:param> > > <!-- Template adjustment to have lists of titles (figures,
> tables, > examples) attached to the end of printed output --> > > <!-- Declared d xml namespace on top as you can see, yet not
> sure, whether that is neither correct nor required in DocBook V4.5 --> > > <xsl:template match="d:appendix[@role = 'lot']"> > > <xsl:variable name="lot-master-reference"> > > <xsl:call-template name="select.pagemaster"> > > <xsl:with-param name="pageclass" select="'lot'"/> > > </xsl:call-template> > > </xsl:variable> > > <xsl:if test="//d:figure"> > > <xsl:call-template name="page.sequence"> > > <xsl:with-param name="master-reference" > > select="$lot-master-reference"/> > > <xsl:with-param name="element" select="'toc'"/> > > <xsl:with-param name="gentext-key" > select="'ListofFigures'"/> > > <xsl:with-param name="content"> > > <xsl:call-template name="list.of.titles"> > > <xsl:with-param name="titles" select="'figure'"/> > > <xsl:with-param name="nodes" select="//d:figure"/> > > </xsl:call-template> > > </xsl:with-param> > > </xsl:call-template> > > <xsl:if test="//d:table"> > > <xsl:call-template name="page.sequence"> > > <xsl:with-param name="master-reference" > > select="$lot-master-reference"/> > > <xsl:with-param name="element" select="'toc'"/> > > <xsl:with-param name="gentext-key" > select="'ListofTables'"/> > > <xsl:with-param name="content"> > > <xsl:call-template name="list.of.titles"> > > <xsl:with-param name="titles" select="'table'"/> > > <xsl:with-param name="nodes" select="//d:table"/> > > </xsl:call-template> > > </xsl:with-param> > > </xsl:call-template> > > </xsl:if> > > <xsl:if test="//d:example"> > > <xsl:call-template name="page.sequence"> > > <xsl:with-param name="master-reference" > > select="$lot-master-reference"/> > > <xsl:with-param name="element" select="'toc'"/> > > <xsl:with-param name="gentext-key" > select="'ListofExamples'"/> > > <xsl:with-param name="content"> > > <xsl:call-template name="list.of.titles"> > > <xsl:with-param name="titles" select="'example'"/> > > <xsl:with-param name="nodes" select="//d:example"/> > > </xsl:call-template> > > </xsl:with-param> > > </xsl:call-template> > > </xsl:if> > > </xsl:template> > > ... > > </xsl:stylesheet> > > As to the appendix' customization's result in printed output, it just
> seems to be ignored by XSLT and FOP. > > The processors run through it without any warnings or error messages,
> everything appears to be alright, yet no appendix is created in the PDF. > Only the standard book TOC is available in the front of the document. > > Maybe I should try the alternative, you mentioned, which is to let the
> stylesheet create an appendix or appendices automatically? > > Because that is, what should be done as a rule by the XSL
> customization layer we need for our print output documentation purposes. > > Regards > > Kai Alexander Eisele > > -----Ursprüngliche Nachricht----- > Von: Bob Stayton [mailto:bobs@sagehill.net] > Gesendet: Mittwoch, 15. April 2015 18:02 > An: Eisele, Kai Alexander;
docbook-apps@lists.oasis-open.org > Betreff: Re: [docbook-apps] Listings placeable at the End of Printed Output? > > Hi, > > Yes, it is possible to do this. You could get the stylesheet to do it
> automatically, but you could also use a special appendix file as you
> suggest to trigger it only for certain documents. That appendix would
> need a role attribute to trigger the special processing. > > In the template matching on the book element in fo/division.xsl, it
> calls the "make.book.tocs" template before the content. That template
> checks the "generate.toc" stylesheet param to see which lists to
> generate. You would want to set "generate.toc" to just "book toc,title" > > so it doesn't generate the other lists in the front. > > Then you create a custom template for your special appendix to
> generate the lists of titles, borrowing much of the code from the
> "make.book.tocs" template, something like: > > <xsl:template match="d:appendix[@role = 'lot']"> > > <xsl:variable name="lot-master-reference"> > > <xsl:call-template name="select.pagemaster"> > > <xsl:with-param name="pageclass" select="'lot'"/> > > </xsl:call-template> > > </xsl:variable> > > <xsl:if test="//d:figure"> > > <xsl:call-template name="page.sequence"> > > <xsl:with-param name="master-reference" > > select="$lot-master-reference"/> > > <xsl:with-param name="element" select="'toc'"/> > > <xsl:with-param name="gentext-key" select="'ListofFigures'"/> > > <xsl:with-param name="content"> > > <xsl:call-template name="list.of.titles"> > > <xsl:with-param name="titles" select="'figure'"/> > > <xsl:with-param name="nodes" select="//d:figure"/> > > </xsl:call-template> > > </xsl:with-param> > > </xsl:call-template> > > <!-- repeat for tables, examples, etc. --> > > </xsl:if> > > Note you need to change the select attribute for figure from .//figure
> (the context relative to the book element) to //figure so the appendix
> context can find the figure elements. > > This special appendix will also generate an entry in the main TOC,
> unless you further customize to turn that off or change its appearance. > > Bob Stayton > > Sagehill Enterprises > > bobs@sagehill.net <mailto:bobs@sagehill.net> > > On 4/15/2015 3:11 AM, Eisele, Kai Alexander wrote: > > > Hi, > > > > > > Is there any chance to have lists of figures, tables and examples > > > positioned at the end of printed output (PDF documents)? > > > > > > By default, the listings appear at the beginning of the documents > > > right after the actual TOC. > > > > > > Is it possible to customize a sort of document appendix, that
> contains > > > the lists of figures, tables and examples? > > > > > > Regards > > > > > > > > > *Kai Alexander Eisele* > > > SAP CC > > > > > > *CENIT AG * > > > Industriestraße 52-54 > > > D-70565 Stuttgart > > > Phone: +49 (0) 711-78 25-3241 > > > Fax: +49 (0)711 7825 44-4145 > > > > > > k.eisele@cenit.de <mailto:k.eisele@cenit.de>
> > > > > > www.cenit.com <http://www.cenit.com>
> <http://www.cenit.com/en_EN.html>__ > > > > > > > > > CENIT AG, Industriestrasse 52-54, 70565 Stuttgart, Tel.: +49 711 > > > 7825-30, Fax: +49 711 7825-4000, Internet:
www.cenit.de > > > Geschaeftsstellen: Berlin, Frankfurt, Hamburg, Hannover, Muenchen, > > > Oelsnitz, Ratingen, Saarbruecken > > > Vorstandsmitglieder: Kurt Bengel, Matthias Schmidt > > > Aufsichtsratsmitglieder: Andreas Schmidt (Vorsitzender des > > > Aufsichtsrats), Hubert Leypoldt, Andreas Karrer > > > Bankverbindungen: > > > Deutsche Bank (BLZ 600 700 70) Kto. 1661 040 IBAN : DE85 6007 0070 > > > 0166 > > > 1040 00 SWIFT-CODE : DEUTDESS, > > > Commerzbank (BLZ 600 400 71) Kto. 532 015 500 IBAN : DE83 6004 0071 > > > 0532 > > > 0155 00 SWIFT-Code : COBADEFF600, > > > Registergericht: Amtsgericht Stuttgart > > > Handelsregister: HRB Nr. 19117 > > > Umsatzsteuer: ID-Nr. DE 147 862 777 > > > > > > CENIT AG, Industriestrasse 52-54, 70565 Stuttgart, Tel.: +49 711
> 7825-30, Fax: +49 711 7825-4000, Internet:
www.cenit.de > Geschaeftsstellen: Berlin, Frankfurt, Hamburg, Hannover, Muenchen,
> Oelsnitz, Ratingen, Saarbruecken > Vorstandsmitglieder: Kurt Bengel, Matthias Schmidt > Aufsichtsratsmitglieder: Andreas Schmidt (Vorsitzender des
> Aufsichtsrats), Hubert Leypoldt, Andreas Karrer > Bankverbindungen: > Deutsche Bank (BLZ 600 700 70) Kto. 1661 040 IBAN : DE85 6007 0070
> 0166 > 1040 00 SWIFT-CODE : DEUTDESS, > Commerzbank (BLZ 600 400 71) Kto. 532 015 500 IBAN : DE83 6004 0071
> 0532 > 0155 00 SWIFT-Code : COBADEFF600, > Registergericht: Amtsgericht Stuttgart > Handelsregister: HRB Nr. 19117 > Umsatzsteuer: ID-Nr. DE 147 862 777 > CENIT AG, Industriestrasse 52-54, 70565 Stuttgart, Tel.: +49 711 7825-30, Fax: +49 711 7825-4000, Internet:
www.cenit.de |
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]