<commit_before><?xml version="1.0" encoding="utf-8"?>
<!--

 Author: <NAME> <<EMAIL>>

 Copyright (c) 2014 BBC

  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.

-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:db="http://docbook.org/ns" xmlns:xi="http://www.w3.org/2001/XInclude">

	<!-- <para> -->
	<xsl:template match="//db:para" mode="body">
		<xsl:call-template name="html.block">
			<xsl:with-param name="kind" />
			<xsl:with-param name="element">p</xsl:with-param>
		</xsl:call-template>
	</xsl:template>
	
	<!-- <formalpara> -->
	<xsl:template match="//db:formalpara" mode="body">
		<xsl:call-template name="html.titleblock">
			<xsl:with-param name="kind" />
			<xsl:with-param name="element">p</xsl:with-param>
			<xsl:with-param name="title.element">h2</xsl:with-param>
		</xsl:call-template>
	</xsl:template>

	<!-- <blockquote> -->
	<xsl:template match="//db:blockquote" mode="body">
		<xsl:variable name="attribution"><xsl:copy-of select="db:attribution" /></xsl:variable>
		<blockquote>
			<xsl:apply-templates select="node()" mode="body" />
			<footer><cite><xsl:value-of select="$attribution" /></cite></footer>
		</blockquote>
	</xsl:template>
	<xsl:template match="//db:blockquote/db:attribution" />

	<!-- Admonition elements -->

	<!-- <note> -->
	<xsl:template match="//db:note" mode="body">
		<xsl:call-template name="html.block">
			<xsl:with-param name="kind">info</xsl:with-param>
			<xsl:with-param name="element">aside</xsl:with-param>
		</xsl:call-template>
	</xsl:template>			
	
	<!-- <tip>, <warning>, <important>, <caution> -->
	<xsl:template match="//db:tip|//db:warning|//db:important|//db:caution" mode="body">
		<xsl:call-template name="html.block">
			<xsl:with-param name="element">aside</xsl:with-param>
		</xsl:call-template>
	</xsl:template>			

	<!-- List elements -->

	<!-- <itemizedlist> -->
	<xsl:template match="//db:itemizedlist" mode="body">
	  <ul>
		  <xsl:apply-templates mode="list" />
	  </ul>
	</xsl:template>

	<!-- <orderedlist> -->
	<xsl:template match="//db:orderedlist" mode="body">
	  <ol>
		  <xsl:apply-templates mode="list" />
	  </ol>
	</xsl:template>

	<!-- <variablelist> -->
	<xsl:template match="//db:variablelist" mode="body">
		<dl>
			<xsl:for-each select="db:varlistentry">
				<xsl:apply-templates select="node()" mode="dl" />
			</xsl:for-each>
		</dl>
	</xsl:template>
	
	<xsl:template match="//db:term" mode="dl">
		<dt><xsl:apply-templates select="node()" mode="body" /></dt>
	</xsl:template>
	
	<!-- <listitem> -->
	<xsl:template match="//db:listitem" mode="list">
	  <xsl:choose>
		<xsl:when test="count(*)=1 and count(db:para)=1">
		  <li><xsl:apply-templates select="db:para/node()" mode="body" /></li>
		</xsl:when>
		<xsl:otherwise>
		  <li><xsl:apply-templates select="node()" mode="body" /></li>
		</xsl:otherwise>
	  </xsl:choose>
	</xsl:template>

	<xsl:template match="//db:listitem" mode="dl">
	  <xsl:choose>
		<xsl:when test="count(*)=1 and count(db:para)=1">
		  <dd><xsl:apply-templates select="db:para/node()" mode="body" /></dd>
		</xsl:when>
		<xsl:otherwise>
		  <dd><xsl:apply-templates select="node()" mode="body" /></dd>
		</xsl:otherwise>
	  </xsl:choose>
	</xsl:template>
	
	<!-- <segmentedlist> -->
	<xsl:template match="//db:segmentedlist" mode="body">
		<table>
			<thead>
				<tr>
					<xsl:for-each select="db:segtitle">
						<th scope="col">
							<xsl:apply-templates select="node()" mode="body" />
						</th>
					</xsl:for-each>
				</tr>
			</thead>
			<tbody>
				<xsl:for-each select="db:seglistitem">
					<tr>
						<xsl:for-each select="db:seg">
							<td>
								<xsl:apply-templates select="node()" mode="body" />
							</td>
						</xsl:for-each>
					</tr>
				</xsl:for-each>
			</tbody>
		</table>
	</xsl:template>

	<!-- <section>, <chapter>, <part> -->
	<xsl:template match="//db:section|//db:chapter|//db:part|//db:refsection|//db:refsect1|//db:refsect2|//db:refsect3|//db:refsect4|//db:reference|//db:refsynopsisdiv|//db:refentry" mode="body">
		<xsl:call-template name="html.titleblock" />
	</xsl:template>
	
	<!-- <simplesect>, <sectN> -->
	<xsl:template match="//db:simplesect|//db:sect1|//db:sect2|//db:sect3|//db:sect4|//db:sect5" mode="body">
		<xsl:call-template name="html.titleblock">
			<xsl:with-param name="kind">section</xsl:with-param>
		</xsl:call-template>
	</xsl:template>
	
	<!-- <refnamediv> --><commit_msg>Wrap generated tables in a <div class="table"> to allow sensible overflow-handling in CSS.<commit_after><?xml version="1.0" encoding="utf-8"?>
<!--

 Author: <NAME> <<EMAIL>>

 Copyright (c) 2014 BBC

  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.

-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:db="http://docbook.org/ns" xmlns:xi="http://www.w3.org/2001/XInclude">

	<!-- <para> -->
	<xsl:template match="//db:para" mode="body">
		<xsl:call-template name="html.block">
			<xsl:with-param name="kind" />
			<xsl:with-param name="element">p</xsl:with-param>
		</xsl:call-template>
	</xsl:template>
	
	<!-- <formalpara> -->
	<xsl:template match="//db:formalpara" mode="body">
		<xsl:call-template name="html.titleblock">
			<xsl:with-param name="kind" />
			<xsl:with-param name="element">p</xsl:with-param>
			<xsl:with-param name="title.element">h2</xsl:with-param>
		</xsl:call-template>
	</xsl:template>

	<!-- <blockquote> -->
	<xsl:template match="//db:blockquote" mode="body">
		<xsl:variable name="attribution"><xsl:copy-of select="db:attribution" /></xsl:variable>
		<blockquote>
			<xsl:apply-templates select="node()" mode="body" />
			<footer><cite><xsl:value-of select="$attribution" /></cite></footer>
		</blockquote>
	</xsl:template>
	<xsl:template match="//db:blockquote/db:attribution" />

	<!-- Admonition elements -->

	<!-- <note> -->
	<xsl:template match="//db:note" mode="body">
		<xsl:call-template name="html.block">
			<xsl:with-param name="kind">info</xsl:with-param>
			<xsl:with-param name="element">aside</xsl:with-param>
		</xsl:call-template>
	</xsl:template>			
	
	<!-- <tip>, <warning>, <important>, <caution> -->
	<xsl:template match="//db:tip|//db:warning|//db:important|//db:caution" mode="body">
		<xsl:call-template name="html.block">
			<xsl:with-param name="element">aside</xsl:with-param>
		</xsl:call-template>
	</xsl:template>			

	<!-- List elements -->

	<!-- <itemizedlist> -->
	<xsl:template match="//db:itemizedlist" mode="body">
	  <ul>
		  <xsl:apply-templates mode="list" />
	  </ul>
	</xsl:template>

	<!-- <orderedlist> -->
	<xsl:template match="//db:orderedlist" mode="body">
	  <ol>
		  <xsl:apply-templates mode="list" />
	  </ol>
	</xsl:template>

	<!-- <variablelist> -->
	<xsl:template match="//db:variablelist" mode="body">
		<dl>
			<xsl:for-each select="db:varlistentry">
				<xsl:apply-templates select="node()" mode="dl" />
			</xsl:for-each>
		</dl>
	</xsl:template>
	
	<xsl:template match="//db:term" mode="dl">
		<dt><xsl:apply-templates select="node()" mode="body" /></dt>
	</xsl:template>
	
	<!-- <listitem> -->
	<xsl:template match="//db:listitem" mode="list">
	  <xsl:choose>
		<xsl:when test="count(*)=1 and count(db:para)=1">
		  <li><xsl:apply-templates select="db:para/node()" mode="body" /></li>
		</xsl:when>
		<xsl:otherwise>
		  <li><xsl:apply-templates select="node()" mode="body" /></li>
		</xsl:otherwise>
	  </xsl:choose>
	</xsl:template>

	<xsl:template match="//db:listitem" mode="dl">
	  <xsl:choose>
		<xsl:when test="count(*)=1 and count(db:para)=1">
		  <dd><xsl:apply-templates select="db:para/node()" mode="body" /></dd>
		</xsl:when>
		<xsl:otherwise>
		  <dd><xsl:apply-templates select="node()" mode="body" /></dd>
		</xsl:otherwise>
	  </xsl:choose>
	</xsl:template>
	
	<!-- <segmentedlist> -->
	<xsl:template match="//db:segmentedlist" mode="body">
		<div class="table">
			<table>
				<thead>
					<tr>
						<xsl:for-each select="db:segtitle">
							<th scope="col">
								<xsl:apply-templates select="node()" mode="body" />
							</th>
						</xsl:for-each>
					</tr>
				</thead>
				<tbody>
					<xsl:for-each select="db:seglistitem">
						<tr>
							<xsl:for-each select="db:seg">
								<td>
									<xsl:apply-templates select="node()" mode="body" />
								</td>
							</xsl:for-each>
						</tr>
					</xsl:for-each>
				</tbody>
			</table>
		</div>
	</xsl:template>

	<!-- <section>, <chapter>, <part> -->
	<xsl:template match="//db:section|//db:chapter|//db:part|//db:refsection|//db:refsect1|//db:refsect2|//db:refsect3|//db:refsect4|//db:reference|//db:refsynopsisdiv|//db:refentry" mode="body">
		<xsl:call-template name="html.titleblock" />
	</xsl:template>
	
	<!-- <simplesect>, <sectN> -->
	<xsl:template match="//db:simplesect|//db:sect1|//db:sect2|//db:sect3|//db:sect4|//db:sect5" mode="body">
		<xsl:call-template name="html.titleblock">
			<xsl:with-param name="kind">section</xsl:with-param>
		</xsl:call-template>
	</xsl:template>
	
	<!-- <refnamediv> -->
{'fraction_non_alphanumeric': 0.22333131679774149, 'fraction_numerical': 0.007461181689856826, 'mean_word_length': 3.9079663532904503, 'pattern_counts': {'":': 0, '<': 340, '<?xml version=': 2, '>': 340, 'https://': 0, 'lorem ipsum': 0, 'www.': 6, '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': '7091261', 'n_tokens_mistral': 4193, 'n_tokens_neox': 3499, 'n_words': 625}