1 <?xml version="1.0"?>
\r
3 <!-- A sample XML transformation style sheet for displaying the Subversion
\r
4 directory listing that is generated by mod_dav_svn when the "SVNIndexXSLT"
\r
5 directive is used. -->
\r
6 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
\r
8 <xsl:output method="html"/>
\r
10 <xsl:template match="*"/>
\r
12 <xsl:template match="svn">
\r
16 <xsl:if test="string-length(index/@name) != 0">
\r
17 <xsl:value-of select="index/@name"/>
\r
18 <xsl:text>: </xsl:text>
\r
20 <xsl:value-of select="index/@path"/>
\r
22 <link rel="stylesheet" type="text/css" href="/svnindex.css"/>
\r
23 <script type="text/javascript">
\r
24 function onLoadHandler(){
\r
25 for(var i = 0; i < document.links.length; i++){
\r
26 if(document.links[i].target == 'tsvn'){
\r
27 document.links[i].href = 'tsvn:' + document.links[i].href;
\r
33 <body onload="onLoadHandler()">
\r
35 <xsl:apply-templates/>
\r
37 <div class="footer">
\r
38 <xsl:element name="a">
\r
39 <xsl:attribute name="style">float: right;</xsl:attribute>
\r
40 <xsl:attribute name="href">
\r
41 http://tortoisesvn.net
\r
43 <xsl:text>TortoiseSVN</xsl:text>
\r
46 <xsl:text>Powered by </xsl:text>
\r
47 <xsl:element name="a">
\r
48 <xsl:attribute name="href">
\r
49 <xsl:value-of select="@href"/>
\r
51 <xsl:text>Subversion</xsl:text>
\r
53 <xsl:text> </xsl:text>
\r
54 <xsl:value-of select="@version"/>
\r
60 <xsl:template match="index">
\r
62 <xsl:if test="string-length(@name) != 0">
\r
63 <xsl:value-of select="@name"/>
\r
64 <xsl:if test="string-length(@rev) != 0">
\r
65 <xsl:text> — </xsl:text>
\r
68 <xsl:if test="string-length(@rev) != 0">
\r
69 <xsl:text>Revision </xsl:text>
\r
70 <xsl:value-of select="@rev"/>
\r
74 <xsl:value-of select="@path"/>
\r
76 <xsl:apply-templates select="updir"/>
\r
77 <xsl:apply-templates select="dir"/>
\r
78 <xsl:apply-templates select="file"/>
\r
81 <xsl:template match="updir">
\r
83 <xsl:text>[</xsl:text>
\r
84 <xsl:element name="a">
\r
85 <xsl:attribute name="href">..</xsl:attribute>
\r
86 <xsl:text>Parent Directory</xsl:text>
\r
88 <xsl:text>]</xsl:text>
\r
90 <!-- xsl:apply-templates/ -->
\r
93 <xsl:template match="dir">
\r
95 <xsl:element name="a">
\r
96 <xsl:attribute name="title">Checkout: <xsl:value-of select="@href"/></xsl:attribute>
\r
97 <xsl:attribute name="style">float: right;</xsl:attribute>
\r
98 <xsl:attribute name="target">tsvn</xsl:attribute>
\r
99 <xsl:attribute name="href">
\r
100 <xsl:value-of select="@href"/>
\r
102 <img src="/menucheckout.ico"/>
\r
104 <xsl:element name="a">
\r
105 <xsl:attribute name="style">margin-right: 22px</xsl:attribute>
\r
106 <xsl:attribute name="href">
\r
107 <xsl:value-of select="@href"/>
\r
109 <xsl:value-of select="@name"/>
\r
110 <xsl:text>/</xsl:text>
\r
113 <!-- <xsl:apply-templates/ -->
\r
116 <xsl:template match="file">
\r
118 <xsl:element name="a">
\r
119 <xsl:attribute name="href">
\r
120 <xsl:value-of select="@href"/>
\r
122 <xsl:value-of select="@name"/>
\r
125 <!-- xsl:apply-templates/ -->
\r