[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

adjust width of block to previous block

Subject: adjust width of block to previous block
From: Mathis Mörke <mathis.moerke@xxxxxxxxxxxxxx>
Date: Fri, 15 Jul 2011 17:07:01 +0200
 adjust width of block to previous block
Dear all,

I am using Apache FOP version 0.95. Furthermore I am using xsl-fo to
generate pdf out of Matlab (matlab generates an xml-file and I use a
xsl-fo file as style sheet)

I don't know how to adjust the width of a next block to the previous
block. I have an external graphic in a block and want the next block
to have the same size as the block containing the external graphic.


<fo:block space-after="3mm"> <!-- block with external graphic which
width is dynamic -->
   <fo:external-graphic>
    <xsl:attribute name="src">url('<xsl:value-of
select="@filename"/>')</xsl:attribute>
    <xsl:attribute name="content-height">
     <xsl:choose>
      <xsl:when test="@height">
       <xsl:value-of select="@height" />
      </xsl:when>
      <xsl:otherwise>100%</xsl:otherwise>
     </xsl:choose>
    </xsl:attribute>
    <xsl:attribute name="content-width">
     <xsl:choose>
      <xsl:when test="@width">
       <xsl:value-of select="@width" />
      </xsl:when>
      <xsl:otherwise>100%</xsl:otherwise>
     </xsl:choose>
    </xsl:attribute>
   </fo:external-graphic>
  </fo:block>
  <fo:block font-size="8pt" text-align="justify" wrap-option="wrap" >
<!-- width of this block must be equal to the previous block in order
to have the text (@caption) in line with the graphic
   <xsl:value-of select="@caption" />
  </fo:block>

Thanks for your help,
Mathis

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.