sync/functions.ysl2
author Krista Grothoff <krista@pep-project.org>
Mon, 13 Feb 2017 22:13:48 +0100
branchenigmail-color-tests
changeset 1582 7dd855780eef
parent 1513 e7f7e42385b5
child 2287 026ab4dae779
permissions -rw-r--r--
closing branch
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
}