Subject: Re: [xsl] Get the duplicates in a list From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Fri, 3 Jan 2025 11:04:45 -0000 |
Hi Folks,'DIR', 'TYPE')
$fieldnames is a list of strings, e.g.,
('TYPE', 'USAGE_CD', 'DIR', 'WGS_LAT', 'TYPE', 'WGS_LONG', 'TURN_DIR',
$fieldnames?
I want a list of the duplicates in $fieldnames:
('TYPE', 'DIR') <-- I don't want any duplicates in this list
Is there a simple XPath expression to obtain the list of duplicates in
B let $fieldnames := ('TYPE', 'USAGE_CD', 'DIR', 'WGS_LAT', 'TYPE', 'WGS_LONG', 'TURN_DIR', 'DIR', 'TYPE'), B B B $fieldnamesMap := map:merge($fieldnames!map:entry(., 1), map { 'duplicates' : 'combine' }) return map:for-each($fieldnamesMap, function($k, $v) { if ($v[2]) then $k else ()})
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Get the duplicates in a list, Roger L Costello cos | Thread | Re: [xsl] Get the duplicates in a l, Liam R. E. Quin liam |
[xsl] Get the duplicates in a list, Roger L Costello cos | Date | Re: [xsl] Get the duplicates in a l, Liam R. E. Quin liam |
Month |