> -----Original Message-----
> From: Omar Adobati [mailto:[EMAIL PROTECTED] 
> Sent: Monday, July 24, 2006 10:10 AM
> To: [email protected]
> Subject: block width
> 
> Good Morning,
>   here is a snippet of code I'm using:
> 
>     <xsl:template match="senders">
>       <fo:block space-after="2cm" width="10cm">
>         <xsl:for-each select="sender">
>           <xsl:call-template name="sender"/>
>         </xsl:for-each>
>       </fo:block>
>     </xsl:template>
> 
>     <xsl:template name="sender">
>       <fo:block space-after="0.5cm" width="8cm" border-style="solid">
>         <fo:block color="black" font-size="12px">
>           <xsl:value-of select="name"/>
>         </fo:block>
>         <fo:block color="black" font-size="8px">
>           <xsl:value-of select="address/room"/>,
>           <xsl:value-of select="address/street"/>
>         </fo:block>
>       </fo:block>
>     </xsl:template>
> 
> but the width attribute is quite ignored. My blocks still 
> have their width (that fill all the page witdh). I want them 
> resized and aligned to the right of the page...
> Where is the mistake? Where I am wrong?

Omar,
Reading the spec at [1], start-indent, end-indent and
inline-progression-dimension (=width in context left-to-right) are very
closed, and depend on ancestor reference-area (fo:block produce a
block-area, not a r-a).

You can:
- either use margin/indent properties  on fo:block (see Wiki page at [2]
to understand how indents and margins are handled)

- or embed your fo:block in a block-container (witch define a
reference-area):
<xsl:template match="senders">
  <fo:block-container space-after="2cm" width="10cm">
    <xsl:for-each select="sender">
      <xsl:call-template name="sender"/>
    </xsl:for-each>
  </fo:block-container>
</xsl:template>

[1] http://www.w3.org/TR/xsl11/#overcons_geom
[2] http://wiki.apache.org/xmlgraphics-fop/IndentInheritance

Pascal

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to