<commit_before><?xml version="1.0"?>
<!--
  Copyright 2002-2005 The Apache Software Foundation or its licensors,
  as applicable.

  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"
    xmlns:d="http://outerx.org/daisy/1.0#navigationspec"
    version="1.0">
      
  <xsl:template match="/">
    <xsl:apply-templates/>
  </xsl:template>
  
  <xsl:template match="d:doc">
    <xsl:choose>
      <xsl:when test="d:doc">
        <group>
          <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
          <xsl:attribute name="label"><xsl:value-of select="@label"/></xsl:attribute>
          <xsl:if test="@nodeId">
            <xsl:attribute name="href"><xsl:value-of select="@nodeId"/>/</xsl:attribute>
          </xsl:if>
          <doc>
            <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
            <xsl:attribute name="label">Section Home</xsl:attribute>
            <xsl:attribute name="href">../<xsl:value-of select="@nodeId"/>.html</xsl:attribute>
          </doc>
          <xsl:apply-templates/>
        </group>
      </xsl:when>
      <xsl:when test="d:link">
        <group>
          <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
          <xsl:attribute name="label"><xsl:value-of select="@label"/></xsl:attribute>
          <xsl:if test="@nodeId">
            <xsl:attribute name="href"><xsl:value-of select="@nodeId"/>/</xsl:attribute>
          </xsl:if>
          <xsl:apply-templates/>
        </group>
      </xsl:when><commit_msg>handle section, that is defined by a document with no nodeId<commit_after><?xml version="1.0"?>
<!--
  Copyright 2002-2005 The Apache Software Foundation or its licensors,
  as applicable.

  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"
    xmlns:d="http://outerx.org/daisy/1.0#navigationspec"
    version="1.0">
      
  <xsl:template match="/">
    <xsl:apply-templates/>
  </xsl:template>
  
  <xsl:template match="d:doc">
    <xsl:choose>
      <xsl:when test="d:doc">
        <group>
          <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
          <xsl:attribute name="label"><xsl:value-of select="@label"/></xsl:attribute>
          <xsl:if test="@nodeId">
            <xsl:attribute name="href"><xsl:value-of select="@nodeId"/>/</xsl:attribute>
          </xsl:if>
          <xsl:choose>
            <xsl:when test="@nodeId">
              <doc>
                <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
                <xsl:attribute name="label">Section Home</xsl:attribute>
                <xsl:attribute name="href">../<xsl:value-of select="@nodeId"/>.html</xsl:attribute>
              </doc>
            </xsl:when>
            <xsl:otherwise>
              <doc>
                <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
                <xsl:attribute name="label">Section Home</xsl:attribute>
                <xsl:attribute name="href"><xsl:value-of select="@id"/>.html</xsl:attribute>
              </doc>
            </xsl:otherwise>
          </xsl:choose>
          <xsl:apply-templates/>
        </group>
      </xsl:when>
      <xsl:when test="d:link">
        <group>
          <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
          <xsl:attribute name="label"><xsl:value-of select="@label"/></xsl:attribute>
          <xsl:if test="@nodeId">
            <xsl:attribute name="href"><xsl:value-of select="@nodeId"/>/</xsl:attribute>
          </xsl:if>
          <xsl:apply-templates/>
        </group>
      </xsl:when>
{'fraction_non_alphanumeric': 0.16100254885301615, 'fraction_numerical': 0.009770603228547154, 'mean_word_length': 2.7166535122336226, 'pattern_counts': {'":': 0, '<': 119, '<?xml version=': 2, '>': 119, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, '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': '23702', 'n_tokens_mistral': 1530, 'n_tokens_neox': 1370, 'n_words': 325}