docbook-apps

  • 1.  Docbook footer

    Posted 11-19-2010 08:25


    Hey guys!

    I am a newie in Docbook. But i'm trying and developing nearly everyday.
    At this moment i am trying to get the Register of Companies in the
    footer. Can somebody help me with an example! I already read an
    description. I get the theory but the experience is still missing!

    Here is what i tried, but didn't work:



    <xsl:template name="footer.content">
    <xsl:param name="pageclass" select="''"/>
    <xsl:param name="sequence" select="''"/>
    <xsl:param name="position" select="''"/>
    <xsl:param name="gentext-key" select="''"/>



    <fo:block>
    <xsl:choose>
    <xsl:when test="$sequence = 'blank'">

    </xsl:when>

    <xsl:when test="$position='r1c1'">

    <xsl:if test="$pageclass != 'titlepage'">
    <fo:text>companyname
    </fo:text>
    </xsl:if>
    </xsl:when>
    <xsl:when test="$position='r1c2'">

    <xsl:if test="$pageclass != 'titlepage'">
    <fo:text>address
    </fo:text>
    </xsl:if>
    </xsl:when>
    <xsl:when test="$position='r1c3'">

    <xsl:if test="$pageclass != 'titlepage'">
    <fo:text>manager
    </fo:text>
    </xsl:if>
    </xsl:when>

    <xsl:when test="$position='center'">

    </xsl:when>

    <xsl:when test="$position='right'">

    </xsl:when>

    <xsl:when test="$sequence = 'first'">

    </xsl:when>

    <xsl:when test="$sequence = 'blank'">

    </xsl:when>
    </xsl:choose>
    </fo:block>

    </xsl:template>
    <xsl:variable name="candidate">
    <fo:table xsl:use-attribute-sets="footer.table.properties">
    <xsl:call-template name="foot.sep.rule">
    <xsl:with-param name="pageclass" select="$pageclass"/>
    <xsl:with-param name="sequence" select="$sequence"/>
    <xsl:with-param name="gentext-key" select="$gentext-key"/>
    </xsl:call-template>
    <fo:table-column column-number="1">
    <xsl:attribute name="column-width">
    <xsl:text>proportional-column-width(</xsl:text>
    <xsl:call-template name="header.footer.width">
    <xsl:with-param name="location">footer</xsl:with-param>
    <xsl:with-param name="position" select="$column1"/>
    </xsl:call-template>
    <xsl:text>)</xsl:text>
    </xsl:attribute>
    </fo:table-column>
    <fo:table-column column-number="2">
    <xsl:attribute name="column-width">
    <xsl:text>proportional-column-width(</xsl:text>
    <xsl:call-template name="header.footer.width">
    <xsl:with-param name="location">footer</xsl:with-param>
    <xsl:with-param name="position" select="2"/>
    </xsl:call-template>
    <xsl:text>)</xsl:text>
    </xsl:attribute>
    </fo:table-column>
    <fo:table-column column-number="3">
    <xsl:attribute name="column-width">
    <xsl:text>proportional-column-width(</xsl:text>
    <xsl:call-template name="header.footer.width">
    <xsl:with-param name="location">footer</xsl:with-param>
    <xsl:with-param name="position" select="$column3"/>
    </xsl:call-template>
    <xsl:text>)</xsl:text>
    </xsl:attribute>
    </fo:table-column>

    <fo:table-body>
    <fo:table-row>
    <xsl:attribute name="block-progression-dimension.minimum">
    <xsl:value-of select="$footer.table.height"/>
    </xsl:attribute>
    <fo:table-cell text-align="left"
    display-align="after">
    <xsl:if test="$fop.extensions = 0">
    <xsl:attribute name="relative-align">baseline</xsl:attribute>
    </xsl:if>
    <fo:block>
    <xsl:call-template name="footer.content">
    <xsl:with-param name="position" select="'r1c1'"/>
    </xsl:call-template>
    </fo:block>
    </fo:table-cell>
    <fo:table-cell text-align="center"
    display-align="after">
    <xsl:if test="$fop.extensions = 0">
    <xsl:attribute name="relative-align">baseline</xsl:attribute>
    </xsl:if>
    <fo:block>
    <xsl:call-template name="footer.content">
    <xsl:with-param name="position" select="'r1c2'"/>
    </xsl:call-template>
    </fo:block>
    </fo:table-cell>
    <fo:table-cell text-align="right"
    display-align="after">
    <xsl:if test="$fop.extensions = 0">
    <xsl:attribute name="relative-align">baseline</xsl:attribute>
    </xsl:if>
    <fo:block>
    <xsl:call-template name="footer.content">
    <xsl:with-param name="position" select="'r1c3'"/>
    </xsl:call-template>
    </fo:block>
    </fo:table-cell>
    </fo:table-row>
    </fo:table-body>
    </fo:table>
    </xsl:variable>

    best regards Lwam

    --
    Gruß Lwam Berhane



    punkt.de GmbH TYPO3-Internet-Dienstleistungen-Beratung
    Kaiserallee 13a Tel.: 0721 9109-0 Fax: -100
    76133 Karlsruhe info@punkt.de http://punkt.de/
    AG Mannheim 108285 Gf: Jürgen Egeling




  • 2.  line breaking in programlistings

    Posted 11-22-2010 14:02
    Hello!
    how can I break e.g tx_pteswepricecalculator_supplarea at the
    underscores? Are there any similiarities to LaTex?
    In LaTeX it works like this:
    tx_"-pteswepricecalculator_"-supplyarea



    Best regards Lwam

    --
    Gruß Lwam Berhane



    punkt.de GmbH TYPO3-Internet-Dienstleistungen-Beratung
    Kaiserallee 13a Tel.: 0721 9109-0 Fax: -100
    76133 Karlsruhe info@punkt.de http://punkt.de/
    AG Mannheim 108285 Gf: Jürgen Egeling



  • 3.  Re: [docbook-apps] line breaking in programlistings

    Posted 11-23-2010 13:27
    Hello Lwam,

    I guess you are talking about FO output.
    I do this by adding zero width spaces where I want the line breaking to
    happen :

    tx​_pteswepricecalculator​_supplarea

    Note that you may need to setup some things in your XSL as described in
    http://www.sagehill.net/docbookxsl/FittingText.html

    I would like to hear about a higher-level way to do it, if there is one.

    cheers

    [NeoDoc] NeoDoc
    Maxime Bégnis
    Développeur
    maxime@neodoc.biz
    Tél: 09.54.96.99.55 - Fax: 09.59.96.99.55
    http://www.neodoc.fr/
    5, rue de la Touloubre
    13770 Venelles

    Le 22/11/2010 15:02, Lwam Berhane a écrit :
    > Hello!
    > how can I break e.g tx_pteswepricecalculator_supplarea at the
    > underscores? Are there any similiarities to LaTex?
    > In LaTeX it works like this:
    > tx_"-pteswepricecalculator_"-supplyarea
    >
    >
    >
    > Best regards Lwam
    >



  • 4.  Re: [docbook-apps] line breaking in programlistings

    Posted 11-24-2010 16:25
    Maxime Bégnis wrote:

    > I would like to hear about a higher-level way to do it, if there is one.

    Yep, you can instruct XSL stylesheet to allow breaking at certain
    characters automatically, see:

    http://docbook.sourceforge.net/release/xsl/current/doc/fo/hyphenate.verbatim.characters.html

    http://docbook.sourceforge.net/release/xsl/current/doc/fo/hyphenate.verbatim.html

    --
    ------------------------------------------------------------------
    Jirka Kosek e-mail: jirka@kosek.cz http://xmlguru.cz
    ------------------------------------------------------------------
    Professional XML consulting and training services
    DocBook customization, custom XSLT/XSL-FO document processing
    ------------------------------------------------------------------
    OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34 member
    ------------------------------------------------------------------