[xsl] Finding the right entry in a sequence that matches...

Subject: [xsl] Finding the right entry in a sequence that matches...
From: "Christophe Marchand cmarchand@xxxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 20 Nov 2025 06:20:34 -0000
Hello !

a long time without XML work, IC"BBm a little bit rusty and need help !

I have a sequence that contains words, and another that contains a 
sentence. I want to know if there one word that starts the sentenceC"BB&

In Java, that would be :

|List&lt;String&gt; words = ... ; String sentence = ... ; return 
words.stream().anyMatch(w -&gt; sentence.startsWith(w)); |

But with XPath / xslt C"BB& ?

|&lt;xsl:variable name=&quot;words&quot; as=&quot;xs:string&quot; 
select=&quot;...&quot;/&gt; &lt;xsl:variable name=&quot;snetence&quot; 
as=&quot;xs:string&quot; select=&quot;...&quot;/&gt; &lt;xsl:sequence 
select=&quot;... ? ...&quot; /&gt; |

Thanks in advance,
Christophe

&#8203;

Current Thread