Altova Mailing List Archives>Archive Index >xsl-list Archive Home >Recent entries >Thread Prev - [xsl] count() function [Thread Next] Re: [xsl] count() functionTo: Date: 4/2/2004 7:39:00 AM Maybe <xsl:varible name="countletter" select="count(title[starts-with($alph, text())])"/> -- Raffaele ----- Original Message ----- From: "james walker" <jameswalkerandy@xxxxxxxxxxx> To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx> Sent: Friday, April 02, 2004 2:11 AM Subject: [xsl] count() function > I am using a count function to count th enumber of <title> tgas in an xml > file which contain a certain starting letter. > e.g. $alph = 'A' > <xsl:variable name="countletter" select="count(number of titles with a > starting letter of a)"/> > <xsl:if test="($countletter > 0)"> > <p><xsl:value-of select="$alph"/></p> > </xsl:if> > > How would i write the test case for the xsl:if? > would u do some sort of string comparison like not(starts-with($countletter, > '0'))?? > > i can't use keys as the xml is coming from multiple files. > cheers > james > > _________________________________________________________________ > Use MSN Messenger to send music and pics to your friends > http://www.msn.co.uk/messenger | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
