Skip to content
This repository
tag: v1477
Fetching contributors…

Cannot retrieve contributors at this time

file 77 lines (77 sloc) 2.494 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:outline="http://code.google.com/p/wkhtmltopdf/outline"
                xmlns="http://www.w3.org/1999/xhtml">
  <xsl:output doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
              doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
              indent="yes" />
  <xsl:template match="outline:outline">
    <html>
      <head>
        <title>Table of Content</title>
        <link rel="stylesheet" href="opalang.css" />
        <style>
          h1 {
            text-align: center;
            font-size: 20px;
            font-family: serif;
            margin-bottom: 1cm;
          }
          div {border-bottom: 1px dashed rgb(200,200,200);}
          span {float: right;}
          li {list-style: none;}
          ul {
            font-size: 20px;
            font-family: serif;
          }
          ul ul {font-size: 14px; }
          ul ul ul {font-size: 12px; }
          ul {padding-left: 0em;}
          ul ul {padding-left: 1em;}
          a {text-decoration:none; color: black;}
          .toc {
            border-bottom:1px solid #c6c6c2;
            border-top: 1px solid #c6c6c2;
            box-shadow: 1cm 1cm;
            -webkit-box-shadow: 1cm 1cm;
            padding: 5mm;
          }
          .logo {
          margin-left: auto;
          margin-right: auto;
          margin-top: 1cm;
          margin-bottom: 1cm;
          }
        </style>
      </head>
      <body>
        <div class="toc">
          <h1 class="toc-header">Table of Contents</h1>
          <ul><xsl:apply-templates select="outline:item/outline:item"/></ul>
        </div>
      </body>
    </html>
  </xsl:template>
  <xsl:template match="outline:item">
    <li>
      <xsl:if test="@title!=''">
        <div>
          <a>
            <xsl:if test="@link">
              <xsl:attribute name="href"><xsl:value-of select="@link"/></xsl:attribute>
            </xsl:if>
            <xsl:if test="@backLink">
              <xsl:attribute name="name"><xsl:value-of select="@backLink"/></xsl:attribute>
            </xsl:if>
            <xsl:value-of select="@title" />
          </a>
          <span> <xsl:value-of select="@page" /> </span>
        </div>
      </xsl:if>
      <ul>
        <xsl:apply-templates select="outline:item"/>
      </ul>
    </li>
  </xsl:template>
</xsl:stylesheet>
Something went wrong with that request. Please try again.