XML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreXML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 13th, 2004, 07:31 AM
1ei1a 1ei1a is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Posts: 32 1ei1a User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 28 m 13 sec
Reputation Power: 5
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!

Reply With Quote
  #2  
Old October 15th, 2004, 11:42 AM
jkmyoung jkmyoung is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Sep 2004
Posts: 505 jkmyoung User rank is Sergeant Major (2000 - 5000 Reputation Level)jkmyoung User rank is Sergeant Major (2000 - 5000 Reputation Level)jkmyoung User rank is Sergeant Major (2000 - 5000 Reputation Level)jkmyoung User rank is Sergeant Major (2000 - 5000 Reputation Level)jkmyoung User rank is Sergeant Major (2000 - 5000 Reputation Level)jkmyoung User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 3 Days 5 h 22 m 19 sec
Reputation Power: 53
Have you tried lower case 'and' ?

if so, what are you using to perform the transformation?

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreXML Programming > xslt: can you use the AND operator in a <xsl:for-each select... statement??


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT