sync/functions.ysl2
changeset 623 533a7fcc423b
child 1513 e7f7e42385b5
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/sync/functions.ysl2	Sun May 15 15:18:53 2016 +0200
     1.3 @@ -0,0 +1,12 @@
     1.4 +// function library
     1.5 +
     1.6 +def "func:distinctName" {
     1.7 +    param "nodes", "/..";
     1.8 +    choose {
     1.9 +        when "not($nodes)"
    1.10 +            result "/..";
    1.11 +        otherwise {
    1.12 +            result "$nodes[1] | func:distinctName($nodes[position() > 1])[@name != $nodes[1]/@name]";
    1.13 +        }
    1.14 +    }
    1.15 +}