Re: empty cells in a row in a table - how can I hide them

On Mon, May 05 2008 00:03:02 +0100, jean.stachler@crown.com wrote:
...
> - <row>
>   <column1>2</column1> 
>   <column2>2</column2> 
>   <column3>ea</column3> 
>   <column4>VFD for trolley panel so we can have a two speed control for up
> and down travel.</column4> 
>   <column5>2/23/2007</column5> 
>   <column6>1650</column6> 
>   <column7>3300</column7> 
>   <column8>Unknown</column8> 
>   </row>
> - <row>
>   <column1 /> 
>   <column2 /> 
>   <column3 /> 
>   <column4 /> 
>   <column5 /> 
>   <column6>0.0</column6> 
>   <column7>0.0</column7> 
>   <column8 /> 
>   </row>

...
>           <fo:table-body> 
>               <xsl:for-each select="header/row">        

The thing to do is use a predicate so you only process the <row>
elements that have useful content.

There's many ways to do that.  I don't know what would make the most
sense to someone who understood the meaning of the data.  You can try:

   <xsl:for-each select="header/row[column1 != '']">

or:

   <xsl:for-each select="header/row[column1/text()]">

or:

   <xsl:for-each select="header/row[column6 != 0]">

Regards,


Tony Graham                         Tony.Graham@MenteithConsulting.com
Director                                  W3C XSL FO SG Invited Expert
Menteith Consulting Ltd
XML, XSL and XSLT consulting, programming and training
Registered Office: 13 Kelly's Bay Beach, Skerries, Co. Dublin, Ireland
Registered in Ireland - No. 428599   http://www.menteithconsulting.com
  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --
xmlroff XSL Formatter                               http://xmlroff.org
xslide Emacs mode                  http://www.menteith.com/wiki/xslide
Unicode: A Primer                               urn:isbn:0-7645-4625-2

Received on Sunday, 4 May 2008 23:41:18 UTC