xsl-list
[Top] [All Lists]

Re: Sorting with partial string

2006-01-28 00:40:02
On 1/28/06, Tim Lebo <timleboxslt(_at_)gmail(_dot_)com> wrote:
Would this break with:

<list>
<cmd>pianoman</cmd>
<cmd>no pianoman</cmd>
</list>

i.e. the non-no component contains a substring "no"

No -- the best way is to try it.

Were more than one space allowed in the string (that is more than two
words), then the following sort key would still produce the correct
sort result:

<xsl:sort select=
           "substring(.,1+3*starts-with(.,'no '))"/>



--
Cheers,
Dimitre Novatchev
---------------------------------------
To avoid situations in which you might make mistakes may be the
biggest mistake of all.

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>