You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Max Dcosta <Ma...@Netdecisions.com> on 2002/07/31 09:19:09 UTC

RE: Embedding a table in a table-row

Dear All,

I have embedded a Table within a table, and i have called the nested table
as a Template.
The contents of the Nested Table dont show in the final pdf which is
generated.

I am sending you the xml, the xsl and the pdf output file.

Please guide me as to where did i go wrong.

Thanks and best regards,

Max

P.S.: Why do we do select="auto" in the param name. I did not understand
what "auto" does. Please throw some light on it my friend.









-----Original Message-----
From: Louis.Masters@log-net.com [mailto:Louis.Masters@log-net.com]
Sent: Wednesday, June 12, 2002 4:46 PM
To: fop-user@xml.apache.org
Subject: Re: Embedding a table in a table-row




Here is my code:

<fo:table-cell>
<fo:block>
<xsl:call-template name = "processSubTable">
     <xsl:with-param name="tableheight" select="auto"/>
</xsl:call-template>
...

with the template looking like:

<xsl:template name="processSubTable">
<xsl:param name="tableheight">
     auto
</xsl:param>
<fo:table space-before.optimum="3pt" space-after.optimum="3pt" width="100%"
height="{$tableheight}">
<fo:table-column>
...
</fo:table-column>

<fo:table-header>
...
</fo:table-header>


<fo:table-body>
...
</fo:table-body>

</fo:table>
</xsl:template>

-Lou




"Hahn Kurt (CHA)" <ku...@etat.ge.ch> on 06/12/2002 04:45:33 AM

Please respond to fop-user@xml.apache.org

To:   fop-user@xml.apache.org
cc:

Subject:  Embedding a table in a table-row

I'm trying to embed a table in a table row. It seems to work, but my text
isn't displayed (not even the test block "text" I inserted): What I'm
seeing
is two thick lines, and I'm suspecting each line represents one row
(because
I should get two rows with the template below).Why are they compressed like
this?  Do I need to use some other property in order to be able to display
an embedded table? Or is just some error in my code?
Thanks in advance


The definition of the wrapping table:
<fo:table  border-style="solid" font-size="10pt">
     <fo:table-column column-width="17cm"/>
     <fo:table-body>
     <xsl:apply-templates select="//eleTexte:listeAffaires"/>
     </fo:table-body>
</fo:table>


and here goes the template that should fill one row of the table:
<xsl:template match="eleTexte:soustitre1">
          <fo:table-row font-size="14pt" font-weight="bold" height="40pt">
          <fo:table-cell>
                      <fo:table  border-style="solid" font-size="10pt">
                               <fo:table-column column-width="0.8cm"/>
                               <fo:table-column column-width="16.2cm"/>
                               <fo:table-row height="30pt">

<fo:table-cell><fo:block>text</fo:block>
                                                    <fo:block><xsl:value-of
select="."/></fo:block>
                                          </fo:table-cell>
                                          <fo:table-cell>
                                                    <fo:block><xsl:value-of
select="../eleTexte:soustitre1_text"/></fo:block>
                                          </fo:table-cell>
                               </fo:table-row>
               </fo:table>
          </fo:table-cell>
          </fo:table-row>
      </xsl:template>








Re: Embedding a table in a table-row

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Max Dcosta wrote:
> Dear All,
> 
> I have embedded a Table within a table, and i have called the nested table
> as a Template.
> The contents of the Nested Table dont show in the final pdf which is
> generated.
> 
> I am sending you the xml, the xsl and the pdf output file.
> 
> Please guide me as to where did i go wrong.

You were trapped by a bug in Xalan. Depending on your
environment, you should have noticed it, the FOP command
line outputs:
[INFO]: building formatting object tree
[WARN]: property - "border-spacing" is not implemented yet.
[ERROR]: Unknown formatting object ^table
[ERROR]: Unknown formatting object ^table-column
[ERROR]: Unknown formatting object ^table-body
[ERROR]: Unknown formatting object ^table-row
[ERROR]: Unknown formatting object ^table-cell
[ERROR]: Unknown formatting object ^block
[INFO]: [1]
[ERROR]: no handler defined for (none):table foreign xml

This indicates a namespace was dropped. Get a more
recent Xalan version, drop the jar into the FOP lib
directory, and you'll see the error flagged.

J.Pietschmann