both of which are properties of the doctype I am pulling. I'm trying to set the sort type when I place my macro so I do not have to create different macros based on what output I am creating.
I've seen forums that answer that the code below is the correct way to do this, but it isn't working for me. I'm guessing the reason is because I am using the new syntax.
Dynamic Sort Using Variables
I am trying to use xsl:sort in the new syntax. Does anybody know why this does not work?
I would REALLY like to be able to use, the code below, but I'm not sure it is possible.
I am setting the variables earlier in the xslt.
Thanks!
Kaifish,
Can you tell us more about what you want to order? How are you retrieving your data?
Example
It's fairly complex. Here is a simplistic version.
Can you tr, and tell me what is the output....it should be Sorting by latest date created
<xsl:sort select="@createDate" order="descending" />
It is - I can place the text I want to pass into the sort and it will work the way it needs to.
Ex.
or
both of which are properties of the doctype I am pulling. I'm trying to set the sort type when I place my macro so I do not have to create different macros based on what output I am creating.
I've seen forums that answer that the code below is the correct way to do this, but it isn't working for me. I'm guessing the reason is because I am using the new syntax.
Might be worth noting that below works:
but when attempting to put, what would logically make sense, I get an error for this:
Error (though not that descriptive):
Here is the answer for anybody else having the issue. You have to use multiple sort lines. This really works like an if statement. Ex.
Thanks a lot!
It was driving me crazy ;-)
is working on a reply...