[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Logical in Count function
> From: Tham Tinh [mailto:khautinh@xxxxxxxxx] > > I still have anohter question how to use logical and, > or in Count function. I wrote > <p>Employee Count: <xsl:value-of > select="count(/dsWMSRpt/WMSReport[Person_x0020_Name!='Vacancy'] > and /dsWMSRpt/WMSReport[Person_x0020_Name!=''])"/></p> > > and I got an error. Am I wrong to use logical and in > it? Please correct for me. You just have your "and" operator in the wrong place. You cannot use "and" or "or" in a path expression, but that would not be what you want here anyway. Instead, you probably want count(/dsWMSRpt/WMSReport[Person_x0020_Name!='Vacancy' and Person_x0020_Name!=''] You might want to use normalize-space(Person_x0020_Name) (without the !='', which wouldn't be necessary), in case a name element happens to contain only whitespace. Cheers, Tom P
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|