p≡p engine fork for my own dirty testing of stuff
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.
 
 
 
 

44 lines
1.1 KiB

include yslt.yml2
tstylesheet {
template "/protocol" {
| protocol «@name»
apply "fsm" sort "@name";
}
template "fsm" {
| fsm «@name»
apply "state" sort "@name";
|
for "set:distinct(*/event/@name)" {
sort ".";
|> event «.»
}
|
for "set:distinct(descendant::action/@name)" {
sort ".";
|> action «.»
}
|
for "set:distinct(descendant::condition/@name)" {
sort ".";
|> condition «.»
}
|
apply "descendant::transition"
sort "ancestor::state/@name",
sort "@target",
sort "ancestor::event/@name";
|
apply "message" sort "@name";
|
for "set:distinct(message/field/@name)" {
sort ".";
|> field «.»
}
}
template "state" | state «@name»
template "transition"
| transition from «ancestor::state/@name» to «@target» on event «ancestor::event/@name»
template "message" | message «@name»
}