adding listing for documentation purposes sync
authorVolker Birk <vb@pep-project.org>
Sat, 08 Jun 2019 15:22:03 +0200
branchsync
changeset 3822f5b4744f11a6
parent 3821 46cc98d0f16b
child 3823 7cdc35fbef57
adding listing for documentation purposes
sync/gen_doc.yml2
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/sync/gen_doc.yml2	Sat Jun 08 15:22:03 2019 +0200
     1.3 @@ -0,0 +1,36 @@
     1.4 +include yslt.yml2
     1.5 +
     1.6 +tstylesheet {
     1.7 +    template "/protocol" {
     1.8 +        | protocol «@name»
     1.9 +        apply "fsm" sort "@name";
    1.10 +    }
    1.11 +    template "fsm" {
    1.12 +        | fsm «@name»
    1.13 +        apply "state" sort "@name";
    1.14 +        |
    1.15 +        for "set:distinct(*/event/@name)" {
    1.16 +            sort ".";
    1.17 +            |> event «.»
    1.18 +        }
    1.19 +        |
    1.20 +        for "set:distinct(descendant::action/@name)" {
    1.21 +            sort ".";
    1.22 +            |> action «.»
    1.23 +        }
    1.24 +        |
    1.25 +        for "set:distinct(descendant::condition/@name)" {
    1.26 +            sort ".";
    1.27 +            |> condition «.»
    1.28 +        }
    1.29 +        |
    1.30 +        apply "descendant::transition"
    1.31 +            sort "ancestor::state/@name",
    1.32 +            sort "@target",
    1.33 +            sort "ancestor::event/@name";
    1.34 +    }
    1.35 +    template "state" | state «@name»
    1.36 +    template "transition"
    1.37 +        | from «ancestor::state/@name» -> to «@target» on event «ancestor::event/@name»
    1.38 +}
    1.39 +