|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
xslt: can you use the AND operator in a <xsl:for-each select... statement??
Hi,
My XML document is as follows: <CPEFeatureList> <CPEFeature> <Date>2004-10-05</Date> <Heading>Winning the hearts and minds of the consumer!</Heading> <XMLDoc>WinningHearts.xml</XMLDoc> <Category>Effective Engagement</Category> </CPEFeature> . . . <CPEFeatureList> I want to order the xml document by Category type (i.e.: Category). And then I want to only display those articles that have been inserted in the current month. Here is a section from my xslt. It is not working. Can anyone give me help on this please? <xsl:template match="CPEFeatureList"> <xsl:for-each select="CPEFeature[Category = 'Effective Engagement' AND number(substring(Date, 6, 2)) = 10]"> <xsl:sort select="Date" order="descending" /> The error I get is: Expected token ']' found 'NAME' CPEFeature[Category = 'Effective Engagement' -->AND<-- number(substring(Date, 6, 2)) = 10] Any suggestions are much appreciated! |
|
#2
|
|||
|
|||
|
Have you tried lower case 'and' ?
if so, what are you using to perform the transformation? |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > XML Programming > xslt: can you use the AND operator in a <xsl:for-each select... statement?? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|