<commit_before><?xml version="1.0" encoding="iso-8859-1"?>
<!--
 ! Stylesheet for home page
 !
 ! $Id$
 !-->
<xsl:stylesheet
 version="1.0"
 xmlns:exsl="http://exslt.org/common"
 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
 xmlns:func="http://exslt.org/functions"
 extension-element-prefixes="func"
>
  <xsl:include href="../layout.xsl"/>
  
  <!--
   ! Template for context navigation
   !
   ! @see      ../../layout.xsl
   ! @purpose  Context navigation
   !-->
  <xsl:template name="context">

    <!-- Other Planet-Sites -->
    <h4 class="context">Planetarium</h4>
    <ul class="context">
      <xsl:for-each select="/formresult/news/items/item">
        <li>
          <em><xsl:value-of select="func:datetime(created_at)"/></em>:<br/>
          <a href="news/view?{news_id}">
            <xsl:value-of select="caption"/>
          </a>
        </li>
      </xsl:for-each>
    </ul>

    <!-- Listed Feeds -->
    <h4 class="context">Read more ...</h4>
    <ul class="context">
      <xsl:for-each select="/formresult/syndication/syndicate/feed">
        <li>
          <em>...</em>:<br/>
          <a href="/deref/?{@link}"><xsl:value-of select="@title"/></a>
        </li>
      </xsl:for-each>
    </ul>

    <!-- release -->
    <h4 class="context">Current release</h4>
    <ul class="context">
      <li>
        <em>2003-10-26</em>:<br/>
        <a href="#release/2003-10-26">Download</a> | <a href="#changelog/2003-10-26">Changelog</a>
      </li>
    </ul>
  </xsl:template>
  
  <xsl:template match="a">
    <a href="/deref/?{@href}"><xsl:apply-templates select="./*|text()"/></a>
  </xsl:template>

  <!--
   ! Template for content
   !
   ! @see      ../../layout.xsl
   ! @purpose  Define main content
   !-->
  <xsl:template name="content">
    <xsl:variable name="offset" select="0"/>

    <h1>Latest entries from #<xsl:value-of select="$offset + 1"/> to #<xsl:value-of select="$offset + 9"/></h1>

    <!-- 
    <xsl:variable name="shortcuts">
      <shortcut href="about/topic?introduction" icon="introduction">Introduction</shortcut>
      <shortcut href="about/examples" icon="examples">Examples</shortcut>
      <shortcut href="resources" icon="download">Download</shortcut>
    </xsl:variable>
    <xsl:copy-of select="func:shortcuts(exsl:node-set($shortcuts))"/>
    -->
    
    <xsl:for-each select="/formresult/syndicates/syndicate/item">
      <xsl:if test="position() &gt;= $offset and position() &lt;= 10">
        <div class="entry entryclass-{feed/@feed_id}">
          <h3>
            <a href="/deref/?{feed/@link}">
              <xsl:value-of select="./@author"/>: <xsl:value-of select="./@title"/>
            </a>
          </h3>
          <p>
            <xsl:apply-templates select="content"/>
          </p>
        </div>
        <br clear="all"/>
      </xsl:if>
    </xsl:for-each>
  </xsl:template>
  
</xsl:stylesheet><commit_msg>- move common code to entry.inc.xsl - add pager<commit_after><?xml version="1.0" encoding="iso-8859-1"?>
<!--
 ! Stylesheet for home page
 !
 ! $Id$
 !-->
<xsl:stylesheet
 version="1.0"
 xmlns:exsl="http://exslt.org/common"
 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
 xmlns:func="http://exslt.org/functions"
 extension-element-prefixes="func"
>
  <xsl:include href="../layout.xsl"/>
  <xsl:include href="../calendar.inc.xsl"/>
  <xsl:include href="../entry.inc.xsl"/>
    
  <!--
   ! Template for context navigation
   !
   ! @see      ../../layout.xsl
   ! @purpose  Context navigation
   !-->
  <xsl:template name="context">
  
    <!-- Other Planet-Sites -->
    <h4 class="context">Planetarium</h4>
    <ul class="context">
      <xsl:for-each select="/formresult/news/items/item">
        <li>
          <em><xsl:value-of select="func:datetime(created_at)"/></em>:<br/>
          <a href="news/view?{news_id}">
            <xsl:value-of select="caption"/>
          </a>
        </li>
      </xsl:for-each>
    </ul>

    <!-- Listed Feeds -->
    <h4 class="context">Read more ...</h4>
    <ul class="context">
      <xsl:for-each select="/formresult/syndication/syndicate/feed">
        <li>
          <em>...</em>:<br/>
          <a href="/deref/?{@link}"><xsl:value-of select="@title"/></a>
        </li>
      </xsl:for-each>
    </ul>

    <!-- release -->
    <h4 class="context">Current release</h4>
    <ul class="context">
      <li>
        <em>2003-10-26</em>:<br/>
        <a href="#release/2003-10-26">Download</a> | <a href="#changelog/2003-10-26">Changelog</a>
      </li>
    </ul>
  </xsl:template>
  
  <!--
   ! Template for content
   !
   ! @see      ../../layout.xsl
   ! @purpose  Define main content
   !-->
  <xsl:template name="content">
    <xsl:variable name="offset" select="/formresult/offset"/>
    <xsl:variable name="items" select="/formresult/syndicates/syndicate/item"/>
  
    <!-- Headline -->
    <h2>Latest entries from #<xsl:value-of select="$offset + 1"/> to #<xsl:value-of select="$offset + 9"/></h2>
    
    <xsl:for-each select="exsl:node-set($items)">
      <xsl:if test="position() &gt;= $offset and position() &lt; $offset + 10">
      
        <!-- Display date when this is the first item or its date differs from the previous item -->
        <xsl:variable name="pos" select="position()"/>
        <xsl:if test="position() = $offset or ($items[$pos - 1]/published/year != published/year or $items[$pos - 1]/published/yday != published/yday)">
          <h2 class="date" align="right"><xsl:value-of select="func:smartdate(published)"/></h2>
        </xsl:if>
        
        <xsl:call-template name="display-entry">
          <xsl:with-param name="entry" select="$items[$pos]"/>
        </xsl:call-template>
        
      </xsl:if>
    </xsl:for-each>
    
    <xsl:if test="$offset &gt;= 10">
      <a href="{$__state}?offset={$offset - 10}">Previous 10</a>
    </xsl:if>
    |
    <xsl:if test="($offset + 10) &lt; count(/formresult/syndicates/syndicate/item)">
      <a href="{$__state}?offset={$offset + 10}">Next 10</a>
    </xsl:if>
  </xsl:template>
  
</xsl:stylesheet>
{'fraction_non_alphanumeric': 0.21848042468480425, 'fraction_numerical': 0.019741207697412076, 'mean_word_length': 2.5195563339171043, 'pattern_counts': {'":': 0, '<': 182, '<?xml version=': 2, '>': 182, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 8}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7053234', 'n_tokens_mistral': 2250, 'n_tokens_neox': 2061, 'n_words': 348}