Appendix B. Example configuration file

<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

<!--
 Part 1: set the path to your docbook stylesheet here
-->
<xsl:import href="/usr/local/share/xsl/docbook/html/chunk.xsl"/>

<!--
 Part 2: set the value of the match attribute to the list of
  tags that you want to add annotations to
-->
<xsl:template match="para|simpara|sect1|programlisting|note|important|warning|caution">
  <xsl:call-template name="annotate"/>
</xsl:template>

<!--
 Part 3: configure these variables to suit your needs
-->

<!-- the DocumentRoot for the DocBook-Document to annotate -->
<xsl:variable name="DocumentRoot">/usr/local/share/annotate</xsl:variable>

<!-- the file to show if the requested file is a directory -->
<xsl:variable name="DirectoryIndex">index.html</xsl:variable>

<!-- the eMail address to send new annotations to -->
<xsl:variable name="eMailAddress"></xsl:variable>

<!-- the subject to use for mails sent after a new annotation -->
<xsl:variable name="eMailSubject"></xsl:variable>

<!-- the root directory where the templates can be found -->
<xsl:variable name="TemplateRoot">templates</xsl:variable>

<!-- the name of the template which provides the navigation bar -->
<xsl:variable name="NavigationTemplate">navigation.tpl</xsl:variable>

<!-- the name of the template which provides the links -->
<xsl:variable name="LinkTemplate">links.tpl</xsl:variable>

<!-- the name of the template which provides an entry form for a new annotation -->
<xsl:variable name="AnnotateTemplate">annotate.tpl</xsl:variable>

<!-- the name of the template which displays annotations already made -->
<xsl:variable name="ViewTemplate">view.tpl</xsl:variable>

<!-- the name of the template for the mail to be sent on new annotations -->
<xsl:variable name="MailTemplate">mail.tpl</xsl:variable>

<!-- the name of the template for the login page -->
<xsl:variable name="LoginTemplate">login.tpl</xsl:variable>

<!-- the DBI database handle (i.e., the parameter for DBI->connect()) -->
<xsl:variable name="Database">DBI:SQLite:annotations/annotations.db</xsl:variable>

<!-- the DBI database username -->
<xsl:variable name="DatabaseUsername"></xsl:variable>

<!-- the DBI database password -->
<xsl:variable name="DatabasePassword"></xsl:variable>

<!-- the administration username -->
<xsl:variable name="AdminUsername">admin</xsl:variable>

<!-- the administration password -->
<xsl:variable name="AdminPassword">97he9w9y</xsl:variable>

<!-- the default output mode for annotations. valid possibilities are:
           Hide - hides annotations
           Inline - shows annotations inline
           Link - shows links to the annotations. the annotations will open in a separate window
-->
<xsl:variable name="DefaultOutputMode">Link</xsl:variable>

<!-- optional: Apache's mime.types database to determine Content-Types -->
<xsl:variable name="MimeTypes">/etc/httpd/mime.types</xsl:variable>

<!--
 usually there is nothing more to change after this point
-->

<xsl:template name="user.header.navigation">
        <annotate-navigation type="header"/>
</xsl:template>

<xsl:template name="user.footer.navigation">
        <annotate-navigation type="footer"/>
</xsl:template>

<xsl:template name="annotate">
  <xsl:param name="node" select="."/>
  <xsl:variable name="node_id">
        <xsl:call-template name="object.id">
          <xsl:with-param name="object" select="$node"/>
        </xsl:call-template>
  </xsl:variable>
  <annotate node_id="{$node_id}">
    <xsl:apply-imports/>
  </annotate>
</xsl:template>


</xsl:stylesheet>