Discussion:
cell height xsl
Jesse Schaaf
2012-01-21 03:14:54 UTC
Permalink
So I have a table that contains a cell of which I need to display the
bullet(•). The problem I am having is that I need to make the
bullet larger so I used a font-size = 15pt. This solved the issue and
the bullet displays at the right size however one side effect is that my
row that this bullet exists in expands in height.

I realize 15pt is likely higher then the row height but its possible for
other cells in this row to wrap and I want those cells to dictate the
height.

Im sure there is an easy solution to this but I am fairly new to xslt.

Here is the code that I have for the cell involved.


<fo:table-cell padding = ".5mm" border-width=".2mm" border="solid"
border-right-width="0mm" border-bottom-width=".2mm"
border-top-width=".2mm" text-align="center">
<xsl:for-each select="MEDDST">
<fo:block font-size="15pt">
<xsl:value-of select="'&#x2022;'" />
</fo:block>

</fo:table-cell >
--
Jesse Schaaf
Schaafnet Consulting
www.schaafnet.com
952-463-7625

--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-***@lists.mulberrytech.com>
--~--
Christian Kirchhoff
2012-01-21 10:04:35 UTC
Permalink
Post by Jesse Schaaf
I realize 15pt is likely higher then the row height but its possible
for other cells in this row to wrap and I want those cells to dictate
the height.
I can only talk from my experience in CSS. The height of the cell is
calculated according to the height of it's contents. The content - a
fo:block - again has a height that is calculated based on what's in that
block. The text in the block has a line-height, and that line-height is
calculated depending on the font-size(s) in that line.

One character with a larger font (the bullet) triggers an increase of
the line-height, which changes the height of the block and by thus of
the cell.

So I would try to define a fixed line-height for the fo:block, hoping
that now the bigger bullet won't have the undesired influence on the
line-height.

I hope it helps.

Best regards

Christian

Editura GmbH & Co. KG
Tempelhofer Damm 2 · 12101 Berlin
Telefon: +49 (30) 7 89 59 49-68
Fax: +49 (30) 7 89 59 49-90
www.editura.de
AG Berlin-Charlottenburg · HRA 43189 B · USt.Id. DE217180548
Geschäftsführer: Stefan Krause · Ralf Szymanski

--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-***@lists.mulberrytech.com>
--~--
Jesse Schaaf
2012-01-21 16:46:44 UTC
Permalink
Thank you Christian, your advice worked perfectly!!

Jesse Schaaf
Schaafnet Consulting
www.schaafnet.com
952-463-7625
Post by Christian Kirchhoff
Post by Jesse Schaaf
I realize 15pt is likely higher then the row height but its possible
for other cells in this row to wrap and I want those cells to dictate
the height.
I can only talk from my experience in CSS. The height of the cell is
calculated according to the height of it's contents. The content - a
fo:block - again has a height that is calculated based on what's in that
block. The text in the block has a line-height, and that line-height is
calculated depending on the font-size(s) in that line.
One character with a larger font (the bullet) triggers an increase of
the line-height, which changes the height of the block and by thus of
the cell.
So I would try to define a fixed line-height for the fo:block, hoping
that now the bigger bullet won't have the undesired influence on the
line-height.
I hope it helps.
Best regards
Christian
Editura GmbH & Co. KG
Tempelhofer Damm 2 · 12101 Berlin
Telefon: +49 (30) 7 89 59 49-68
Fax: +49 (30) 7 89 59 49-90
www.editura.de
AG Berlin-Charlottenburg · HRA 43189 B · USt.Id. DE217180548
Geschäftsführer: Stefan Krause · Ralf Szymanski
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
--~--
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-***@lists.mulberrytech.com>
--~--
Kevin Brown
2012-01-21 21:22:08 UTC
Permalink
There are many solutions, but setting the top padding on the bullet cell's
block to a negative value is the one I tend to use ... like this (see
padding-top is -3pt (difference between 12pt text and 15pt bullet):

<fo:table>
<fo:table-column
column-width="16pt"/>
<fo:table-column />
<fo:table-body>
<fo:table-row>
<fo:table-cell
border="1pt solid black">
<fo:block
font-size="15pt">&#x2022;</fo:block>
</fo:table-cell>
<fo:table-cell
border="1pt solid black">

<fo:block>This is some additional text that is in a different point
size.</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell
border="1pt solid black">
<fo:block
font-size="15pt" padding-top="-3pt">&#x2022;</fo:block>
</fo:table-cell>
<fo:table-cell
border="1pt solid black">

<fo:block>This is some additional text that is in a different point size
setting the padding to shift the bullet.</fo:block>
</fo:table-cell>
</fo:table-row>

<fo:table-row>
<fo:table-cell
border="1pt solid black">
<fo:block
font-size="15pt" padding-top="-3pt">&#x2022;</fo:block>
</fo:table-cell>
<fo:table-cell
border="1pt solid black">

<fo:block>This is some additional text that is in a different point size
setting the padding to shift the bullet.</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>

Kevin Brown
RenderX

**********************************************


Date: Fri, 20 Jan 2012 21:14:54 -0600
To: xsl-***@lists.mulberrytech.com
From: Jesse Schaaf <***@schaafnet.com>
Subject: cell height xsl
Post by Jesse Schaaf
I realize 15pt is likely higher then the row height but its possible for
other cells in this row to wrap and I want those cells to dictate the
height.

Im sure there is an easy solution to this but I am fairly new to xslt.

Here is the code that I have for the cell involved.

<snip/>



--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-***@lists.mulberrytech.com>
--~--

Loading...