xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mario Madunic" <Mario_Madu...@newflyer.com>
Subject RE: conditional drawning of table
Date Wed, 17 Mar 2010 14:36:34 GMT
Red Light you can combine what Louis and Eric have suggested with the named template and now
you can just call the named template with the if test.

<xsl:template name="tableCondition">
    <fo:table>
      <xsl:if test="count(/report/listElements/element) &gt; 0" > 
        <xsl:attribute name="border-bottom">whatever</xsl:attribute>
      </xsl:if>
      Test of table here...
     <fo:table>
</xsl:template>

<xsl:call-template name="tableCondition" />

Marijan (Mario) Madunic
Publishing Specialist
New Flyer Industries

From: Louis.Masters@log-net.com [mailto:Louis.Masters@log-net.com] 
Sent: Wednesday, March 17, 2010 9:28 AM
To: fop-users@xmlgraphics.apache.org
Subject: Re: conditional drawning of table


Try: 

<xsl:if test="count(/report/listElements/element) &gt; 0" > 
       <xsl:attribute name="border-bottom">whatever</xsl:attribute>
</xsl:if> 

-Lou 

Red Light <skydelta98@yahoo.com> wrote on 03/17/2010 10:12:13 AM:

> Hi ,
> 
> in my xsl i have a condition:
> 
>     <xsl:choose>
>            <xsl:when test="count(/report/listElements/element) &gt; 0" > 
>                                  i draw a table with a border in the bottom
>             </xsl:when>
>                 <xsl:otherwise>
>                                 i draw the same table  but without the border
> at the bottom
>                 </xsl:otherwise>
>     </xsl:choose>
> 
> well that's easy ; there is no problem there ; just the table is 
> consequent  and i have 8 table in pdf and don't want to duplicate the code.
> 
> anyway to do this in an better way ?
> and thanks

--------------------------------------------------------------------
Please consider the environment before printing this e-mail.

CONFIDENTIALITY STATEMENT: This communication (and  any and all information or material transmitted
with this communication) is confidential, may be privileged and is intended only for the use
of the intended recipient. If you are not the intended recipient, any review, retransmission,
circulation, distribution, reproduction, conversion to hard copy, copying or other use of
this communication, information or material is strictly prohibited and may be illegal. If
you received this communication in error or if it is forwarded to you without the express
authorization of New Flyer, please notify us immediately by telephone or by return email and
permanently delete the communication, information and material from any computer, disk drive,
diskette or other storage device or media. Thank you.


---------------------------------------------------------------------
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