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 5th, 2004, 08:17 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
Unhappy xsl:for each to select node filtered on date not working!!

HELP!!!

I have an xml document as follows:

<my:CPEFeatureList xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2004-10-05T08:47:35" xml:lang="en-us">
<my:CPEFeature>
<myate>2004-10-05</myate>
<my:Heading>Heading one</my:Heading>
</my:CPEFeature>
<my:CPEFeature>
<myate>2004-09-29</myate>
<my:Heading>heading two</my:Heading>
</my:CPEFeature>
<my:CPEFeature>
<myate>2004-10-01</myate>
<my:Heading>heading three</my:Heading>
</my:CPEFeature>
</my:CPEFeatureList>

I want my XSLT to loop through the xml file, order by date, and then only select the nodes that have a date within the current month. So for example, in the sample xml doc above, two nodes would be selected and sorted by date because they were inserted in the current month.

My XSLT looks like this:

.
.
.
<xsl:template match="my:CPEFeatureList">
<table>
<tr>
<td><img src="/images/1ptrans.gif" height="10px" width="1px" /></td>
</tr>
<xsl:for-each select="substring(my:CPEFeature/myate, 6, 2) = 10">
<xsl:sort select="my:CPEFeature/myate" order="descending" />
.
.
.

The above line gives this error:
Error: expected token EOF found =

When changing the line to:
<xsl:for-each select="substring(my:CPEFeature/myate, 6, 2 = 10)">, the error is:
Expression does not return a DOM node

I just want to use the xsl:for-each select... element to filter my nodes! How can I accomplish this??

Many thanks for any suggestions!

Leila

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreXML Programming > xsl:for each to select node filtered on date not working!!


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