File: notification.xsl

package info (click to toggle)
lemonldap-ng 1.3.3-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 13,084 kB
  • ctags: 2,440
  • sloc: perl: 25,708; makefile: 622; sh: 176; php: 6; sql: 5
file content (42 lines) | stat: -rw-r--r-- 1,789 bytes parent folder | download | duplicates (2)
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
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:output method="html"
		encoding="UTF-8"/>
	<xsl:param name="start"/>
	<xsl:template match="/root/notification">
		<xsl:variable name="level" select="position()"/>
		<xsl:element name="input">
			<xsl:attribute name="type">hidden</xsl:attribute>
			<xsl:attribute name="name">reference<xsl:value-of select="$start"/>x<xsl:value-of select="$level"/></xsl:attribute>
			<xsl:attribute name="value"><xsl:value-of select="@reference"/></xsl:attribute>
		</xsl:element>
		<xsl:apply-templates/>
		<xsl:for-each select="check">
			<xsl:variable name="sublevel" select="position()"/>
			<p class="notifCheck">
				<xsl:element name="input">
					<xsl:attribute name="type">checkbox</xsl:attribute>
					<xsl:attribute name="name">check<xsl:value-of select="$start"/>x<xsl:value-of select="$level"/>x<xsl:value-of select="$sublevel"/></xsl:attribute>
					<xsl:attribute name="id">check<xsl:value-of select="$start"/>x<xsl:value-of select="$level"/>x<xsl:value-of select="$sublevel"/></xsl:attribute>
				</xsl:element>
				<xsl:element name="label">
					<xsl:attribute name="for">check<xsl:value-of select="$start"/>x<xsl:value-of select="$level"/>x<xsl:value-of select="$sublevel"/></xsl:attribute>
					<xsl:value-of select="."/>
				</xsl:element>
			</p>
		</xsl:for-each>
	</xsl:template>
	<xsl:template match="title">
		<h2 class="notifText"><xsl:value-of select="."/></h2> 
	</xsl:template>
	<xsl:template match="subtitle">
		<h3 class="notifText"><xsl:value-of select="."/></h3>
	</xsl:template>
	<xsl:template match="text">
		<p class="notifText"><xsl:value-of select="."/></p>
	</xsl:template>
	<xsl:template match="check">
	</xsl:template>
</xsl:stylesheet>