<commit_before><?xml version="1.0"?>
<!--
Repos Style (c) 2004-2007 <NAME> www.reposstyle.com

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

  ==== repos.se: Subversion directory listing layout ====
  The logic for this stylesheet, commandbar, id-generation,
  folderPathLinks and filetypes are all ideas from repos.se.
  
  To be set as SVNIndexXSLT in repository conf.
  Used at all directory levels, so urls must be absolute.
  Note that browser transformations only work if the
  stylesheet is read from the same domain as the XML
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0">
	<xsl:output method="html" encoding="UTF-8" omit-xml-declaration="no" indent="no"
		doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"/>
	<xsl:param name="reposstyle-version">@Dev@</xsl:param>
	
	<!-- === repos style configuration === -->
	<!-- static: absolute url to style application -->
	<xsl:param name="static">/repos/</xsl:param>
	<!-- cssUrl: absolute url to css folder -->
	<xsl:param name="cssUrl"><xsl:value-of select="$static"/>style/</xsl:param>
	<!-- logUrl: empty -> no log application, absolute url -> enable 'history' action -->
	<xsl:param name="logUrl"><xsl:value-of select="$static"/>open/log/</xsl:param>
	<!-- startpage: empty -> standard behaviour, absolute url -> special handling of 'up' from trunk -->
	<xsl:param name="startpage">/</xsl:param>
	<!-- ===== end of configuration ===== -->
	
	<xsl:param name="spacer" select="' &#160; '"/>
	<xsl:template match="/">
		<html xmlns="http://www.w3.org/1999/xhtml">
			<head>
				<title>
					<xsl:text>repos: </xsl:text>
					<xsl:value-of select="/svn/index/@path"/>
				</title>
				<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
				<meta name="robots" content="noarchive"/>
				<link rel="shortcut icon" href="/favicon.ico"/>
				<xsl:call-template name="styletag"/>
			</head>
			<body class="repository xml">
				<xsl:apply-templates select="svn"/>
			</body>
		</html>
	</xsl:template>
	<xsl:template name="styletag">
		<link rel="stylesheet" type="text/css" media="screen,projection" href="{$cssUrl}global.css"/>
		<link rel="stylesheet" type="text/css" media="screen,projection" href="{$cssUrl}repository/repository.css"/>
	</xsl:template>
	<xsl:template match="svn">
		<xsl:apply-templates select="index"/>
	</xsl:template>
	<xsl:template match="index">
		<div id="workspace">
			<xsl:call-template name="commandbar"/>
			<xsl:call-template name="contents"/>
			<xsl:call-template name="footer"/>
		</div>
	</xsl:template>
	<xsl:template name="commandbar">
		<xsl:param name="parentpath">
			<xsl:choose>
				<xsl:when test="'if parentpath is empty the up button will be disabled'='no'"></xsl:when>
				<xsl:when test="string-length($startpage)>0 and contains(/svn/index/@path,'/trunk') and substring-after(/svn/index/@path, '/trunk')=''">
					<xsl:value-of select="$startpage"/>
				</xsl:when>
				<xsl:otherwise>../</xsl:otherwise>
			</xsl:choose>
		</xsl:param>
		<div id="commandbar">
		<xsl:if test="/svn/index/updir">
			<xsl:if test="string-length($parentpath)>0">
				<a id="parent" class="command translate" href="{$parentpath}">up</a>
			</xsl:if>
			<xsl:if test="string-length($parentpath)=0">
				<span id="parent" class="command translate">up</span>
			</xsl:if>
		</xsl:if>
		<xsl:if test="$logUrl">
			<a id="history" class="command translate" href="{$logUrl}?target={/svn/index/@path}">folder history</a>
		</xsl:if>
		<a id="refresh" class="command translate" href="#" onclick="window.location.reload( true )">refresh</a>
		</div>
	</xsl:template>
	<!-- directory listing -->
	<xsl:template name="contents">
		<xsl:param name="fullpath" select="concat(/svn/index/@path,'/')"/>
		<xsl:param name="trunk">
			<xsl:call-template name="getTrunkPath">
				<xsl:with-param name="path" select="$fullpath"/>
			</xsl:call-template>
		</xsl:param>
		<xsl:param name="folders" select="substring($fullpath, string-length($trunk)+2)"/>
		<xsl:param name="home">
			<xsl:call-template name="getReverseUrl">
				<xsl:with-param name="url" select="$folders"/>
			</xsl:call-template>
		</xsl:param>
		<h2>
			<a id="home" class="path" href="{$home}">
				<span class="projectname">
					<xsl:call-template name="getProjectName"/>
				</span>
			</a>
			<xsl:value-of select="$spacer"/>
			<xsl:call-template name="getFolderPathLinks">
				<xsl:with-param name="folders" select="$folders"/>
			</xsl:call-template>
			<!-- rev not asked for by users: <xsl:if test="@rev">
			<xsl:value-of select="$spacer"/>
				<span class="revision">
					<xsl:value-of select="@rev"/>
				</span>
			</xsl:if> -->
		</h2>
		<xsl:apply-templates select="dir">
			<xsl:sort select="@name"/>
		</xsl:apply-templates>
		<xsl:apply-templates select="file">
			<xsl:sort select="@name"/>
		</xsl:apply-templates>
	</xsl:template>
	<xsl:template match="dir">
		<xsl:param name="id">
			<xsl:call-template name="getFileID"/>
		</xsl:param>
		<xsl:param name="n" select="position() - 1"/>
		<div id="row:{$id}" class="row n{$n mod 4}">
			<div class="actions">
				<a id="open:{$id}" class="action" href="{@href}">open</a>
			</div>
			<a id="f:{$id}" class="folder" href="{@href}">
				<xsl:value-of select="@name"/>
				<!-- <xsl:value-of select="'/'"/> -->
			</a>
		</div>
	</xsl:template>
	<xsl:template match="file">
		<xsl:param name="filetype">
			<xsl:call-template name="getFiletype"/>
		</xsl:param>
		<xsl:param name="id">
			<xsl:call-template name="getFileID"/>
		</xsl:param>
		<xsl:param name="n" select="count(/svn/index/dir) + position() - 1"/>
		<div id="row:{$id}" class="row n{$n mod 4}">
			<div class="actions">
				<a id="open:{$id}" class="action" href="{@href}">open</a>
				<xsl:if test="$logUrl">
					<a id="history:{$id}" class="action" href="{$logUrl}?target={../@path}/{@href}">view history</a>
				</xsl:if>
			</div>
			<a id="f:{$id}" class="file-{$filetype} file" href="{@href}">
				<xsl:value-of select="@name"/>
			</a>
		</div>
	</xsl:template>
	<xsl:template name="footer">
		<div id="footer">
		<span>Version <span class="revision"><xsl:value-of select="@rev"/></span> - </span>
		<span><a href="http://www.reposstyle.com/" target="_blank">Repos&#160;Style</a>&#160;<xsl:value-of select="$reposstyle-version"/> 
		&amp; <a href="http://www.kde-look.org/content/show.php?content=16479" target="_blank">Cezanne&#160;icons</a></span>
		<span id="badges">
		</span>
		<span class="legal">
		<xsl:text>Powered by </xsl:text>
		<xsl:element name="a"><commit_msg>History url parameter starting with & to allow custom parameters in logUrl.<commit_after><?xml version="1.0"?>
<!--
Repos Style (c) 2004-2007 <NAME> www.reposstyle.com

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

  ==== repos.se: Subversion directory listing layout ====
  The logic for this stylesheet, commandbar, id-generation,
  folderPathLinks and filetypes are all ideas from repos.se.
  
  To be set as SVNIndexXSLT in repository conf.
  Used at all directory levels, so urls must be absolute.
  Note that browser transformations only work if the
  stylesheet is read from the same domain as the XML
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0">
	<xsl:output method="html" encoding="UTF-8" omit-xml-declaration="no" indent="no"
		doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"/>
	<xsl:param name="reposstyle-version">@Dev@</xsl:param>
	
	<!-- === repos style configuration === -->
	<!-- static: absolute url to style application -->
	<xsl:param name="static">/repos/</xsl:param>
	<!-- cssUrl: absolute url to css folder -->
	<xsl:param name="cssUrl"><xsl:value-of select="$static"/>style/</xsl:param>
	<!-- logUrl: empty -> no log application, absolute url -> enable 'history' action, must allow appended query param -->
	<xsl:param name="logUrl"><xsl:value-of select="$static"/>open/log/?</xsl:param>
	<!-- startpage: empty -> standard behaviour, absolute url -> special handling of 'up' from trunk -->
	<xsl:param name="startpage">/</xsl:param>
	<!-- ===== end of configuration ===== -->
	
	<xsl:param name="spacer" select="' &#160; '"/>
	<xsl:template match="/">
		<html xmlns="http://www.w3.org/1999/xhtml">
			<head>
				<title>
					<xsl:text>repos: </xsl:text>
					<xsl:value-of select="/svn/index/@path"/>
				</title>
				<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
				<meta name="robots" content="noarchive"/>
				<link rel="shortcut icon" href="/favicon.ico"/>
				<xsl:call-template name="styletag"/>
			</head>
			<body class="repository xml">
				<xsl:apply-templates select="svn"/>
			</body>
		</html>
	</xsl:template>
	<xsl:template name="styletag">
		<link rel="stylesheet" type="text/css" media="screen,projection" href="{$cssUrl}global.css"/>
		<link rel="stylesheet" type="text/css" media="screen,projection" href="{$cssUrl}repository/repository.css"/>
	</xsl:template>
	<xsl:template match="svn">
		<xsl:apply-templates select="index"/>
	</xsl:template>
	<xsl:template match="index">
		<div id="workspace">
			<xsl:call-template name="commandbar"/>
			<xsl:call-template name="contents"/>
			<xsl:call-template name="footer"/>
		</div>
	</xsl:template>
	<xsl:template name="commandbar">
		<xsl:param name="parentpath">
			<xsl:choose>
				<xsl:when test="'if parentpath is empty the up button will be disabled'='no'"></xsl:when>
				<xsl:when test="string-length($startpage)>0 and contains(/svn/index/@path,'/trunk') and substring-after(/svn/index/@path, '/trunk')=''">
					<xsl:value-of select="$startpage"/>
				</xsl:when>
				<xsl:otherwise>../</xsl:otherwise>
			</xsl:choose>
		</xsl:param>
		<div id="commandbar">
		<xsl:if test="/svn/index/updir">
			<xsl:if test="string-length($parentpath)>0">
				<a id="parent" class="command translate" href="{$parentpath}">up</a>
			</xsl:if>
			<xsl:if test="string-length($parentpath)=0">
				<span id="parent" class="command translate">up</span>
			</xsl:if>
		</xsl:if>
		<xsl:if test="$logUrl">
			<a id="history" class="command translate" href="{$logUrl}&amp;target={/svn/index/@path}">folder history</a>
		</xsl:if>
		<a id="refresh" class="command translate" href="#" onclick="window.location.reload( true )">refresh</a>
		</div>
	</xsl:template>
	<!-- directory listing -->
	<xsl:template name="contents">
		<xsl:param name="fullpath" select="concat(/svn/index/@path,'/')"/>
		<xsl:param name="trunk">
			<xsl:call-template name="getTrunkPath">
				<xsl:with-param name="path" select="$fullpath"/>
			</xsl:call-template>
		</xsl:param>
		<xsl:param name="folders" select="substring($fullpath, string-length($trunk)+2)"/>
		<xsl:param name="home">
			<xsl:call-template name="getReverseUrl">
				<xsl:with-param name="url" select="$folders"/>
			</xsl:call-template>
		</xsl:param>
		<h2>
			<a id="home" class="path" href="{$home}">
				<span class="projectname">
					<xsl:call-template name="getProjectName"/>
				</span>
			</a>
			<xsl:value-of select="$spacer"/>
			<xsl:call-template name="getFolderPathLinks">
				<xsl:with-param name="folders" select="$folders"/>
			</xsl:call-template>
			<!-- rev not asked for by users: <xsl:if test="@rev">
			<xsl:value-of select="$spacer"/>
				<span class="revision">
					<xsl:value-of select="@rev"/>
				</span>
			</xsl:if> -->
		</h2>
		<xsl:apply-templates select="dir">
			<xsl:sort select="@name"/>
		</xsl:apply-templates>
		<xsl:apply-templates select="file">
			<xsl:sort select="@name"/>
		</xsl:apply-templates>
	</xsl:template>
	<xsl:template match="dir">
		<xsl:param name="id">
			<xsl:call-template name="getFileID"/>
		</xsl:param>
		<xsl:param name="n" select="position() - 1"/>
		<div id="row:{$id}" class="row n{$n mod 4}">
			<div class="actions">
				<a id="open:{$id}" class="action" href="{@href}">open</a>
			</div>
			<a id="f:{$id}" class="folder" href="{@href}">
				<xsl:value-of select="@name"/>
				<!-- <xsl:value-of select="'/'"/> -->
			</a>
		</div>
	</xsl:template>
	<xsl:template match="file">
		<xsl:param name="filetype">
			<xsl:call-template name="getFiletype"/>
		</xsl:param>
		<xsl:param name="id">
			<xsl:call-template name="getFileID"/>
		</xsl:param>
		<xsl:param name="n" select="count(/svn/index/dir) + position() - 1"/>
		<div id="row:{$id}" class="row n{$n mod 4}">
			<div class="actions">
				<a id="open:{$id}" class="action" href="{@href}">open</a>
				<xsl:if test="$logUrl">
					<a id="history:{$id}" class="action" href="{$logUrl}&amp;target={../@path}/{@href}">view history</a>
				</xsl:if>
			</div>
			<a id="f:{$id}" class="file-{$filetype} file" href="{@href}">
				<xsl:value-of select="@name"/>
			</a>
		</div>
	</xsl:template>
	<xsl:template name="footer">
		<div id="footer">
		<span>Version <span class="revision"><xsl:value-of select="@rev"/></span> - </span>
		<span><a href="http://www.reposstyle.com/" target="_blank">Repos&#160;Style</a>&#160;<xsl:value-of select="$reposstyle-version"/> 
		&amp; <a href="http://www.kde-look.org/content/show.php?content=16479" target="_blank">Cezanne&#160;icons</a></span>
		<span id="badges">
		</span>
		<span class="legal">
		<xsl:text>Powered by </xsl:text>
		<xsl:element name="a">
{'fraction_non_alphanumeric': 0.2114867732352525, 'fraction_numerical': 0.008912151648040741, 'mean_word_length': 4.4422632794457275, 'pattern_counts': {'":': 0, '<': 373, '<?xml version=': 2, '>': 385, 'https://': 0, 'lorem ipsum': 0, 'www.': 14, 'xml': 12}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2601260', 'n_tokens_mistral': 5674, 'n_tokens_neox': 4799, 'n_words': 1070}