Hello all,
I'm having a problem with XSL:Sort. I've parameterized it (and use
javascript to populate the parameters, but that part is working fine)..
<xsl:sort select="*[name() = $sort_project_col]" />
The problem is that sometimes $sort_project_col is the name of a child
element (that works fine), but sometimes it is also the name of an
attribute of the current node (an ID tag, for example)..
<project id="i2421">
<foo>bar</foo>
</project>
sorting by "foo" would work, however sorting by "@id" wouldn't. I know
why (the sort expression is evaluating child nodes not grandchild nodes
or attributes or anything else), but I cant figure out a way around it.
I've tried replacing the entire expression like so...
<xsl:sort select="{$sort_project_col}" />
and then setting the parameter to be = *[name() = 'foo']" for when I
want to sort by foo, and then have it = "@id" when I want to sort by
ID, but it doesnt work.
Any suggestions? Thanks.
-Anthony