1 | <?xml version="1.0" encoding="UTF-8"?> |
---|
2 | <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> |
---|
3 | <xsl:output method="html"/> |
---|
4 | <xsl:template match="/"> |
---|
5 | <html> |
---|
6 | <head> |
---|
7 | <title> |
---|
8 | <xsl:for-each select="object"> |
---|
9 | <xsl:value-of select="@name"/> |
---|
10 | </xsl:for-each> |
---|
11 | </title> |
---|
12 | <link rel="stylesheet" type="text/css" media="all" |
---|
13 | href="../../xsl.css" /> |
---|
14 | </head> |
---|
15 | <body> |
---|
16 | <table> |
---|
17 | <xsl:for-each select="cps-workflow"> |
---|
18 | <tr> |
---|
19 | <th>Title</th> |
---|
20 | <td> |
---|
21 | <xsl:value-of select="@title"/> |
---|
22 | </td> |
---|
23 | </tr> |
---|
24 | <tr> |
---|
25 | <th>Workflow Id</th> |
---|
26 | <td> |
---|
27 | <xsl:value-of select="@workflow_id"/> |
---|
28 | </td> |
---|
29 | </tr> |
---|
30 | <tr> |
---|
31 | <th>State Variable</th> |
---|
32 | <td> |
---|
33 | <xsl:value-of select="@state_variable"/> |
---|
34 | </td> |
---|
35 | </tr> |
---|
36 | <tr> |
---|
37 | <th>Meta Type</th> |
---|
38 | <td> |
---|
39 | <xsl:value-of select="@meta_type"/> |
---|
40 | </td> |
---|
41 | </tr> |
---|
42 | </xsl:for-each> |
---|
43 | </table> |
---|
44 | <h2>Managed Permissions</h2> |
---|
45 | <table> |
---|
46 | <xsl:for-each select="cps-workflow/permission"> |
---|
47 | <xsl:variable name="color"> |
---|
48 | <xsl:choose> |
---|
49 | <xsl:when test="position() mod 2 = 0"> |
---|
50 | <xsl:text>#ffffff</xsl:text> |
---|
51 | </xsl:when> |
---|
52 | <xsl:otherwise> |
---|
53 | <xsl:text>#eeeeee</xsl:text> |
---|
54 | </xsl:otherwise> |
---|
55 | </xsl:choose> |
---|
56 | </xsl:variable> |
---|
57 | <tr style="background-color:{$color}"> |
---|
58 | <td colspan=""> |
---|
59 | <xsl:value-of select="text()"/> |
---|
60 | </td> |
---|
61 | </tr> |
---|
62 | </xsl:for-each> |
---|
63 | </table> |
---|
64 | <h2>States</h2> |
---|
65 | <xsl:for-each select="cps-workflow/state"> |
---|
66 | <xsl:variable name="color"> |
---|
67 | <xsl:choose> |
---|
68 | <xsl:when test="position() mod 2 = 0"> |
---|
69 | <xsl:text>#ffffff</xsl:text> |
---|
70 | </xsl:when> |
---|
71 | <xsl:otherwise> |
---|
72 | <xsl:text>#eeeeee</xsl:text> |
---|
73 | </xsl:otherwise> |
---|
74 | </xsl:choose> |
---|
75 | </xsl:variable> |
---|
76 | <h3><xsl:value-of select="@state_id"/> <xsl:value-of select="@title"/></h3> |
---|
77 | <table> |
---|
78 | <tr style="background-color:{$color}"> |
---|
79 | <th> |
---|
80 | Exit Transitions |
---|
81 | </th> |
---|
82 | <td colspan="2"> |
---|
83 | <xsl:for-each select="exit-transition"> |
---|
84 | <xsl:value-of select="@transition_id"/><br /> |
---|
85 | </xsl:for-each> |
---|
86 | </td> |
---|
87 | </tr> |
---|
88 | <tr style="background-color:{$color}"> |
---|
89 | <th> |
---|
90 | Permission Map |
---|
91 | </th> |
---|
92 | <th> |
---|
93 | Acquired |
---|
94 | </th> |
---|
95 | <th> |
---|
96 | Permission Roles |
---|
97 | </th> |
---|
98 | </tr> |
---|
99 | <xsl:for-each select="permission-map"> |
---|
100 | <tr style="background-color:{$color}"> |
---|
101 | <td> |
---|
102 | <xsl:value-of select="@name"/> |
---|
103 | </td> |
---|
104 | <td> |
---|
105 | <xsl:value-of select="@acquired"/> |
---|
106 | </td> |
---|
107 | <td> |
---|
108 | <xsl:for-each select="permission-role"> |
---|
109 | <xsl:value-of select="text()"/><br /> |
---|
110 | </xsl:for-each> |
---|
111 | </td> |
---|
112 | </tr> |
---|
113 | </xsl:for-each> |
---|
114 | </table> |
---|
115 | </xsl:for-each> |
---|
116 | <h2>Transitions</h2> |
---|
117 | <xsl:for-each select="cps-workflow/transition"> |
---|
118 | <xsl:variable name="color"> |
---|
119 | <xsl:choose> |
---|
120 | <xsl:when test="position() mod 2 = 0"> |
---|
121 | <xsl:text>#ffffff</xsl:text> |
---|
122 | </xsl:when> |
---|
123 | <xsl:otherwise> |
---|
124 | <xsl:text>#eeeeee</xsl:text> |
---|
125 | </xsl:otherwise> |
---|
126 | </xsl:choose> |
---|
127 | </xsl:variable> |
---|
128 | <h3>Id: <xsl:value-of select="@transition_id"/> Title: <xsl:value-of select="@title"/></h3> |
---|
129 | <h3>New State: <xsl:value-of select="@new_state"/> Trigger: <xsl:value-of select="@trigger"/> </h3> |
---|
130 | <table> |
---|
131 | <xsl:for-each select="action"> |
---|
132 | <tr style="background-color:{$color}"> |
---|
133 | <td colspan="2"> |
---|
134 | <strong>Action URL:</strong> <xsl:value-of select="@url"/> |
---|
135 | </td> |
---|
136 | <td colspan="1"> |
---|
137 | <strong>Category:</strong> <xsl:value-of select="@category"/> |
---|
138 | </td> |
---|
139 | <td colspan="1"> |
---|
140 | <strong>Box:</strong> <xsl:value-of select="text()"/> |
---|
141 | </td> |
---|
142 | </tr> |
---|
143 | </xsl:for-each> |
---|
144 | <tr style="background-color:{$color}"> |
---|
145 | <td colspan="2"> |
---|
146 | <strong>B Script:</strong> <xsl:value-of select="@before_script"/> |
---|
147 | </td> |
---|
148 | <td colspan="2"> |
---|
149 | <strong>A Script:</strong> <xsl:value-of select="@after_script"/> |
---|
150 | </td> |
---|
151 | </tr> |
---|
152 | <tr style="background-color:{$color}"> |
---|
153 | <th colspan="2"> |
---|
154 | Transition Flags |
---|
155 | </th> |
---|
156 | <td colspan="2"> |
---|
157 | <xsl:for-each select="transition-behavior"> |
---|
158 | <xsl:value-of select="@behavior_id"/><br /> |
---|
159 | </xsl:for-each> |
---|
160 | </td> |
---|
161 | </tr> |
---|
162 | <tr style="background-color:{$color}"> |
---|
163 | <th> |
---|
164 | Guard: Roles |
---|
165 | </th> |
---|
166 | <th> |
---|
167 | Groups |
---|
168 | </th> |
---|
169 | <th> |
---|
170 | Permissions |
---|
171 | </th> |
---|
172 | <th> |
---|
173 | Expression |
---|
174 | </th> |
---|
175 | </tr> |
---|
176 | <tr style="background-color:{$color}"> |
---|
177 | <td> |
---|
178 | <xsl:for-each select="guard/guard-role"> |
---|
179 | <xsl:value-of select="text()"/><br /> |
---|
180 | </xsl:for-each> |
---|
181 | </td> |
---|
182 | <td> |
---|
183 | <xsl:for-each select="guard/guard-group"> |
---|
184 | <xsl:value-of select="text()"/><br /> |
---|
185 | </xsl:for-each> |
---|
186 | </td> |
---|
187 | <td> |
---|
188 | <xsl:for-each select="guard/guard-permission"> |
---|
189 | <xsl:value-of select="text()"/><br /> |
---|
190 | </xsl:for-each> |
---|
191 | </td> |
---|
192 | <td> |
---|
193 | <xsl:for-each select="guard/guard-expression"> |
---|
194 | <xsl:value-of select="text()"/><br /> |
---|
195 | </xsl:for-each> |
---|
196 | </td> |
---|
197 | </tr> |
---|
198 | </table> |
---|
199 | </xsl:for-each> |
---|
200 | </body> |
---|
201 | </html> |
---|
202 | </xsl:template> |
---|
203 | </xsl:stylesheet> |
---|