1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144
| 1 <?xml version="1.0" encoding="UTF-8"?>
2 <xsl:stylesheet id="style_txt"
3 version="1.5"
4 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
5 xmlns:fo="http://www.w3.org/1999/XSL/Format">
6
7 <xsl:output
8 method="txt"
9 encoding="UTF-8"
10 doctype-system="http://www.w3.org/TR/html4/strict.dtd"
11 indent="yes" />
12
13 <xsl:template match="namespace">
14
15 /**
16 * ++ Namespace ++ <xsl:value-of select="@identity" />
17 */
18 namespace <xsl:value-of select="@identity" />
19
20 <xsl:apply-templates select="class" />
21
22 </xsl:template>
23
24 <xsl:template match="class">
25 /**
26 * __Requirement:__
27 */
28 <xsl:apply-templates select="usage" />
29
30 /**
31 * Oject: <xsl:value-of select="@identity">
32 */
33 <xsl:apply-templates select="visibility"> <xsl:apply-templates select="declaration"> <xsl:value-of select="@identity"> : <xsl:apply-templates select="heritance">
34 {
35 <xsl:apply-templates select="class_attribute">
36 <xsl:apply-templates select="intance_attribute">
37 <xsl:apply-templates select="property">
38 <xsl:apply-templates select="signal">
39 <xsl:apply-templates select="methode">
40 }
41 </xsl:template>
42
43 <xsl:template match="interfaces">
44 /**
45 * Interface: <xsl:value-of select="@identity">
46 */
47 <xsl:apply-templates select="visibility"> <xsl:apply-templates select="declaration"> <xsl:value-of select="@identity"> : <xsl:apply-templates select="heritance">
48 {
49 <xsl:apply-templates select="class_attribute">
50 <xsl:apply-templates select="intance_attribute">
51 <xsl:apply-templates select="property">
52 <xsl:apply-templates select="signal">
53 <xsl:apply-templates select="methode">
54 }
55 </xsl:template>
56
57 <xsl:template match="usage">
58 /**
59 * * <xsl:value-of select=".">
60 */
61 usage <xsl:value-of select=".">;
62 </xsl:template>
63
64 <xsl:template match="class_attribute">
65 /**
66 * Class Attribute: <xsl:value-of select="@identity">
67 */
68 <xsl:apply-templates select="visibility"> <xsl:apply-templates select="declaration"> <xsl:value-of select="@identity">;
69 </xsl:template>
70
71 <xsl:template match="instance_attribute">
72 /**
73 * Instance Attribute: <xsl:value-of select="@identity">
74 */
75 <xsl:apply-templates select="visibility"> <xsl:apply-templates select="declaration"> <xsl:value-of select="@identity">;
76 </xsl:template>
77
78 <xsl:template match="property">
79 /**
80 * Property: <xsl:value-of select="@identity">
81 */
82 <xsl:apply-templates select="declaration"> <xsl:value-of select="@identity">
83 {
84 <xsl:apply-templates select="get">
85 <xsl:apply-templates select="constructor">
86 }
87 </xsl:template>
88
89 <xsl:template match="signal">
90 /**
91 * Signal: <xsl:value-of select="@identity">
92 */
93 <xsl:apply-templates select="visibility"> <xsl:apply-templates select="declaration"> <xsl:value-of select="@identity">();
94 </xsl:template>
95
96 <xsl:template match="methode">
97 /**
98 * Methode: <xsl:value-of select="@identity">
99 * Parameter: <xsl:apply-templates select="parameter">
100 * Base :
101 */
102 <xsl:apply-templates select="visibility"> <xsl:apply-templates select="declaration"> <xsl:value-of select="@identity">( <xsl:apply-templates select="parameter"> ) <xsl:apply-templates select="base">
103 {
104 <xsl:apply-templates select="code">
105 }
106 </xsl:template>
107
108 <xsl:template match="visibility">
109 <xsl:value-of select=".">
110 </xsl:template>
111
112 <xsl:template match="declaration">
113 <xsl:value-of select=".">
114 </xsl:template>
115
116 <xsl:template match="heritance">
117 <xsl:value-of select=".">
118 </xsl:template>
119
120 <xsl:template match="value">
121 <xsl:value-of select=".">
122 </xsl:template>
123
124 <xsl:template match="get">
125 get { <xsl:value-of select="."> }
126 </xsl:template>
127
128 <xsl:template match="constructor">
129 construct { <xsl:value-of select="."> }
130 </xsl:template>
131
132 <xsl:template match="parameter">
133 <xsl:value-of select=".">
134 </xsl:template>
135
136 <xsl:template match="base">
137 base : ( <xsl:apply-templates select="parameter"> )
138 </xsl:template>
139
140 <xsl:template match="code">
141 <xsl:value-of select=".">
142 </xsl:template>
143
144 </xsl:stylesheet> |
Partager