Can I Do This? As In VS2010 Its Being Highlighted As Invalid Syntax?
I want to be able to add a condition sort after a select depending on a Querystring value? But if I put an <xsl:if> or <xsl:choose> after the select it gets highlighted as invalid with the 'red death worms' under my syntax??
Yeah, it doesn't work because the sort has to be DIRECTLY after the for-each. The xsl:choose interferes with that. You should set some variables with the chosen sorting options first. I'll post an example in a minute.
Can I Do This? As In VS2010 Its Being Highlighted As Invalid Syntax?
I want to be able to add a condition sort after a select depending on a Querystring value? But if I put an <xsl:if> or <xsl:choose> after the select it gets highlighted as invalid with the 'red death worms' under my syntax??
Yeah, it doesn't work because the sort has to be DIRECTLY after the for-each. The xsl:choose interferes with that. You should set some variables with the chosen sorting options first. I'll post an example in a minute.
Here's your code rewritten, something like this should work:
Then, after the </xsl:template> item add a new template:
Actually, you probably don't need the seperate template, just put the for-each instead of the call-template bit. :)
is working on a reply...