Subject: Re: [xsl] comparing sequences that contain more than one of the same item From: Ronan Klyne <ronan.klyne@xxxxxxxxxxx> Date: Fri, 22 Feb 2008 14:15:28 +0000 |
A bit of a Friday challenge...
Is it possible to compare to sequences such that items in the sequence are consumed after the comparison?
For example, I want to compare two words to see if one is a subset of the other.
"farmer" and "frame"
If you do:
string-to-codepoints('farmer')[not(. = string-to-codepoints('frame'))]
the result is empty because the two r's in farmer are both being compared to the single r in frame.
Currently I've a got a recursive function that removes each letter after a match, but I'm wondering if there's a one-liner or some other set based approach?
thanks
-- Ronan Klyne Business Collaborator Developer Tel: +44 01189 028518 ronan.klyne@xxxxxxxxxxx www.groupbc.com
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] comparing sequences that , Robert Koberg | Thread | Re: [xsl] comparing sequences that , Andrew Welch |
Re: [xsl] comparing sequences that , Robert Koberg | Date | Re: [xsl] XPath Best Practice: Gett, Florent Georges |
Month |