<commit_before><?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:output method="xml" indent="yes" />
	
	<xsl:param name="failure-limit" />
	<xsl:param name="skip" />
	<xsl:param name="rules-file" />
	<xsl:param name="dictionary" select="document($rules-file,/)"/>
	<xsl:template match="/">
		<testsuites>
			<xsl:apply-templates />
		</testsuites>
	</xsl:template>

	<xsl:template match="results">
		<xsl:variable name="url" select="substring-before(concat(curl, '?'), '?')" />
		<xsl:variable name="tests" select="count(g/*)" />
		<xsl:variable name="failures" select="count(g/*[score&lt;$failure-limit])" />
		<xsl:variable name="skipped" select="count(g/*[contains($skip,name(.))])" />
		<testsuite name="sitespeed.io-{$url}" tests="{$tests}"
			failures="{$failures}" skipped="{$skipped}">
			<xsl:apply-templates />
		</testsuite>
	</xsl:template>

	<xsl:template match="g/*">
		<xsl:variable name="testkey" select="name(.)" />
		<xsl:variable name="testname" select="$dictionary/results/dictionary/rules/*[contains($testkey,name(.))]/name" />
		<xsl:variable name="score" select="score" />
		<testcase name="{$testkey}: {$testname}" status="{$score}">
			<!-- Checked if skipped -->
			<xsl:if test="contains($skip,$testkey)">
				<skipped></skipped>
			</xsl:if>
			<xsl:if test="$score&lt;$failure-limit">
				<xsl:variable name="message" select="message" />

				<failure message="{$message}">
					<xsl:for-each select="components/item">
						<xsl:text>&#xa;</xsl:text>
						<xsl:value-of select="." />
					</xsl:for-each>
				</failure>
			</xsl:if>
		</testcase>
	</xsl:template>

	<xsl:template match="stats|comps|w_c|r_c|stats_c">
	<!-- skip these -->
	</xsl:template>
	<commit_msg>taking care of all different elements<commit_after><?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:output method="xml" indent="yes" />
	
	<xsl:param name="failure-limit" />
	<xsl:param name="skip" />
	<xsl:param name="rules-file" />
	<xsl:param name="dictionary" select="document($rules-file,/)"/>
	<xsl:template match="/">
		<testsuites>
			<xsl:apply-templates />
		</testsuites>
	</xsl:template>

	<xsl:template name="results" match="results">
		<xsl:variable name="url" select="substring-before(concat(curl, '?'), '?')" />
		<xsl:variable name="tests" select="count(g/*)" />
		<xsl:variable name="failures" select="count(g/*[score&lt;$failure-limit])" />
		<xsl:variable name="skipped" select="count(g/*[contains($skip,name(.))])" />
		<testsuite name="sitespeed.io-{$url}" tests="{$tests}"
			failures="{$failures}" skipped="{$skipped}">
			<xsl:apply-templates />
		</testsuite>
	</xsl:template>

	<xsl:template match="g/*">
		<xsl:variable name="testkey" select="name(.)" />
		<xsl:variable name="testname" select="$dictionary/results/dictionary/rules/*[contains($testkey,name(.))]/name" />
		<xsl:variable name="score" select="score" />
		<testcase name="{$testkey}: {$testname}" status="{$score}">
			<!-- Checked if skipped -->
			<xsl:if test="contains($skip,$testkey)">
				<skipped></skipped>
			</xsl:if>
			<xsl:if test="$score&lt;$failure-limit">
				<xsl:variable name="message" select="message" />

				<failure message="{$message}">
					<xsl:for-each select="components/item">
						<xsl:text>&#xa;</xsl:text>
						<xsl:value-of select="." />
					</xsl:for-each>
				</failure>
			</xsl:if>
		</testcase>
	</xsl:template>

	<xsl:template match="w|o|u|i|r|lt|url|curl|stats|comps|w_c|r_c|stats_c">
	<!-- skip these -->
	</xsl:template>
	
{'fraction_non_alphanumeric': 0.23998895332781, 'fraction_numerical': 0.007732670533001933, 'mean_word_length': 5.006633499170813, 'pattern_counts': {'":': 0, '<': 95, '<?xml version=': 2, '>': 95, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 6}, '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': '1838022', 'n_tokens_mistral': 1526, 'n_tokens_neox': 1294, 'n_words': 186}