Subject: Re: [xsl] conditional count From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Tue, 19 Oct 2004 20:01:20 +0300 |
I can filter out the empty "row"'s by challenging the contents of the entire element by: <xsl:value-of select="count(/root/row[normalize-space()])"/>
But how do I exclude an element "row" if just a single "column" in the element is empty?
count(/root/row[not(column[not(normalize-space())])]) "count rows without columns without space"
count(/root/row[not(count(column[not(normalize-space())]=1))]) "count rows without a single column without space"
<root> <row> <column>Peter</column> <column>Johnson</column> <column>High Street 10</column> <column>Male</column> <column>15-10-2004</column> <column>13.11</column> </row> <row> <column></column> <column></column> <column></column> <column></column> <column></column> <column></column> </row> <row> <column>Sue</column> <column>Bond</column> <column>Dollar Avenue</column> <column>Female</column> <column>01-05-2003</column> <column></column> </row> </root>
-- World-wide on-site corporate, govt. & user group XML/XSL training. G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995) Male Breast Cancer Awareness http://www.CraneSoftwrights.com/s/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] conditional count, Daniel Heskia | Thread | RE: [xsl] conditional count, Daniel Heskia |
Re: [xsl] Stripping or converting H, David Carlisle | Date | [xsl] EXSLT set:distinct, Richard Lewis |
Month |