<commit_before><?xml version="1.0" encoding="utf-8"?>
<x:stylesheet xmlns:x="http://www.w3.org/1999/XSL/Transform"
		xmlns:c="http://exslt.org/common"
		xmlns:d="http://exslt.org/dates-and-times"
                extension-element-prefixes="c d"
		version="1.0">

	<x:import href="util.codebase.xsl" />

	<x:param name="engine" select="'unknown'" />

	<x:template name="print-preamble">
		<x:text>; Auto-generated header&#xA;</x:text>
		<x:value-of select="concat('; ', d:date-time(), '&#xA;')" />
		<x:call-template name="print-codebase-version">
			<x:with-param name="prefix" select="'; '" />
			<x:with-param name="suffix" select="'&#xA;'" />
		</x:call-template>

		<x:value-of select="concat('[', @for-database, ']')" />
		<x:text>&#xA;</x:text>
	</x:template>

	<x:template match="/">
		<x:apply-templates select="query-set" />
	</x:template>

	<x:template match="query-set">
		<c:document href="{@for-database}-{$engine}-queries.ini" method="text">
			<x:call-template name="print-preamble" />
			<x:apply-templates select="query" />
		</c:document>
	</x:template>

	<x:template match="query">
		<x:value-of select="concat(@id, ' = ')" />
		<x:apply-templates select="define" />
		<x:text>&#xA;</x:text>
	</x:template>

	<x:template match="define">
		<x:apply-templates />
	</x:template>

	<x:template match="define/text()">
		<x:value-of select="normalize-space(.)" />
	</x:template>

	<x:template match="define/raw">
		<x:value-of select="." />
	</x:template>

	<x:template match="define/value">
		<x:text> ? </x:text>
	</x:template>

</x:stylesheet><commit_msg>query: define mode "export" for templates exporting define<commit_after><?xml version="1.0" encoding="utf-8"?>
<x:stylesheet xmlns:x="http://www.w3.org/1999/XSL/Transform"
		xmlns:c="http://exslt.org/common"
		xmlns:d="http://exslt.org/dates-and-times"
                extension-element-prefixes="c d"
		version="1.0">

	<x:import href="util.codebase.xsl" />

	<x:param name="engine" select="'unknown'" />

	<x:template name="print-preamble">
		<x:text>; Auto-generated header&#xA;</x:text>
		<x:value-of select="concat('; ', d:date-time(), '&#xA;')" />
		<x:call-template name="print-codebase-version">
			<x:with-param name="prefix" select="'; '" />
			<x:with-param name="suffix" select="'&#xA;'" />
		</x:call-template>

		<x:value-of select="concat('[', @for-database, ']')" />
		<x:text>&#xA;</x:text>
	</x:template>

	<x:template match="/">
		<x:apply-templates select="query-set" />
	</x:template>

	<x:template match="query-set">
		<c:document href="{@for-database}-{$engine}-queries.ini" method="text">
			<x:call-template name="print-preamble" />
			<x:apply-templates select="query" />
		</c:document>
	</x:template>

	<x:template match="query">
		<x:value-of select="concat(@id, ' = ')" />
		<x:apply-templates select="define" mode="export" />
		<x:text>&#xA;</x:text>
	</x:template>

	<x:template match="define" mode="export">
		<x:apply-templates mode="export" />
	</x:template>

	<x:template match="define/text()" mode="export">
		<x:value-of select="normalize-space(.)" />
	</x:template>

	<x:template match="define/raw" mode="export">
		<x:value-of select="." />
	</x:template>

	<x:template match="define/value" mode="export">
		<x:text> ? </x:text>
	</x:template>

</x:stylesheet>
{'fraction_non_alphanumeric': 0.24977071232039133, 'fraction_numerical': 0.006114338122898196, 'mean_word_length': 4.602739726027397, 'pattern_counts': {'":': 0, '<': 93, '<?xml version=': 2, '>': 93, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 8}, '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': '4029040', 'n_tokens_mistral': 1353, 'n_tokens_neox': 1254, 'n_words': 176}