[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

More arbitrary sorting


Subject: More arbitrary sorting
From: Matthew Bentley <Matthew.bentley@xxxxxxxxxxxxxx>
Date: Mon, 7 Aug 2000 11:44:52 +1200

I have some data:
<item>MacBean</item>
<item>McBarlow</item>
<item>Re MacBart</item>
<item>Re McBeanie</item>

Which needs to be sorted and transformed as follows:
<item>McBarlow</item>
<item>Re McBart</item>
<item>MacBean</item>
<item>Re McBeanie</item>

In other words, 'Mc' must be equal to 'Mac', and the 'Re' gets placed on the
end of the text.

I have tried implementing this by generating a result-tree-fragment with an
attribute which contains the sortable text (Ie MacBeanie, Re), while keeping
the output text the same.
The problem with this is that its impossible, once the attribute text is
defined, to redefine it, hence how can you do multiple transforms on the
same data (To get it from 'Re McBeanie' -> 'McBeanie, Re' -> 'MacBeanie,
Re')?
This is a 'push' problem Ie I can't redefine the input data.

Thanks,
Matt Bentley
******************************************************************
Warning: This email, including any attachments, 
is for the use of the intended recipient(s) only.
Republication and redissemination, 
including posting to news groups or web pages, 
is strictly prohibited without the express prior consent of Brooker's Limited.
******************************************************************


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



Current Thread