Subject: Re: [xsl] Duplicates in a sequence ? From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Wed, 25 Mar 2015 11:23:58 -0000 |
I have a sequence and want to know whether there are duplicate values in it.
I came out with the following and think there must be an easy solution. Any suggestion?
let $sequence :=(1,12,14,17,22,12) return (count(distinct-values($sequence)) ne count($sequence))
<xsl:function name="functx:are-distinct-values" as="xs:boolean" xmlns:functx="http://www.functx.com"> <xsl:param name="seq" as="xs:anyAtomicType*"/>
<xsl:sequence select=" count(distinct-values($seq)) = count($seq) "/>
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Duplicates in a sequence ?, Leo Studer leo.stude | Thread | Re: [xsl] Duplicates in a sequence , Leo Studer leo.stude |
[xsl] Duplicates in a sequence ?, Leo Studer leo.stude | Date | Re: [xsl] Duplicates in a sequence , Michael Kay mike@xxx |
Month |