Appendice 10

Foglio di stile XSLT per l'impaginazione dei contenuti testuali 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"/>
	<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>
p { text-align: justify;
	text-indent: 25pt;
	margin: 0pt 0pt;}

.cap { page-break-before: always; }

h2 { font-size: 16pt; text-align: left; font-weight: bold; }

h1 {font-size: 14pt; text-align: left; }

cite { font-style: normal; }

.italic {font-style: italic;}

.center { text-align: center; }
 
.hr { width: 65%; }
 
.bloc { line-height: 1.5em;
		margin-left: 10%; 
		margin-right: 10%; }
 
blockquote {text-align: justify;
		        line-height: 1.5em;}

body {  font-family:"Times New Roman", Times, serif; line-height: 1.5em;}

p.autore {
	font-variant:small-caps;
	text-align:center;
	font-style:normal;
	font-size:18pt;
	font-family:Serif;
	font-stretch: wider;
	page-break-before:always;
	margin-top:10%;
	text-indent:0px;}

p.titolo {
	font-variant:small-caps;
	text-align:center;
	font-weight: bold;
	font-style:normal;
	font-size:22pt;
	font-family:Serif;
	margin-top:20%;
	margin-left: 5%;
	margin-right: 5%;
	text-indent:0px;}

p.publ {
	font-variant:small-caps;
	text-align:center;
	font-style:normal;
	font-size:14pt;
	font-family:Serif;
	margin-top:40%;
	text-indent:0px;} 
</style>
			</head>
			<body>
<p class="autore"><xsl:value-of select="/TEI.2/teiHeader/fileDesc/titleStmt/author"/></p>
<p class="titolo"><xsl:value-of select="/TEI.2/teiHeader/fileDesc/titleStmt/title"/></p>
<p class="publ"><xsl:value-of select="/TEI.2/teiHeader/fileDesc/publicationStmt/publisher"/></p>
				<xsl:apply-templates/>
			</body>
		</html>
	</xsl:template>
	<xsl:template match="teiHeader"/>
	<xsl:template match="text">
		<xsl:apply-templates/>
	</xsl:template>
	<xsl:template match="front"/>
	<xsl:template match="body">
		<xsl:apply-templates/>
	</xsl:template>
	<xsl:template match="div0">
		<xsl:apply-templates/>
	</xsl:template>
	<xsl:template match="div0/p"/>
	<xsl:template match="div1">
		<div class="cap" id="{@id}">
			<xsl:apply-templates/>
		</div>
	</xsl:template>
	<xsl:template match="head[@type='ord']">
		<h1>
			<xsl:apply-templates/>
		</h1>
	</xsl:template>
	<xsl:template match="head[@type='tem']">
		<h2>
			<xsl:apply-templates/>
		</h2>
		<br/>
	</xsl:template>
	<xsl:template match="head[@type='conv']">
		<h2>
			<xsl:apply-templates/>
		</h2>
		<br/>
	</xsl:template>
	<xsl:template match="p">
		<p>
			<xsl:apply-templates/>
		</p>
	</xsl:template>
	<xsl:template match="div[@type='nota']">
		<div class="cap" id="{@id}">
			<xsl:apply-templates/>
		</div>
	</xsl:template>
	<xsl:template match="q[@type='citazione']" priority="1">
		<xsl:choose>
			<xsl:when test="@rend='bloc'">
				<blockquote>
					<xsl:apply-templates/>
				</blockquote>
			</xsl:when>
			<xsl:when test="@rend='italic'">
				<cite class="italic">
					<xsl:apply-templates/>
				</cite>
			</xsl:when>
			<xsl:otherwise>
				<cite>
					<xsl:apply-templates/>
				</cite>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template match="l">
		<xsl:apply-templates/>
		<br/>
	</xsl:template>
	<xsl:template match="lb">
		<br/>
	</xsl:template>
	<xsl:template match="*[@rend='bloc']">
		<div class="bloc">
			<xsl:apply-templates/>
		</div>
	</xsl:template>
	<xsl:template match="*[@rend='italic']">
		<span class="italic">
			<xsl:apply-templates/>
		</span>
	</xsl:template>
</xsl:stylesheet>