source: WAeUP_SRP/trunk/profiles/default/types/types.xsl

Last change on this file was 3689, checked in by Henrik Bettermann, 16 years ago

New BASE and EXTENSION profiles

File size: 4.3 KB
Line 
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        <xsl:for-each select="object">
17          <h2>
18            <xsl:value-of select="@name"/>
19          </h2>
20        </xsl:for-each>
21        <h1>Properties</h1>
22        <table>
23          <xsl:for-each select="object/property">
24            <xsl:variable name="color">
25              <xsl:choose>
26                <xsl:when test="position() mod 2 = 0">
27                  <xsl:text>#ffffff</xsl:text>
28                </xsl:when>
29                <xsl:otherwise>
30                  <xsl:text>#eeeeee</xsl:text>
31                </xsl:otherwise>
32              </xsl:choose>
33            </xsl:variable>
34            <tr style="background-color:{$color}">
35              <td colspan="">
36                <xsl:value-of select="@name"/>
37              </td>
38              <td colspan="">
39                <xsl:value-of select="text()"/>
40              </td>
41              <td>
42                <xsl:for-each select="element">
43                  <xsl:value-of select="@value"/><br />
44                </xsl:for-each>
45              </td>
46            </tr>
47          </xsl:for-each>
48        </table>
49        <h1>Alias</h1>
50        <table>
51          <th>From</th><th>To</th>
52          <xsl:for-each select="object/alias">
53            <xsl:variable name="color">
54              <xsl:choose>
55                <xsl:when test="position() mod 2 = 0">
56                  <xsl:text>#ffffff</xsl:text>
57                </xsl:when>
58                <xsl:otherwise>
59                  <xsl:text>#eeeeee</xsl:text>
60                </xsl:otherwise>
61              </xsl:choose>
62            </xsl:variable>
63            <tr style="background-color:{$color}">
64              <td colspan="">
65                <xsl:value-of select="@from"/>
66              </td>
67              <td colspan="">
68                <xsl:value-of select="@to"/>
69              </td>
70            </tr>
71          </xsl:for-each>
72        </table>
73        <h1>Actions</h1>
74        <table>
75          <tr>
76            <th>Id</th>
77            <th>Title</th>
78            <th>Permission</th>
79            <th>Category</th>
80            <th>Visible</th>
81          </tr>
82          <xsl:for-each select="object/action">
83            <xsl:sort select="@action_id"
84                      order="ascending" />
85            <xsl:variable name="color">
86              <xsl:choose>
87                <xsl:when test="position() mod 2 = 0">
88                  <xsl:text>#ffffff</xsl:text>
89                </xsl:when>
90                <xsl:otherwise>
91                  <xsl:text>#eeeeee</xsl:text>
92                </xsl:otherwise>
93              </xsl:choose>
94            </xsl:variable>
95            <tr style="background-color:{$color}">
96              <td>
97                <xsl:value-of select="@action_id"/>
98              </td>
99              <td>
100                <xsl:value-of select="@title"/>
101              </td>
102              <td>
103                <xsl:for-each select="permission">
104                  <xsl:value-of select="@value"/>
105                </xsl:for-each>
106              </td>
107              <td>
108                <xsl:value-of select="@category"/>
109              </td>
110              <td>
111                <xsl:value-of select="@visible"/>
112              </td>
113              <xsl:for-each select="element">
114                <td>
115                  <xsl:value-of select="@value"/>
116                </td>
117              </xsl:for-each>
118            </tr>
119            <tr style="background-color:{$color}">
120              <th>url_expression</th>
121              <td colspan="4">
122                <xsl:value-of select="@url_expr"/>
123              </td>
124            </tr>
125            <tr style="background-color:{$color}">
126              <th>condition_expression</th>
127              <td colspan="4">
128                <xsl:value-of select="@condition_expr"/>
129              </td>
130            </tr>
131          </xsl:for-each>
132        </table>
133      </body>
134    </html>
135  </xsl:template>
136</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.