xsl-list
[Top] [All Lists]

Re: [xsl] fo:instream-foreign-object - fo:table height overflow

2008-05-26 07:58:43
Greetings,

Thanks for your reply.  It has helped, but I'm not quite solved yet.


The problem is that the object is embedded within a line, and you
get some space (the half-leading) added to the line height. This can
be avoided by setting line-height="0" on the block, there are some
other ways as well. You may still run into round-off problems, if so
try using height="9.0in + 0.1pt" (yes this should work) on the table
row.


This did help, the space above the graphic is now gone and I can move the
graphic relative to the top border of the cell by using the
height="9.0 + n.npt" trick.

The line-height="0" does indeed make a difference.  I had two columns in that
row, when I deleted the contents of the second column, the problem was greatly
reduced in the first column.  So I have to debug the content of that column and
see where my addition is not working.

However, even with the content of the second column removed and using the
@line-height="0" I still get a small blank space *after* the graphic above the
bottom border line of the cell.

I include the entire fo document below.  I perhaps there is something obvious
to fix that portion of the problem?

Thanks for your advice.

Peter

begin fo document:

<fo:root xmlns:xs="http://www.w3.org/2001/XMLSchema";
        xmlns:gf="http://www.geofunctions.org/spatial-functions";
        xmlns:fo="http://www.w3.org/1999/XSL/Format";
        xmlns="http://www.geofunctions.org/spatial-functions";
        xmlns:wfs="http://www.opengis.net/wfs";
        xmlns:gml="http://www.opengis.net/gml";
        xmlns:xlink="http://www.w3.org/1999/xlink";>
  <fo:layout-master-set>
     <fo:simple-page-master master-name="simple" page-height="11in"
page-width="17in" margin-top=".3in"
                            margin-bottom=".1in"
                            margin-left="1in"
                            margin-right=".5in">
        <fo:region-body/>
     </fo:simple-page-master>
  </fo:layout-master-set>
  <fo:page-sequence master-reference="simple">
     <fo:flow flow-name="xsl-region-body">
        <fo:table font-family="Helvetica" font-size="8pt"
font-weight="600" width="100%">
           <fo:table-column column-number="1" column-width="3.75in"/>
           <fo:table-column column-number="2" column-width="3.5in"/>
           <fo:table-column column-number="3" column-width="4.25in"/>
           <fo:table-column column-number="4" column-width="3in"/>
           <fo:table-body>
              <fo:table-row font-stretch="condensed">
                 <fo:table-cell text-align="left" padding-after="5pt"
display-align="after">
                    <fo:block>Geo<fo:character font-weight="bold"
character="ƒ"/>unctions Demonstration Area Reference Maps</fo:block>
                    <fo:block>Geo<fo:character font-weight="bold"
character="ƒ"/>unctions is a standards-based open source
library</fo:block>
                    <fo:block>for XSLT manipulation of geographic
information.</fo:block>
                 </fo:table-cell>
                 <fo:table-cell text-align="center"
display-align="after" padding-after="5pt" font-size="18pt">
                    <fo:block>Test Area Name</fo:block>
                    <fo:block>by: Geo<fo:character font-weight="bold"
character="ƒ"/>unctions</fo:block>
                 </fo:table-cell>
                 <fo:table-cell padding-after="5pt"
display-align="after" text-align="right">
                    <fo:block>Cartes de référence des aires de
démonstration, par Géo<fo:character font-weight="bold"
character="ƒ"/>onctions</fo:block>
                    <fo:block>Géo<fo:character font-weight="bold"
character="ƒ"/>onctions est un projet source-ouverte qui reste sur une
base de normes</fo:block>
                    <fo:block>pour aider la manipulation de
l'information géographique avec XSLT.</fo:block>
                 </fo:table-cell>
              </fo:table-row>
              <fo:table-row height="9.0in + 1.5pt">
                 <fo:table-cell border-style="solid"
border-width="1pt" border-color="black"

                                background-color="rgb(190,190,190)"
                                number-columns-spanned="3"
                                display-align="center"
                                text-align="center">

                    <fo:block line-height="0">
                       <fo:instream-foreign-object width="11.5" height="9.0in">
                                 <svg:svg
xmlns:svg="http://www.w3.org/2000/svg"; width="11.5in" height="9.0in"

                                   viewBox="0 -648 828 648">
                             <svg:g transform="matrix(1 0 0 -1 0 0)">

                                    <!-- diagonal -->
                                       <svg:path
style="stroke:rgb(0,0,255);stroke-width:1;fill:none"
                                       d="M0 0 L828 648"/>
                                       <!-- diagonal -->
                                       <svg:path
style="stroke:rgb(0,0,255);stroke-width:1;fill:none"
                                       d="M0 648 L828 0"/>
                                       <!-- horizontal -->
                                       <svg:path
style="stroke:rgb(0,0,255);stroke-width:1;fill:none"
                                                 d="M0 0 L828 0"/>
                                       <!-- horizontal -->
                                       <svg:path
style="stroke:rgb(0,0,255);stroke-width:1;fill:none"
                                       d="M0 648 L828 648"/>
                                       <!-- vertical -->
                                       <svg:path
style="stroke:rgb(0,0,255);stroke-width:1;fill:none"
                                                 d="M0 0 L0 648"/>
                                       <svg:path
style="stroke:rgb(0,0,255);stroke-width:1;fill:none"
                                                 d="M828 648 L828 0"/>
                             </svg:g>
                          </svg:svg>
                       </fo:instream-foreign-object>
                    </fo:block>
                 </fo:table-cell>
              </fo:table-row>
              <fo:table-row font-size="6pt" font-stretch="semi-condensed">
                 <fo:table-cell padding-before="5pt"
text-align="left" width="5in" number-columns-spanned="2">
                    <fo:block>Produced by Geo<fo:character
font-weight="bold" character="ƒ"/>unctions, 2008.</fo:block>
                 </fo:table-cell>
                 <fo:table-cell padding-before="5pt" width="5in"
text-align="right">
                    <fo:block>Préparé par Géo<fo:character
font-weight="bold" character="ƒ"/>onctions, 2008.</fo:block>
                 </fo:table-cell>
              </fo:table-row>
           </fo:table-body>
        </fo:table>
     </fo:flow>
  </fo:page-sequence>
</fo:root>

--~------------------------------------------------------------------
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-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--