0

I am learning xsl and I have some questions about variables. If I have a variable These would load the $Rows variable with some rows based on the conditions... However I would like to create a new variable from $Rows called $newRows just with rows where column @States are equal to "Florida." Is that possible and how should I do that. I thought about creating a variable and populate it using a for-each loop like: Is this possible and if is how can I populate the values into the new variable. Thank you

1
  • These are the code I couldn't add to the previous question<xsl:variable name="Rows" select="../Rows/Row/some condition"/> <xsl:variable name="newRows> <xsl:for-each select="$Rows"> <xsl:value-of ....../> </xsl:for-each> Commented Jul 17, 2015 at 11:22

1 Answer 1

1

As long as the condition can be expressed as an XPath predicate I suggest to simply use <xsl:variable name="filteredRows" select="$Rows[@States = 'Florida']"/>.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.