I (like Claus? :-) often have problems using/understanding restrictions when choosing nodes, and I tend to end up doing a 'for-each' with an 'if' instead to get the diseried nodes. I alwasy have a feeling, that it could have been made much simpler with restrictions, like in your example, so a Wiki explaning the syntax and some good example would help a lot of people i think :-) So hoping someone would take the time to write one...
a bit of syntax help
Hi
i have a variable:
<xsl:variable name="numberOfRecords" select="count($currentPage/node)"/>
But i would like it to test and only count the nodes where "date" is greater than Currentdate. Like:
(umbraco.library:FormatDateTime(data[@alias='date'],'yyyyMMdd') >= umbraco.library:FormatDateTime(umbraco.library:CurrentDate(),'yyyyMMdd'))
How do i combine the two into one?
Hi Claushingebjerg,
You're pretty close, just add the restriction as in:
Hope this helps.
Regards,
/Dirk
Hi Dirk and other xslt-wizards,
I (like Claus? :-) often have problems using/understanding restrictions when choosing nodes, and I tend to end up doing a 'for-each' with an 'if' instead to get the diseried nodes. I alwasy have a feeling, that it could have been made much simpler with restrictions, like in your example, so a Wiki explaning the syntax and some good example would help a lot of people i think :-) So hoping someone would take the time to write one...
Thanks in advance!
Cheers, horsted
is working on a reply...