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 "Koes, Derrick" <De...@Smith-Nephew.com> on 2002/07/22 22:42:47 UTC

dynamic table question

 

I'd like to include two images on one table row.

However, I cannot determine the number of images until I'm ready to insert
them into the table.   How can I dynamically create table rows?

 

I'd like to do something like:

 

 

<xsl:template match="Images">

    <fo:table inline-progression-dimension.optimum="5pt" text-align="left"
table-layout="fixed">

      <fo:table-column/>

      <fo:table-column/>

      <fo:table-body>

    <xsl:for-each select="Image">

      <xsl:variable name="image" select="./@imageId"/>

      <xsl:if test="$image">

        <xsl:variable name="uri" select="concat($servlet, $image,
$mimetype)"/>

        <fo:block>

          <fo:external-graphic width="2in" height="1.5in">

            <xsl:attribute name="src">

              <xsl:value-of select="$uri"/>

            </xsl:attribute>

          </fo:external-graphic>

        </fo:block>

      </xsl:if>

      </xsl:for-each>

  </xsl:template>

 

except I need to add the table piece.  I'm not sure how to do this.

 


Re: dynamic table question

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Koes, Derrick wrote:
>  
> 
> I'd like to include two images on one table row.
> 
> However, I cannot determine the number of images until I'm ready to 
> insert them into the table.   How can I dynamically create table rows?

This appears to be a grouping quesstion. However,
both your description and the sample code could be a
bit more specific.
In general, this is an XSLT question, you'll get
answers faster if you ask on the XSL list
  http://www.mulberrytech.com/xsl/xsl-list/

J.Pietschmann