Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Could someone explain what this statement would be testing please?
<xsl:if test="count($featuredArticles[@id=current()/@id])<=0">
Hi Steve,
It's a somewhat clumsy way of checking within a for-each loop, if the current node in the loop is present in the $featuredArticles selection. Probably because the original code was written (or conceived) in another language.
$featuredArticles
This should do the same:
<xsl:if test="$featuredArticles[@id=current()/@id]">
Or even as simple as:
<xsl:if test="@id = $featuredArticles/@id">
/Chriztian
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Quick XPath Explanation
Could someone explain what this statement would be testing please?
Hi Steve,
It's a somewhat clumsy way of checking within a for-each loop, if the current node in the loop is present in the
$featuredArticles
selection. Probably because the original code was written (or conceived) in another language.This should do the same:
Or even as simple as:
/Chriztian
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.