sync/functions.ysl2
author Volker Birk <vb@pep.foundation>
Tue, 27 Dec 2016 21:13:41 +0100
changeset 1513 e7f7e42385b5
parent 623 533a7fcc423b
child 2287 026ab4dae779
permissions -rw-r--r--
adding license info to each file
vb@1513
     1
// This file is under GNU General Public License 3.0
vb@1513
     2
// see LICENSE.txt
vb@1513
     3
vb@623
     4
// function library
vb@623
     5
vb@623
     6
def "func:distinctName" {
vb@623
     7
    param "nodes", "/..";
vb@623
     8
    choose {
vb@623
     9
        when "not($nodes)"
vb@623
    10
            result "/..";
vb@623
    11
        otherwise {
vb@623
    12
            result "$nodes[1] | func:distinctName($nodes[position() > 1])[@name != $nodes[1]/@name]";
vb@623
    13
        }
vb@623
    14
    }
vb@623
    15
}