sync/functions.ysl2
author Krista Grothoff <krista@pep-project.org>
Tue, 13 Dec 2016 14:54:00 +0100
branchENGINE-152
changeset 1483 65bf8eef6d70
parent 623 533a7fcc423b
child 1513 e7f7e42385b5
permissions -rw-r--r--
ENGINE-152 ENGINE-153 ENGINE-74 ENGINE-118: commits held in ENGINE-152 until Patrick gives the OK. REQUIRES UPDATE TO LIBETPAN.
vb@623
     1
// function library
vb@623
     2
vb@623
     3
def "func:distinctName" {
vb@623
     4
    param "nodes", "/..";
vb@623
     5
    choose {
vb@623
     6
        when "not($nodes)"
vb@623
     7
            result "/..";
vb@623
     8
        otherwise {
vb@623
     9
            result "$nodes[1] | func:distinctName($nodes[position() > 1])[@name != $nodes[1]/@name]";
vb@623
    10
        }
vb@623
    11
    }
vb@623
    12
}