File: page.xsl

package info (click to toggle)
lirc 0.10.1-6
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 8,364 kB
  • sloc: ansic: 26,717; cpp: 9,066; sh: 5,521; python: 4,362; makefile: 1,034; xml: 63
file content (70 lines) | stat: -rw-r--r-- 1,997 bytes parent folder | download | duplicates (3)
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
<xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

  <!-- Default: copy everything. -->
  <xsl:template match="node()|@*">
      <xsl:copy>
        <xsl:apply-templates/>
      </xsl:copy>
  </xsl:template>

  <!-- When copying <a>, include attributes. -->
  <xsl:template match="a">
    <a>
      <xsl:copy-of select="@*|b/@*" />
      <xsl:apply-templates />
    </a>
  </xsl:template>

  <!-- When copying <th>, include attributes. -->
  <xsl:template match="th">
    <th>
      <xsl:copy-of select="@*|b/@*" />
      <xsl:apply-templates />
    </th>
  </xsl:template>

  <!-- Wrap text in the root of <body> in <p> tags. -->
  <xsl:template match="body/text()[string-length(current()) > 10]" >
    <p><xsl:copy/></p>
  </xsl:template>

  <!-- Main layout: top menu, the generated page and a footer. -->
  <xsl:template match="body">
    <body>
      <TABLE CLASS="menu">
        <TR>
          <TD CLASS="menu">
            <IMG class="menuimg"
             SRC="../images/diode.gif" ALT="LIRC icon" ALIGN="LEFT"/>
           </TD>
           <TD>
            <IMG class="menuimg"
             SRC="../images/lirc.gif" ALT="LIRC logo" ALIGN="RIGHT"/>
          </TD>
        </TR>
      </TABLE>
      <xsl:apply-templates/>
      <p class="footer">
        [<A HREF="http://www.lirc.org/">LIRC homepage</A>]
      </p>
    </body>
  </xsl:template>

  <!-- Top level: Use fixed <head>, insert the rest as <body>. -->
  <xsl:template match="/html">
    <html>
      <HEAD>
        <TITLE>LIRC - Linux Infrared Remote Control</TITLE>
        <LINK REL="stylesheet" TYPE="text/css" HREF="lirc.css"/>
        <LINK REL="shortcut icon" HREF="../images/favicon.ico"/>
        <META NAME="description"
              CONTENT="LIRC - Linux Infrared Remote Control"/>
        <META NAME="keywords" CONTENT="linux remote control, multimedia"/>
        <META charset="UTF-8"/>
      </HEAD>
      <xsl:apply-templates/>
    </html>
  </xsl:template>

</xsl:stylesheet>