p≡p engine
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
352 B

  1. // This file is under GNU General Public License 3.0
  2. // see LICENSE.txt
  3. // function library
  4. def "func:distinctName" {
  5. param "nodes", "/..";
  6. choose {
  7. when "not($nodes)"
  8. result "/..";
  9. otherwise {
  10. result "$nodes[1] | func:distinctName($nodes[position() > 1])[@name != $nodes[1]/@name]";
  11. }
  12. }
  13. }