Monday, March 22, 2010

XML Help

I'm very new to xml and xsl.



I'm trying to do something like this:



%26lt;xsl:choose%26gt;

%26lt;xsl:when test=''$cruiseSortCol = 'Itinerary'''%26gt;

%26lt;xsl:sort order=''{$cruiseSortDir}''
select=''substring-before(Itinerary,'-')''
data-type=''{$cruiseSortType}'' /%26gt;

%26lt;/xsl:when%26gt;

%26lt;xsl:otherwise%26gt;

%26lt;xsl:sort order=''{$cruiseSortDir}''
select=''*[name()=$cruiseSortCol]'' data-type=''{$cruiseSortType}''
/%26gt;

%26lt;/xsl:otherwise%26gt;

%26lt;/xsl:choose%26gt;



Basically, I have a dynamic sort that works with parameters
passed in, the problem is one of the columns is a string (ie.
7-day). I need to sort this column based on the number value
(substring-before(Itinerary,'-')) works on its own, but I need to
have different search criteria based on the column being passed in.



Any help would be appreciated.



Thanks,

vc

No comments:

Post a Comment