This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: Sort problem


The sorting order should be:

word (alphabetical order), pageID, lineID, wordID

but ignoring the fact whether a word start with an upper-case letter or not.
Another example - if I have the following (in the order the words should
appear):

cat, 1, 1, 1
Cat, 1, 1, 2
cat, 1, 1, 3
Dog, 1, 2, 1
dog, 1, 2, 2

the list is ordered by <word> first, and then by <pageID>, <lineID> and
<wordID>. Sorting with <xsl:sort select="."/> on the <word> element gives
me:

cat, 1, 1, 1
cat, 1, 1, 3
Cat, 1, 1, 2
dog, 1, 2, 2
Dog, 1, 2, 1

and puts lower-case letters before upper-case, which is not what I want. Any
ideas again?

-mick



original message:
You have 4 characteristics for each item:
pageID,lineID,wordID and the word itself.

You need to define specifically what sorting you need.
Is it primary by word, secondary by wordID?
I supposed you needed sorting by : (pageID,lineID,wordID) in this exact
order of priority.
If you define for yourself the sorting priority list, the solution should be
very simple.

Eyal.





 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]