|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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> <my ate>2004-10-05</my ate><my:Heading>Heading one</my:Heading> </my:CPEFeature> <my:CPEFeature> <my ate>2004-09-29</my ate><my:Heading>heading two</my:Heading> </my:CPEFeature> <my:CPEFeature> <my ate>2004-10-01</my ate><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/my ate, 6, 2) = 10"><xsl:sort select="my:CPEFeature/my ate" 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/my ate, 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 ![]() |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > XML Programming > xsl:for each to select node filtered on date not working!! |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|