Subject:Sort data-type problem Author:LZ Alex Date:05 Aug 2005 05:03 AM
Hi guys, I hope you can help me because I was looking deeply for
a solution but no one for the moment. (Sorry for my english).
Let's see: I have a XSL StyleSheet which receives 10 parameters
coming from 10 <SELECT> on a web page where the user select
one by one, the fields he want the data (table) to be sorted.
At the begining I added 10 <sort> tags to the <for-each> loop
which process the data. That's ok.
After that, I find the "data types" problem: text, number and date fields.
I solved the problem with TEXT and NUMBER fields because I have
in one XML the metadata about each field including its data type and
I put an adequate XPATH expression in the "data-type" of each "sort" tag.
My problem is that I have to detect the "date" fields at runtime
to put an apropiate <sort> tag on the form:
Subject:Sort data-type problem Author:Tony Lavinio Date:15 Aug 2005 11:28 AM
I don't really understand the question. But if the question is how
do you sort a date with one xsl:sort tag, then just use concat() to add
together the parts of the date in yyyymmdd format, then you can sort as
a string or a number.