1.1 --- a/examples/Common/Configurator/Resources/config_dav.xsl Fri Sep 30 22:53:43 2005 +0000
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,81 +0,0 @@
1.4 -<?xml version="1.0" encoding="utf-8"?>
1.5 -<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
1.6 - xmlns:D="DAV:"
1.7 - version="1.0">
1.8 -
1.9 - <xsl:param name="path"/>
1.10 - <xsl:param name="start"/>
1.11 -
1.12 - <xsl:template match="database">
1.13 - <D:multistatus>
1.14 - <xsl:choose>
1.15 - <!-- Specified part of the database. -->
1.16 - <xsl:when test="$start != ''">
1.17 - <!-- Emit the container. -->
1.18 - <xsl:call-template name="resource">
1.19 - <xsl:with-param name="element" select="//*[local-name() = $start][1]"/>
1.20 - <xsl:with-param name="container">true</xsl:with-param>
1.21 - </xsl:call-template>
1.22 - <!-- Emit all resources. -->
1.23 - <xsl:for-each select="//*[local-name() = $start]/*">
1.24 - <xsl:call-template name="resource">
1.25 - <xsl:with-param name="element" select="."/>
1.26 - </xsl:call-template>
1.27 - </xsl:for-each>
1.28 - </xsl:when>
1.29 - <!-- Top level. -->
1.30 - <xsl:otherwise>
1.31 - <!-- Emit the container. -->
1.32 - <xsl:call-template name="resource">
1.33 - <xsl:with-param name="element" select="."/>
1.34 - <xsl:with-param name="container">true</xsl:with-param>
1.35 - </xsl:call-template>
1.36 - <!-- Emit all resources. -->
1.37 - <xsl:for-each select="*">
1.38 - <xsl:call-template name="resource">
1.39 - <xsl:with-param name="element" select="."/>
1.40 - </xsl:call-template>
1.41 - </xsl:for-each>
1.42 - </xsl:otherwise>
1.43 - </xsl:choose>
1.44 - </D:multistatus>
1.45 - </xsl:template>
1.46 -
1.47 - <xsl:template name="resource">
1.48 - <xsl:param name="element"/>
1.49 - <xsl:param name="container"/>
1.50 - <D:response>
1.51 - <xsl:choose>
1.52 - <xsl:when test="$container != ''">
1.53 - <D:href><xsl:value-of select="$path"/>/</D:href>
1.54 - </xsl:when>
1.55 - <xsl:otherwise>
1.56 - <D:href><xsl:value-of select="$path"/>/<xsl:value-of select="local-name()"/><xsl:if test="count($element/*) != 0">/</xsl:if></D:href>
1.57 - </xsl:otherwise>
1.58 - </xsl:choose>
1.59 - <D:propstat>
1.60 - <D:prop>
1.61 - <D:creationdate>2004-10-13T23:57:00Z</D:creationdate>
1.62 - <xsl:choose>
1.63 - <xsl:when test="$container != ''">
1.64 - <D:displayname><xsl:value-of select="$path"/></D:displayname>
1.65 - </xsl:when>
1.66 - <xsl:otherwise>
1.67 - <D:displayname><xsl:value-of select="local-name()"/></D:displayname>
1.68 - </xsl:otherwise>
1.69 - </xsl:choose>
1.70 - <D:resourcetype>
1.71 - <xsl:if test="count($element/*) != 0">
1.72 - <D:collection/>
1.73 - </xsl:if>
1.74 - </D:resourcetype>
1.75 - <xsl:if test="count($element/*) = 0">
1.76 - <D:getcontenttype>text/html</D:getcontenttype>
1.77 - </xsl:if>
1.78 - </D:prop>
1.79 - <D:status>HTTP/1.1 200 OK</D:status>
1.80 - </D:propstat>
1.81 - </D:response>
1.82 - </xsl:template>
1.83 -
1.84 -</xsl:stylesheet>