X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/10430ce6805296c89ac4cefd2943d9902cd8aa26..bf967b9c45fe221b88a251e2a754212bb175189e:/lib/librarian/book2html.xslt?ds=inline diff --git a/lib/librarian/book2html.xslt b/lib/librarian/book2html.xslt index f22c97842..c8cf2c979 100644 --- a/lib/librarian/book2html.xslt +++ b/lib/librarian/book2html.xslt @@ -1,17 +1,18 @@ <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:wl="http://wolnelektury.pl/functions" > -<xsl:output method="xml" encoding="utf-8" doctype-public="-//W3C//DTD XHTML 1.1//EN" doctype-system="http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd" indent="yes" /> +<xsl:output encoding="utf-8" indent="yes" omit-xml-declaration = "yes" /> <xsl:template match="utwor"> - <html> + <!-- <html> <head> <title>book2html output</title> <meta http-equiv="content-type" content="text/html;charset=utf-8"/> <link rel="stylesheet" href="master.css" type="text/css" media="all" charset="utf-8" /> </head> - <body> + <body> --> + <div id="book-text"> <xsl:apply-templates select="powiesc|opowiadanie|liryka_l|liryka_lp|dramat_wierszowany_l|dramat_wierszowany_lp|dramat_wspolczesny" /> <xsl:if test="count(descendant::*[self::pe or self::pa or self::pr or self::pt][not(parent::extra)])"> <div id="footnotes"> @@ -32,8 +33,9 @@ </xsl:for-each> </div> </xsl:if> - </body> - </html> + </div> + <!-- </body> + </html> --> </xsl:template> @@ -169,7 +171,7 @@ <xsl:template name="verse"> <xsl:param name="line-content" /> <xsl:param name="line-number" /> - <p> + <p class="verse"> <xsl:choose> <xsl:when test="name($line-content) = 'wers_akap'"> <xsl:attribute name="style">padding-left: 1em</xsl:attribute> @@ -197,6 +199,33 @@ <a href="{concat('#footnote-', generate-id(.))}" class="annotation">[<xsl:number value="count(preceding::*[self::pa or self::pe or self::pr or self::pt]) + 1" />]</a> </xsl:template> +<!-- Other inline tags --> +<xsl:template match="mat" mode="inline"> + <em class="math"><xsl:apply-templates mode="inline" /></em> +</xsl:template> + +<xsl:template match="didask_tekst" mode="inline"> + <em class="didaskalia"><xsl:apply-templates mode="inline" /></em> +</xsl:template> + +<xsl:template match="slowo_obce" mode="inline"> + <em class="foreign-word"><xsl:apply-templates mode="inline" /></em> +</xsl:template> + +<xsl:template match="tytul_dziela" mode="inline"> + <em class="book-title"> + <xsl:if test="@typ = '1'">â</xsl:if><xsl:apply-templates mode="inline" /><xsl:if test="@typ = '1'">â</xsl:if> + </em> +</xsl:template> + +<xsl:template match="wyroznienie" mode="inline"> + <em class="author-emphasis"><xsl:apply-templates mode="inline" /></em> +</xsl:template> + +<xsl:template match="osoba" mode="inline"> + <em class="person"><xsl:apply-templates mode="inline" /></em> +</xsl:template> + <!-- ============================================== --> <!-- = STANDALONE TAGS = --> @@ -206,6 +235,14 @@ <hr class="spacer" /> </xsl:template> +<xsl:template match="sekcja_asterysk"> + <p class="spacer-asterisk">*</p> +</xsl:template> + +<xsl:template match="separator_linia"> + <hr class="spacer-line" /> +</xsl:template> + <!-- ================ --> <!-- = SPECIAL TAGS = --> @@ -213,9 +250,9 @@ <!-- Themes --> <xsl:template match="begin" mode="inline"> <xsl:variable name="mnum" select="concat('m', substring(@id, 2))" /> - <span class="theme-begin" fid="{substring(@id, 2)}"> + <a name="m{substring(@id, 2)}" class="theme-begin" fid="{substring(@id, 2)}"> <xsl:value-of select="string(following::motyw[@id=$mnum]/text())" /> - </span> + </a> </xsl:template> <xsl:template match="end" mode="inline">