2 templates fragments shared by all templates. This template expects
3 the following external variables:
5 cgi-program - path to the CGI executable, to place in links
6 stylesheet - path to the CSS stylesheet
8 the input XML must have the following structure, plus any elements
9 that are not common to all templates:
13 <element full-path=""></element>
20 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
21 <xsl:variable name="command">
22 <xsl:value-of select="$cgi-program"/>/<xsl:value-of select="/darcs/@target"/>
25 <xsl:variable name="repo" select="/darcs/@repository"/>
27 <xsl:template match="/darcs">
28 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
30 <title>darcs repository</title>
31 <link rel="stylesheet" href="{$stylesheet}"/>
32 <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="{$command}?c=rss" />
36 <xsl:apply-templates/>
38 <form action="{$command}" method="get">
40 <input class="patches" type="submit" name="c" value="patches"/>
42 <a href="{$command}?c=rss">rss</a>
44 <span class="version">
45 <a class="home" href="http://darcs.net/">darcs.cgi</a>
54 <xsl:template match="path/directory">
55 <xsl:variable name="full-path" select="@full-path"/>
57 <a href="{$cgi-program}{$full-path}?c=browse">
58 <xsl:apply-templates/>
62 <xsl:template match="path/file">
63 <xsl:apply-templates/>