sync/functions.ysl2
author Krista Bennett <krista@pep-project.org>
Fri, 03 Nov 2017 13:32:38 +0100
changeset 2271 25bfd109320c
child 2287 026ab4dae779
permissions -rw-r--r--
SYNC HAS RETURNED. Keysync still removed from Engine.
krista@2271
     1
// This file is under GNU General Public License 3.0
krista@2271
     2
// see LICENSE.txt
krista@2271
     3
krista@2271
     4
// function library
krista@2271
     5
krista@2271
     6
def "func:distinctName" {
krista@2271
     7
    param "nodes", "/..";
krista@2271
     8
    choose {
krista@2271
     9
        when "not($nodes)"
krista@2271
    10
            result "/..";
krista@2271
    11
        otherwise {
krista@2271
    12
            result "$nodes[1] | func:distinctName($nodes[position() > 1])[@name != $nodes[1]/@name]";
krista@2271
    13
        }
krista@2271
    14
    }
krista@2271
    15
}