Code Search for Developers
 
 
  

maketoc.xsl from Amavisd-new Maintenance at Krugle


Show maketoc.xsl syntax highlighted

<?xml version="1.0" encoding="US-ASCII"?>
<!--This file was created automatically by html2xhtml-->
<!--from the HTML stylesheets. Do not edit this file.-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" xmlns="http://www.w3.org/1999/xhtml" version="1.0" exclude-result-prefixes="doc">

<!-- ********************************************************************
     $Id: maketoc.xsl 3202 2003-11-30 19:42:23Z bobstayton $
     ********************************************************************

     This file is part of the XSL DocBook Stylesheet distribution.
     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
     and other information.

     ******************************************************************** -->

<!-- ==================================================================== -->

<xsl:import href="docbook.xsl"/>
<xsl:import href="chunk.xsl"/>

<xsl:output method="xml" indent="no" encoding="UTF-8" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>

<xsl:param name="toc.list.type" select="'tocentry'"/>

<!-- refentry in autotoc.xsl does not use subtoc, so must
     handle it explicitly here. -->
<xsl:template match="refentry" mode="toc">
  <xsl:param name="toc-context" select="."/>

  <xsl:call-template name="subtoc">
    <xsl:with-param name="toc-context" select="$toc-context"/>
  </xsl:call-template>
</xsl:template>


<xsl:template name="subtoc">
  <xsl:param name="nodes" select="NOT-AN-ELEMENT"/>
  <xsl:variable name="filename">
    <xsl:apply-templates select="." mode="chunk-filename"/>
  </xsl:variable>

  <xsl:variable name="chunk">
    <xsl:call-template name="chunk"/>
  </xsl:variable>

  <xsl:if test="$chunk != 0">
    <xsl:call-template name="indent-spaces"/>
    <tocentry linkend="{@id}">
      <xsl:processing-instruction name="dbhtml">
        <xsl:text>filename="</xsl:text>
        <xsl:value-of select="$filename"/>
        <xsl:text>"</xsl:text>
      </xsl:processing-instruction>
      <xsl:text>
</xsl:text>
      <xsl:apply-templates mode="toc" select="$nodes"/>
      <xsl:call-template name="indent-spaces"/>
    </tocentry>
    <xsl:text>
</xsl:text>
  </xsl:if>
</xsl:template>

<xsl:template name="indent-spaces">
  <xsl:param name="node" select="."/>
  <xsl:text>  </xsl:text>
  <xsl:if test="$node/parent::*">
    <xsl:call-template name="indent-spaces">
      <xsl:with-param name="node" select="$node/parent::*"/>
    </xsl:call-template>
  </xsl:if>
</xsl:template>

<!-- ==================================================================== -->

<xsl:template match="/" priority="-1">
  <xsl:text>
</xsl:text>
  <toc role="chunk-toc">
    <xsl:text>
</xsl:text>
    <xsl:apply-templates select="/" mode="toc"/>
  </toc>
  <xsl:text>
</xsl:text>
</xsl:template>

</xsl:stylesheet>




See more files for this project here

Amavisd-new Maintenance

AmavisAdmin is a tool to maintain SPAMs, Viruses and blocked mails written to an SQL database by Amavisd-new. Mails can be removed automatically or manually, or they can be released to be send to the recipients.

Project homepage: http://sourceforge.net/projects/amavisadmin
Programming language(s): Java,XML
License: other

  admon.xsl
  annotations.xsl
  autoidx-kimber.xsl
  autoidx-kosek.xsl
  autoidx-ng.xsl
  autoidx.xsl
  autotoc.xsl
  biblio.xsl
  block.xsl
  callout.xsl
  changebars.xsl
  chunk-code.xsl
  chunk-common.xsl
  chunk.xsl
  chunker.xsl
  chunkfast.xsl
  chunktoc.xsl
  component.xsl
  db5strip.xsl
  division.xsl
  docbook.xsl
  docbookng.xsl
  ebnf.xsl
  footnote.xsl
  formal.xsl
  glossary.xsl
  graphics.xsl
  highlight.xsl
  html-rtf.xsl
  html.xsl
  html2xhtml.xsl
  htmltbl.xsl
  index.xsl
  info.xsl
  inline.xsl
  keywords.xsl
  lists.xsl
  maketoc.xsl
  manifest.xsl
  math.xsl
  oldchunker.xsl
  onechunk.xsl
  param.xsl
  pi.xsl
  profile-chunk-code.xsl
  profile-chunk.xsl
  profile-docbook.xsl
  profile-onechunk.xsl
  qandaset.xsl
  refentry.xsl
  sections.xsl
  synop.xsl
  table.xsl
  task.xsl
  titlepage.templates.xsl
  titlepage.xsl
  toc.xsl
  verbatim.xsl
  xref.xsl