cancel
Showing results for 
Search instead for 
Did you mean: 

XSLT Mapping

Former Member
0 Kudos

Hi All,

I am using the function "distinct-values" of field in xslt. where as the function "distinct-values" is not supporting in PI xslt processor.

Any inputs are welocme to acheive the unique values without the function "distinct-values".

Thanks in advance,

sabitha.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Thanks Horia Ciochina the issue has solved.

Former Member
0 Kudos

Hi Sabitha,

Try using the Key functionality in xslt to extract unique values.

Regards

Newa

Former Member
0 Kudos

Can you please post the sample code how to use the key functionality.

Former Member
0 Kudos

hi

first define the key outside of the templates:

match - path to the segment

use - the field name


<xsl:key name="key" match="/File/XXX/YY" use="ZZZ"/>

then for the selection


<xsl:for-each select="/File/XXX/YY[generate-id()=generate-id(key('key',ZZZ))]">
</xsl:for-each