equal
deleted
inserted
replaced
|
1 include yslt.yml2 |
|
2 |
|
3 decl UML is textstylesheet( |
|
4 xmlns:uml="http://schema.omg.org/spec/UML/2.1", |
|
5 xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" |
|
6 ) { |
|
7 output *output; |
|
8 const "space", !"'" + " " * 200 + "'"!; |
|
9 param "autoindent", 4; |
|
10 template "text()"; |
|
11 content; |
|
12 }; |
|
13 |
|
14 decl Root is template(match="/xmi:XMI/uml:Model/packagedElement"), |
|
15 All is template(%match="*", match="//[%match]"); |
|
16 |
|
17 decl Package is template( |
|
18 %match="true()", |
|
19 match="packagedElement[@xmi:type='uml:Package' and (%match)]" |
|
20 ); |
|
21 |
|
22 decl applyPackages is apply ( |
|
23 %match="true()", |
|
24 select="packagedElement[@xmi:type='uml:Package' and (%match)]" |
|
25 ); |
|
26 |
|
27 decl Class is template( |
|
28 %match="true()", |
|
29 match="packagedElement[@xmi:type='uml:Class' and (%match)]" |
|
30 ); |
|
31 |
|
32 decl applyClasses is apply ( |
|
33 %match="true()", |
|
34 select="packagedElement[@xmi:type='uml:Class' and (%match)]" |
|
35 ); |
|
36 |
|
37 decl Attribute is template( |
|
38 %match="true()", |
|
39 match="ownedAttribute[@xmi:type='uml:Property' and type/@xmi:type='uml:PrimitiveType' and (%match)]" |
|
40 ); |
|
41 |
|
42 decl applyAttributes is apply ( |
|
43 %match="true()", |
|
44 select="ownedAttribute[@xmi:type='uml:Property' and type/@xmi:type='uml:PrimitiveType' and (%match)]" |
|
45 ); |
|
46 |