Appendice 11
Foglio di stile per la creazione della Table of contents (TOC) del pacchetto OEBPS
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" encoding="iso-8859-1" doctype-public="+//ISBN 0-9673008-1-9//DTD OEB 1.2 Document//EN" doctype-system="http://openebook.org/dtds/oeb-1.2/oebdoc12.dtd" indent="yes"/>
<xsl:template match="/">
<html lang="it" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>
<xsl:value-of select="/TEI.2/teiHeader/fileDesc/titleStmt/author"/> - <xsl:value-of select="/TEI.2/teiHeader/fileDesc/titleStmt/title"/>
</title>
<style>
.center { text-align: center; }
a { color:black; font-size: 13pt; text-align: left; font-family: "Times New Roman", Times, serif; text-decoration: none; line-height: 1em; }
a:hover { color: #1E20FF; }
.part {
font-size: 15pt; font-family: "Times New Roman", Times, serif;
font-style: italic;
text-align: center;
font-weight: normal;}
body { font-family:"Times New Roman", Times, serif; }
</style>
</head>
<body>
<h1 class="center">INDICE</h1>
<xsl:for-each select="//div0">
<br/><h2 class="part"><xsl:value-of select="p"/></h2>
<xsl:for-each select="*/head">
<a href="contenuto.htm#{../@id}"><xsl:value-of select="."/></a><br/>
</xsl:for-each>
</xsl:for-each>
<xsl:for-each select="//div">
<xsl:for-each select="head">
<br/>
<a href="contenuto.htm#{../@id}"><xsl:value-of select="."/></a>
</xsl:for-each>
</xsl:for-each>
</body>
</html>
</xsl:template>
</xsl:stylesheet>