blob: 2d3297c4c9a5bbc75bb71463af7cd8b0558ca007 [file] [log] [blame]
Bernhard Reutner-Fischer54143af2008-12-18 00:44:58 +00001<?xml version="1.0"?>
2
3<!-- A sample XML transformation style sheet for displaying the Subversion
4 directory listing that is generated by mod_dav_svn when the "SVNIndexXSLT"
5 directive is used. -->
6<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
7
8 <xsl:output method="html"/>
9
10 <xsl:template match="*"/>
11
12 <xsl:template match="svn">
13 <html>
14 <head>
15 <title>
16 <xsl:if test="string-length(index/@name) != 0">
17 <xsl:value-of select="index/@name"/>
18 <xsl:text>: </xsl:text>
19 </xsl:if>
20 <xsl:value-of select="index/@path"/>
21 </title>
22 <link rel="stylesheet" type="text/css" href="/svnindex.css"/>
23 </head>
24 <body>
25 <div class="header" style="font-family: lucida, helvetica; font-size: 248%">
26 <xsl:text>BUSYBOX</xsl:text>
27 </div>
Denis Vlasenko3266aa92009-04-01 11:24:04 +000028 <div class="header">
29 <a href="http://www.busybox.net"><img src="/images/busybox1.png" border="0" /></a>
30 </div>
Bernhard Reutner-Fischer54143af2008-12-18 00:44:58 +000031 <div class="svn">
32 <xsl:apply-templates/>
33 </div>
34 <div class="footer">
35 <xsl:text>Powered by </xsl:text>
36 <xsl:element name="a">
37 <xsl:attribute name="href">
38 <xsl:value-of select="@href"/>
39 </xsl:attribute>
40 <xsl:text>Subversion</xsl:text>
41 </xsl:element>
42 <xsl:text> </xsl:text>
43 <xsl:value-of select="@version"/>
44 </div>
45 </body>
46 </html>
47 </xsl:template>
48
49 <xsl:template match="index">
50 <div class="rev">
51 <xsl:value-of select="@name"/>
52 <xsl:if test="@base">
53 <xsl:if test="@name">
54 <xsl:text>:&#xA0; </xsl:text>
55 </xsl:if>
56 <xsl:value-of select="@base" />
57 </xsl:if>
58 <xsl:if test="@rev">
59 <xsl:if test="@base | @name">
60 <xsl:text> &#x2014; </xsl:text>
61 </xsl:if>
62 <xsl:text>Revision </xsl:text>
63 <xsl:value-of select="@rev"/>
64 </xsl:if>
65 </div>
66 <div class="path">
67 <xsl:value-of select="@path"/>
68 </div>
69 <xsl:apply-templates select="updir"/>
70 <xsl:apply-templates select="dir"/>
71 <xsl:apply-templates select="file"/>
72 </xsl:template>
73
74 <xsl:template match="updir">
75 <div class="updir">
76 <xsl:text>[</xsl:text>
77 <xsl:element name="a">
78 <xsl:attribute name="href">..</xsl:attribute>
79 <xsl:text>Parent Directory</xsl:text>
80 </xsl:element>
81 <xsl:text>]</xsl:text>
82 </div>
83 </xsl:template>
84
85 <xsl:template match="dir">
86 <div class="dir">
87 <xsl:element name="a">
88 <xsl:attribute name="href">
89 <xsl:value-of select="@href"/>
90 </xsl:attribute>
91 <xsl:value-of select="@name"/>
92 <xsl:text>/</xsl:text>
93 </xsl:element>
94 </div>
95 </xsl:template>
96
97 <xsl:template match="file">
98 <div class="file">
99 <xsl:element name="a">
100 <xsl:attribute name="href">
101 <xsl:value-of select="@href"/>
102 </xsl:attribute>
103 <xsl:value-of select="@name"/>
104 </xsl:element>
105 </div>
106 </xsl:template>
107
108</xsl:stylesheet>