I need to flip the elements of two nodes. Originally the variable were set with the following command:
<xsl:variable name="matchesLeft" select="$questionObject/descendant::simpleMatchSet[position()=1]/simpleAssociableChoice"/>
<xsl:variable name="matchesRight" select="$questionObject/descendant::simpleMatchSet[position()=2]/simpleAssociableChoice"/>
I now want to flip the variable with the following code:
<xsl:variable name="matchesRight">
<xsl:choose>
<xsl:when test="$flippedQuestions='true'">
<xsl:value-of select="$questionObject/descendant::simpleMatchSet[position()=2]/simpleAssociableChoice"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$questionObject/descendant::simpleMatchSet[position()=1]/simpleAssociableChoice"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
But it only get the value from the first element and not all elements in the node. How can I achive this?