source: WAeUP_SRP/uniben/profiles/default/layouts/layout.xsl @ 3221

Last change on this file since 3221 was 1417, checked in by joachim, 18 years ago

Edit student_study course added
verdicts vocabulary added
new levels are only created, when no level there,
allow loggin for returning students, which have been created with add_student

  • Property svn:executable set to *
File size: 3.6 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:value-of select="object/name"/>
9        </title>
10        <link rel="stylesheet" type="text/css" media="all"
11              href="../xsl.css" />     
12      </head>
13      <body>
14        <xsl:for-each select="object">
15          <h1>Layout: <xsl:value-of select="@name"/></h1>
16        </xsl:for-each>
17        <h1>Layout</h1>
18        <table>
19          <xsl:for-each select="object/table/row">
20            <xsl:variable name="color">
21              <xsl:choose>
22                <xsl:when test="position() mod 2 = 0">
23                  <xsl:text>#ffffff</xsl:text>
24                </xsl:when>
25                <xsl:otherwise>
26                  <xsl:text>#eeeeee</xsl:text>
27                </xsl:otherwise>
28              </xsl:choose>
29            </xsl:variable>
30            <tr style="background-color:{$color}">
31              <xsl:for-each select="cell">
32              <td>
33                <xsl:value-of select="@name"/>
34              </td>
35              </xsl:for-each>
36            </tr>
37          </xsl:for-each>
38        </table>
39        <h1>Properties</h1>
40        <table>
41          <tr>
42            <th>Id</th>
43            <th>Text</th>
44          </tr>
45          <xsl:for-each select="object/property">
46            <xsl:variable name="color">
47              <xsl:choose>
48                <xsl:when test="position() mod 2 = 0">
49                  <xsl:text>#ffffff</xsl:text>
50                </xsl:when>
51                <xsl:otherwise>
52                  <xsl:text>#eeeeee</xsl:text>
53                </xsl:otherwise>
54              </xsl:choose>
55            </xsl:variable>
56            <tr style="background-color:{$color}">
57              <td>
58                <xsl:value-of select="@name"/>
59              </td>
60              <td>
61                <xsl:value-of select="text()"/>
62              </td>
63            </tr>
64          </xsl:for-each>
65        </table>
66        <h1>Widgets</h1>
67        <xsl:for-each select="object/widget">
68          <xsl:variable name="color">
69            <xsl:choose>
70              <xsl:when test="position() mod 2 = 0">
71                <xsl:text>#ffffff</xsl:text>
72              </xsl:when>
73              <xsl:otherwise>
74                <xsl:text>#eeeeee</xsl:text>
75              </xsl:otherwise>
76            </xsl:choose>
77          </xsl:variable>
78          <h3><xsl:value-of select="@name"/> Meta Type: <xsl:value-of select="@meta_type"/></h3>
79          <table>
80            <tr style="background-color:{$color}">
81              <th colspan="3">
82                Properties:
83              </th>
84            </tr>
85            <xsl:for-each select="property">
86              <tr style="background-color:{$color}">
87                <th>
88                  <xsl:value-of select="@name"/>
89                </th>
90                <td>
91                  <xsl:choose>
92                    <xsl:when test="@name='vocabulary'">
93                      <a href="../vocabularies/{text()}.xml"><xsl:value-of select="text()"/></a>
94                    </xsl:when>
95                    <xsl:otherwise>
96                      <xsl:value-of select="text()"/>
97                    </xsl:otherwise>
98                  </xsl:choose>
99                </td>
100                <td>
101                  <xsl:for-each select="element">
102                    <xsl:value-of select="@value"/>
103                  </xsl:for-each>
104                </td>
105              </tr>
106            </xsl:for-each>
107          </table>
108        </xsl:for-each>
109      </body>
110    </html>
111  </xsl:template>
112</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.