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

<xsl:stylesheet version="1.0"
		xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
		xmlns:dtb="http://www.daisy.org/z3986/2005/dtbook/"	
		xmlns:brl="http://www.daisy.org/z3986/2009/braille/"
		exclude-result-prefixes="dtb brl">
  
  <xsl:output method="xml" encoding="utf-8" indent="yes" 
	      doctype-public="-//NISO//DTD dtbook 2005-3//EN"
              doctype-system="http://www.daisy.org/z3986/2005/dtbook-2005-3.dtd" />

  <!-- Get rid of the brl namespace declaration in the dtbook node -->
  <xsl:template match="dtb:dtbook">
    <xsl:element name="{name()}" namespace="{namespace-uri()}">
      <xsl:apply-templates select="@*|*|text()|processing-instruction()|comment()" />
    </xsl:element>
  </xsl:template>

  <!-- Drop the brl:running-line elements without retaining their content -->
  <xsl:template match="brl:running-line"/>

  <!-- Drop the brl:toc-line elements without retaining their content -->
  <xsl:template match="brl:toc-line"/>

  <!-- Filter brl:when-braille elements -->
  <xsl:template match="brl:when-braille"/>

  <!-- Drop the brl:* elements while retaining their content -->
  <xsl:template match="brl:*">
    <xsl:apply-templates/>
  </xsl:template>

  <!-- Drop the brl:* attributes -->
  <xsl:template match="@brl:*"/>

  <!-- Copy all other elements and attributes -->
  <xsl:template match="node()|@*"><commit_msg>Replace space inside num elements with non-breaking space<commit_after><?xml version="1.0" encoding="utf-8"?>

<xsl:stylesheet version="1.0"
		xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
		xmlns:dtb="http://www.daisy.org/z3986/2005/dtbook/"	
		xmlns:brl="http://www.daisy.org/z3986/2009/braille/"
		exclude-result-prefixes="dtb brl">
  
  <xsl:output method="xml" encoding="utf-8" indent="yes" 
	      doctype-public="-//NISO//DTD dtbook 2005-3//EN"
              doctype-system="http://www.daisy.org/z3986/2005/dtbook-2005-3.dtd" />

  <!-- Get rid of the brl namespace declaration in the dtbook node -->
  <xsl:template match="dtb:dtbook">
    <xsl:element name="{name()}" namespace="{namespace-uri()}">
      <xsl:apply-templates select="@*|*|text()|processing-instruction()|comment()" />
    </xsl:element>
  </xsl:template>

  <!-- Drop the brl:running-line elements without retaining their content -->
  <xsl:template match="brl:running-line"/>

  <!-- Drop the brl:toc-line elements without retaining their content -->
  <xsl:template match="brl:toc-line"/>

  <!-- Filter brl:when-braille elements -->
  <xsl:template match="brl:when-braille"/>

  <!-- Replace space inside num elements with non-breaking space -->
  <!-- FIXME: This should probably be in the dtbook2latex converter,
       but since that one dosn't know anything about num elements this
       template is here for now. -->
  <xsl:template match="brl:num//text()">
    <xsl:value-of select="translate(string(current()), ' ', ' ')"/>
  </xsl:template>

  <!-- Drop the brl:* elements while retaining their content -->
  <xsl:template match="brl:*">
    <xsl:apply-templates/>
  </xsl:template>

  <!-- Drop the brl:* attributes -->
  <xsl:template match="@brl:*"/>

  <!-- Copy all other elements and attributes -->
  <xsl:template match="node()|@*">
{'fraction_non_alphanumeric': 0.19266337854500618, 'fraction_numerical': 0.028051787916152898, 'mean_word_length': 3.7097242380261246, 'pattern_counts': {'":': 0, '<': 54, '<?xml version=': 2, '>': 54, 'https://': 0, 'lorem ipsum': 0, 'www.': 8, 'xml': 10}, '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': '1051', 'n_tokens_mistral': 1199, 'n_tokens_neox': 1045, 'n_words': 222}