sync/functions.ysl2
author Hernâni Marques <hernani@pep.foundation>
Wed, 27 Jun 2018 00:52:09 +0200
changeset 2771 b0c0d39f643d
parent 2287 026ab4dae779
child 2829 e444c3c960bb
permissions -rw-r--r--
typos (by reading for IETF)
     1 // This file is under GNU General Public License 3.0
     2 // see LICENSE.txt
     3 
     4 // function library
     5 
     6 def "func:distinctName" {
     7     param "nodes", "/..";
     8     choose {
     9         when "not($nodes)"
    10             result "/..";
    11         otherwise {
    12             result "$nodes[1] | func:distinctName($nodes[position() > 1])[@name != $nodes[1]/@name]";
    13         }
    14     }
    15 }