|
Subject: Re: [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:31:54 -0000 |
Stainless !
|exists( filter( $words, function($s) { starts-with($sentence, $s) } ) ) |
Christophe
Le 20/11/2025 \xE0 07:20, Christophe Marchand cmarchand@xxxxxxxxxxxxxx a
\xE9crit :
> 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<String> words = ... ; String sentence = ... ; return
> words.stream().anyMatch(w -> sentence.startsWith(w)); |
>
> But with XPath / xslt C"BB& ?
>
> |<xsl:variable name="words" as="xs:string"
> select="..."/> <xsl:variable name="snetence"
> as="xs:string" select="..."/> <xsl:sequence
> select="... ? ..." /> |
>
> Thanks in advance,
> Christophe
>
> ​
> XSL-List info and archive <http://www.mulberrytech.com/xsl/xsl-list>
> EasyUnsubscribe <http://lists.mulberrytech.com/unsub/xsl-list/3515434>
> (by email <>)
​
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| [xsl] Finding the right entry in a , Christophe Marchand | Thread | [xsl] "Removing XSLT for a more sec, Craig Cothren dacrac |
| [xsl] Finding the right entry in a , Christophe Marchand | Date | [xsl] "Removing XSLT for a more sec, Craig Cothren dacrac |
| Month |