File: export-wiki.xsl

package info (click to toggle)
opensc 0.11.1-2etch2
  • links: PTS
  • area: main
  • in suites: etch
  • size: 7,284 kB
  • ctags: 7,257
  • sloc: ansic: 69,499; sh: 9,480; xml: 4,191; makefile: 346; lex: 92; perl: 25
file content (58 lines) | stat: -rw-r--r-- 1,498 bytes parent folder | download | duplicates (12)
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
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:html="http://www.w3.org/1999/xhtml">
	<xsl:output method="html" indent="yes"/>
  
  <xsl:template match="/">
    <xsl:apply-templates />
  </xsl:template>
  
  <xsl:template match="/html:html">
      <html>
        <head>
          <title><xsl:value-of select="/html:html/html:head/html:title" /></title>
          <style type="text/css">
           @import url(trac.css);
          </style>
        </head>
        <body>
          <xsl:apply-templates select="//html:div[@class='wikipage']" />
          <div class="footer">
            <hr />
            <p><a href="index.html">Back to Index</a></p>
          </div>
        </body>
      </html>
  </xsl:template>
  
  <xsl:template match="/pages">
      <html>
        <head>
          <title>Wiki Index</title>
          <style type="text/css">
           @import url(trac.css);
          </style>
        </head>
        <body>
          <h1>Index of Wiki Pages</h1>
          <ul>
          <xsl:apply-templates select="page" />
          </ul>
        </body>
      </html>
  </xsl:template>
  
  <xsl:template match="page">
    <li><a href="{.}.html"><xsl:value-of select="." /></a></li>
  </xsl:template>
  
  <xsl:template match="node()|@*" priority="-1">
    <xsl:copy>
      <xsl:apply-templates select="@*|node()"/>
    </xsl:copy>
  </xsl:template>
 
</xsl:stylesheet>