[Bps-public-commit] r16268 - in Pushmi/trunk: .
alexmv at bestpractical.com
alexmv at bestpractical.com
Fri Oct 10 12:44:29 EDT 2008
Author: alexmv
Date: Fri Oct 10 12:44:28 2008
New Revision: 16268
Added:
Pushmi/trunk/Pushmi-Admin/etc/pushmi.xsl
Modified:
Pushmi/trunk/ (props changed)
Log:
r38087 at kohr-ah: chmrr | 2008-10-10 12:42:52 -0400
* Include XML -> HTML XSLT
Added: Pushmi/trunk/Pushmi-Admin/etc/pushmi.xsl
==============================================================================
--- (empty file)
+++ Pushmi/trunk/Pushmi-Admin/etc/pushmi.xsl Fri Oct 10 12:44:28 2008
@@ -0,0 +1,88 @@
+<?xml version="1.0"?>
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+ <xsl:output method="html"/>
+
+ <xsl:template match="*"/>
+
+ <xsl:template match="svn">
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+ <head title="Pushmi mirror">
+ <meta content="text/html; charset=utf-8" http-equiv="content-type" />
+ <meta content="all" name="robots" />
+ <title>
+ <xsl:text>Pushmi mirror</xsl:text>
+ <xsl:if test="string-length(index/@name) != 0">
+ <xsl:text> of </xsl:text>
+ <xsl:value-of select="index/@name"/>
+ </xsl:if>
+ <xsl:text>: </xsl:text>
+ <xsl:value-of select="index/@path"/>
+ </title>
+ <link rel="stylesheet" type="text/css" href="/pushmi.css" />
+ </head>
+ <body>
+ <div id="content">
+ <div id="svn" class="roundbox">
+ <xsl:apply-templates/>
+ </div>
+ </div>
+ </body>
+ </html>
+ </xsl:template>
+
+ <xsl:template match="index">
+ <div class="rev">
+ <xsl:if test="string-length(@name) != 0">
+ <xsl:value-of select="@name"/>
+ <xsl:if test="string-length(@rev) != 0">
+ <xsl:text> — </xsl:text>
+ </xsl:if>
+ </xsl:if>
+ <xsl:if test="string-length(@rev) != 0">
+ <xsl:text>Revision </xsl:text>
+ <xsl:value-of select="@rev"/>
+ </xsl:if>
+ </div>
+ <div class="path">
+ <xsl:value-of select="@path"/>
+ </div>
+ <xsl:apply-templates select="updir"/>
+ <xsl:apply-templates select="dir"/>
+ <xsl:apply-templates select="file"/>
+ </xsl:template>
+
+ <xsl:template match="updir">
+ <div class="updir">
+ <xsl:element name="a">
+ <xsl:attribute name="href">..</xsl:attribute>
+ <xsl:text>..</xsl:text>
+ </xsl:element>
+ </div>
+ </xsl:template>
+
+ <xsl:template match="dir">
+ <div class="dir">
+ <xsl:element name="a">
+ <xsl:attribute name="href">
+ <xsl:value-of select="@href"/>
+ </xsl:attribute>
+ <xsl:value-of select="@name"/>
+ <xsl:text>/</xsl:text>
+ </xsl:element>
+ </div>
+ </xsl:template>
+
+ <xsl:template match="file">
+ <div class="file">
+ <xsl:element name="a">
+ <xsl:attribute name="href">
+ <xsl:value-of select="@href"/>
+ </xsl:attribute>
+ <xsl:value-of select="@name"/>
+ </xsl:element>
+ </div>
+ </xsl:template>
+
+</xsl:stylesheet>
More information about the Bps-public-commit
mailing list