source: subversion/svnindex.xsl

Last change on this file was 34451, checked in by gslater, 4 months ago

Update deprecated notice

File size: 3.8 KB
Line 
1<?xml version="1.0"?>
2<!--
3
4 Licensed to the Apache Software Foundation (ASF) under one
5 or more contributor license agreements.  See the NOTICE file
6 distributed with this work for additional information
7 regarding copyright ownership.  The ASF licenses this file
8 to you under the Apache License, Version 2.0 (the
9 "License"); you may not use this file except in compliance
10 with the License.  You may obtain a copy of the License at
11
12   http://www.apache.org/licenses/LICENSE-2.0
13
14 Unless required by applicable law or agreed to in writing,
15 software distributed under the License is distributed on an
16 "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 KIND, either express or implied.  See the License for the
18 specific language governing permissions and limitations
19 under the License.
20
21-->
22
23
24<!-- A sample XML transformation style sheet for displaying the Subversion
25  directory listing that is generated by mod_dav_svn when the "SVNIndexXSLT"
26  directive is used. -->
27<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
28
29  <xsl:output method="html"/>
30
31  <xsl:template match="*"/>
32
33  <xsl:template match="svn">
34    <html>
35      <head>
36        <title>
37          <xsl:if test="string-length(index/@name) != 0">
38            <xsl:value-of select="index/@name"/>
39            <xsl:text>: </xsl:text>
40          </xsl:if>
41          <xsl:value-of select="index/@path"/>
42        </title>
43        <link rel="stylesheet" type="text/css" href="/svnindex.css"/>
44      </head>
45      <body>
46        <div class="svnnotice">
47          NOTICE: Please note that this OpenStreetMap svn repo is deprecated and many items have now moved to repositories under the <a href="https://github.com/OpenStreetMap">github.com/OpenStreetMap</a> project.
48        </div>
49        <div class="svn">
50          <xsl:apply-templates/>
51        </div>
52        <div class="footer">
53          <xsl:text>Powered by </xsl:text>
54          <xsl:element name="a">
55            <xsl:attribute name="href">
56              <xsl:value-of select="@href"/>
57            </xsl:attribute>
58            <xsl:text>Subversion</xsl:text>
59          </xsl:element>
60          <xsl:text> </xsl:text>
61          <xsl:value-of select="@version"/>
62        </div>
63      </body>
64    </html>
65  </xsl:template>
66
67  <xsl:template match="index">
68    <div class="rev">
69      <xsl:value-of select="@name"/>
70      <xsl:if test="@base">
71        <xsl:if test="@name">
72          <xsl:text>:&#xA0; </xsl:text>
73        </xsl:if>
74        <xsl:value-of select="@base" />
75      </xsl:if>
76      <xsl:if test="@rev">
77        <xsl:if test="@base | @name">
78          <xsl:text> &#x2014; </xsl:text>
79        </xsl:if>
80        <xsl:text>Revision </xsl:text>
81        <xsl:value-of select="@rev"/>
82      </xsl:if>
83    </div>
84    <div class="path">
85      <xsl:value-of select="@path"/>
86    </div>
87    <xsl:apply-templates select="updir"/>
88    <xsl:apply-templates select="dir"/>
89    <xsl:apply-templates select="file"/>
90  </xsl:template>
91
92  <xsl:template match="updir">
93    <div class="updir">
94      <xsl:text>[</xsl:text>
95      <xsl:element name="a">
96        <xsl:attribute name="href">..</xsl:attribute>
97        <xsl:text>Parent Directory</xsl:text>
98      </xsl:element>
99      <xsl:text>]</xsl:text>
100    </div>
101  </xsl:template>
102
103  <xsl:template match="dir">
104    <div class="dir">
105      <xsl:element name="a">
106        <xsl:attribute name="href">
107          <xsl:value-of select="@href"/>
108        </xsl:attribute>
109        <xsl:value-of select="@name"/>
110        <xsl:text>/</xsl:text>
111      </xsl:element>
112    </div>
113  </xsl:template>
114
115  <xsl:template match="file">
116    <div class="file">
117      <xsl:element name="a">
118        <xsl:attribute name="href">
119          <xsl:value-of select="@href"/>
120        </xsl:attribute>
121        <xsl:value-of select="@name"/>
122      </xsl:element>
123    </div>
124  </xsl:template>
125
126</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.