xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Louis.Mast...@log-net.com
Subject RE: dynamic surrounding box
Date Thu, 21 Jul 2005 11:42:33 GMT

OK, I'm stuck on this also.  My thought was to use the inline tag for the
inner text and apply a border to them, but I can't seem to get the border
to show up.  For example:

<xsl:template match="section">
<fo:block>
      <fo:table table-layout="fixed" width="100%" border-width="0..25mm"
border-style="solid" border-color="green">
            <fo:table-column column-width="50mm"/>
                  <fo:table-body>
                        <xsl:for-each select="line">
                              <fo:table-row>
                                          <fo:table-cell text-align=
"center" padding="1mm">
                                                <fo:block><
xsl:apply-templates select="."/></fo:block>
                                          </fo:table-cell>
                              </fo:table-row>
                        </xsl:for-each>
                  </fo:table-body>
      </fo:table>
</fo:block>
</xsl:template>

<xsl:template match="line">
<fo:inline border-width="0.25mm" border-style="solid" border-color="red"
color="blue">
      <fo:block><xsl:apply-templates/></fo:block>
</fo:inline>
</xsl:template>

I may be using the inline incorrectly so I am posting this to see if anyone
else has any ideas.

Sorry.
-Lou



|---------+--------------------------->
|         |           "Rymasz Jacky"  |
|         |           <jacky.rymasz@jc|
|         |           decaux.fr>      |
|         |                           |
|         |           07/19/2005 09:10|
|         |           Please respond  |
|         |           to fop-users    |
|         |                           |
|---------+--------------------------->
  >-------------------------------------------------------------------------------------------------------------------------------|
  |                                                                                      
                                        |
  |        To:      <fop-users@xmlgraphics.apache.org>                             
                                              |
  |        cc:                                                                           
                                        |
  |        Subject: RE: dynamic surrounding box                                          
                                        |
  >-------------------------------------------------------------------------------------------------------------------------------|



May be I've not been very precise about what I'm looking for.
I try to explain better this time :)

What I'm looking for is to have several texts (of variable length)
surrounded by a border with constant padding (top, left right, bottom) from
the inner text.
The texts should hold into 1 line so the height is constant but not the
width.
Ex of what I'm looking for:
 ________________________
|     ______________     |
|    |              |    |
|    | short text 1 |    |
|    |______________|    |
|  ____________________  |
| |                    | |
| | much longer text 2 | |
| |____________________| |
|________________________|

My texts (with the border around) should be centered into the page.
I'm using a table (as Lou recommanded) to do the centering but I still have
the problem of drawing a border around my texts of variable width.
Any help or indication will be very welcome ;)

Thx

Jack




-----Message d'origine-----
De : Rymasz Jacky [mailto:jacky.rymasz@jcdecaux.fr]
Envoyé : lundi 18 juillet 2005 15:55
À : fop-users@xmlgraphics.apache.org
Objet : RE: dynamic surrounding box

Thx for your answer Lou.
I'm sorry to answer so late but I was away for few weeks.

I tried to put a table into the cells but the cell of the inner table still
take the full width of the outer cell.

Here a snippet of my code:
        <fo:table>
            <fo:table-column column-width="2.5cm"/>
            <fo:table-column column-width="5.5cm"/>
            <fo:table-column column-width="5cm"/>
            <fo:table-column column-width="4.6cm"/>
            <fo:table-body>
                <fo:table-row background-color="red">
                         <fo:table-cell number-columns-spanned="4"
background-color="pink" display-align="center">
                            <fo:table>
                                <fo:table-column />
                                <fo:table-body>
                                    <fo:table-row background-color="green">
                                        <fo:table-cell
background-color="blue">
                                            <fo:block>
                                                <xsl:value-of
select="concat('TEST: ', ../@number)"/>
                                            </fo:block>
                                        </fo:table-cell>
                                    </fo:table-row>
                                </fo:table-body>
                            </fo:table>
                    </fo:table-cell>
                </fo:table-row>
            </fo:table-body>
        </fo:table>

Jack

-----Message d'origine-----
De : Louis.Masters@log-net.com [mailto:Louis.Masters@log-net.com]
Envoyé : vendredi 24 juin 2005 17:15
À : fop-users@xmlgraphics.apache.org
Objet : Re: dynamic surrounding box


How about putting text1 and test 2 into blind tables within the cells?  Put
a border around the inner table and that should do the trick.
-Lou



|---------+--------------------------->
|         |           "Rymasz Jacky"  |
|         |           <jacky.rymasz@jc|
|         |           decaux.fr>      |
|         |                           |
|         |           06/24/2005 10:13|
|         |           Please respond  |
|         |           to fop-users    |
|         |                           |
|---------+--------------------------->

>-------------------------------------------------------------------------------------------------------------------------------|

  |
|
  |        To:      <fop-users@xmlgraphics.apache.org>
|
  |        cc:
|
  |        Subject: dynamic surrounding box
|

>-------------------------------------------------------------------------------------------------------------------------------|




Hello.

I would like to have a box around a dynamic text.
How can I obtain this effect?

I tried with blocks and tables but either I have to put a static width,
either the block fill totally the table-cell is is into.

What I want is:

_________________ table cells
|                            |
|    _______            |
|    | Text 1 |            |
|    [______|            |
|________________|
|                            |
|    ____________   |
|    | biger Text 2  |   |
|    [___________|   |
|________________|

Where "Text1" and "biger Text 2" are of unknown length and are into
table-cells.

Thx alot

Jack






---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org







---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Mime
View raw message