Next in thread → Next in month →

Re: [docbook-apps] height literallayout

From
Bob Stayton <>
Date
2009-01-27T17:08:36+00:00
ID
004901c980a1$dc251ec0$6400a8c0@pazu
Thread
Re: [docbook-apps] height literallayout
Yes, it is possible.  You would need to customize the template for 
literallayout as there is no parameter to control that.  Fortunately, you 
can do it with a wrapper around <xsl:apply-imports/> instead of customizing 
the original template. This template computes the height from a PI and wraps 
an fo:block-container around the content that is still processed with the 
original template via xsl:apply-imports:

<xsl:template match="literallayout">
  <xsl:variable name="height">
    <xsl:value-of 
select="normalize-space(processing-instruction('boxheight'))"/>
  </xsl:variable>

  <xsl:choose>
    <xsl:when test="string-length($height) &gt; 0">
      <fo:block-container height="{$height}">
        <xsl:apply-imports/>
      </fo:block-container>
    </xsl:when>
    <xsl:otherwise>
      <xsl:apply-imports/>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>

Then add a processing instruction to your documents as needed:

<literallayout><?boxheight 2in?>First line
...
</literallayout>

Bob Stayton
Sagehill Enterprises



----- Original Message ----- 
From: "Lily Galle" <>
To: <>
Sent: Thursday, January 22, 2009 1:04 PM
Subject: [docbook-apps] height literallayout


> Hallo,
>
> Is it possible to define the height between <literallayout> and 
> </literallayout> ?    For example with “processing instruction” or with 
> “role”?
>
> Thanks for any help!
>
> Lily
>
> -- 
> NUR NOCH BIS 31.01.! GMX FreeDSL - Telefonanschluss + DSL
> für nur 16,37 EURO/mtl.!* http://dsl.gmx.de/?ac=OM.AD.PD003K11308T4569a
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: 
> For additional commands, e-mail: 
>
>
>
Next in thread → Next in month →