Apache2-AutoIndex-XSLT

 view release on metacpan or  search on metacpan

t/htdocs/index.xslt  view on Meta::CPAN

<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
	<xsl:output encoding="iso-8859-1" method="html" indent="yes" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"/>
	<xsl:variable name="mycomputer_root" select="'false'"/>
	<xsl:variable name="sortorder_href">
		<xsl:choose>
			<xsl:when test="/index/options/option[@name='O']/@value = 'D'"><xsl:text>A</xsl:text></xsl:when>
			<xsl:otherwise><xsl:text>D</xsl:text></xsl:otherwise>
		</xsl:choose>
	</xsl:variable>
	<xsl:variable name="sortorder">
		<xsl:choose>
			<xsl:when test="/index/options/option[@name='O']/@value = 'D'"><xsl:text>descending</xsl:text></xsl:when>
			<xsl:otherwise><xsl:text>ascending</xsl:text></xsl:otherwise>
		</xsl:choose>
	</xsl:variable>
	<xsl:variable name="sortnode">
		<xsl:choose>
			<xsl:when test="/index/options/option[@name='C']/@value = 'S'"><xsl:text>size</xsl:text></xsl:when>
			<xsl:when test="/index/options/option[@name='C']/@value = 'D'"><xsl:text>desc</xsl:text></xsl:when>
			<xsl:when test="/index/options/option[@name='C']/@value = 'M'"><xsl:text>mtime</xsl:text></xsl:when>
			<xsl:otherwise><xsl:text>title</xsl:text></xsl:otherwise>
		</xsl:choose>
	</xsl:variable>
	<xsl:template match="/">
		<html xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" xsl:version="2.0">
			<head>
				<title>
					<xsl:choose>
						<xsl:when test="/index/@path='/'">My Computer</xsl:when>
						<xsl:when test="/index/@path='/Logitech Webcam/'">My Computer: [Logitech Webcam]</xsl:when>
						<xsl:otherwise>
							<xsl:value-of select="substring(/index/@path,2)"/>
						</xsl:otherwise>
					</xsl:choose>
				</title>
				<meta name="robots" content="noarchive,nosnippet"/>
				<meta name="googlebot" content="noarchive,nosnippet"/>
				<meta name="author" content="Nicola Worthington, nicolaw@cpan.org"/>
				<link rel="icon" href="/favicon.ico" type="image/x-icon"/>
				<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon"/>
				<base>
					<xsl:attribute name="href"><xsl:value-of select="/index/@href"/></xsl:attribute>
				</base>
				<script type="text/javascript">
			// <![CDATA[
			function toggle(element) {
				if (element.style.display == 'none') {
					element.style.display = 'block';
				} else {
					element.style.display = 'none';
				}
			}
			// ]]></script>
				<style type="text/css">
			// <![CDATA[
			body {
				background-color: #ffffff;
				margin: 0px 0px 0px 0px;
			}
			table.dhIndex {
				font-family: Tahoma, sans-serif;
				font-size: 8pt;



( run in 0.931 second using v1.01-cache-2.11-cpan-39bf76dae61 )