easier sync
authorVolker Birk <vb@pep-project.org>
Thu, 06 Jun 2019 13:26:12 +0200
branchsync
changeset 38134bcd6925d88c
parent 3812 a77bbd89af6b
child 3814 79f71c45472b
easier
sync/gen_dot.ysl2
     1.1 --- a/sync/gen_dot.ysl2	Thu Jun 06 13:06:54 2019 +0200
     1.2 +++ b/sync/gen_dot.ysl2	Thu Jun 06 13:26:12 2019 +0200
     1.3 @@ -14,29 +14,11 @@
     1.4          End;
     1.5          node [shape = circle];
     1.6  
     1.7 -        `` apply "state" mode=do
     1.8 +        `` apply "descendant::transition";
     1.9      }
    1.10      ||
    1.11  
    1.12 -    template "state", mode=do apply "event", 0 with "state", "@name";
    1.13 -
    1.14 -    template "event" {
    1.15 -        param "state";
    1.16 -        choose {
    1.17 -            when "count(descendant::transition) > 0"
    1.18 -                apply "descendant::transition", 0
    1.19 -                    with "state", "$state", with "event", "@name";
    1.20 -            otherwise
    1.21 -                if "@name != 'Init'"
    1.22 -                    | «$state» -> «$state» [ label="«@name»" ];
    1.23 -        }
    1.24 -    }
    1.25 -
    1.26 -    template "transition" {
    1.27 -        param "state";
    1.28 -        param "event";
    1.29 -
    1.30 -        | «$state» -> «@target» [ label ="«$event»" ];
    1.31 -    }
    1.32 +    template "transition"
    1.33 +        | «ancestor::state/@name» -> «@target» [ label="«ancestor::event/@name»" ];
    1.34  }
    1.35