Project

Profile

Help

Bug #4399 » saxonissues3.xsl

Priscilla Walmsley, 2019-11-27 18:32

 
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:functx="http://www.functx.com" exclude-result-prefixes="#all" version="2.0">
<xsl:template match="/">
<out>
<xsl:sequence select="functx:non-distinct-values( (1,2,3,3))"/>
</out>
</xsl:template>
<xsl:function name="functx:non-distinct-values" as="xs:anyAtomicType*">
<xsl:param name="seq" as="xs:anyAtomicType*"/>
<xsl:sequence select="
for $val in distinct-values($seq)
return $val[count($seq[. = $val]) > 1]
"/>
</xsl:function>
</xsl:stylesheet>
(1-1/2)