1 <?xml version="1.0" encoding="UTF-8"?>
2 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:wl="http://wolnelektury.pl/functions">
3 <xsl:output method="html" version="1.0" omit-xml-declaration="no" />
5 <xsl:template match="/">
6 <package xmlns="http://www.idpf.org/2007/opf" unique-identifier="BookId" version="2.0">
7 <metadata xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:opf="http://www.idpf.org/2007/opf">
8 <xsl:apply-templates select="//dc:title" />
10 <xsl:apply-templates select="//dc:language" mode="language" />
12 <dc:identifier id="BookId" opf:scheme="URI">
13 <xsl:apply-templates select="//dc:identifier.url" />
16 <xsl:apply-templates select="//dc:identifier.url" />
18 <dc:creator opf:role="aut">
19 <xsl:attribute name="opf:file-as">
20 <xsl:value-of select="//dc:creator" />
22 <xsl:for-each select="//dc:creator/text()">
23 <xsl:value-of select="wl:person_name(.)"/>
24 <xsl:if test="not(position() = last())">, </xsl:if>
28 <xsl:for-each select="//dc:publisher/text()">
29 <xsl:value-of select="."/>
30 <xsl:if test="not(position() = last())">; </xsl:if>
33 <dc:date opf:event="publication">
34 <xsl:apply-templates select="//dc:date" />
38 <item id="toc" href="toc.ncx" media-type="application/x-dtbncx+xml" />
39 <item id="style" href="style.css" media-type="text/css" />
40 <item id="titlePage" href="title.html" media-type="application/xhtml+xml" />
41 <item id="logo_wolnelektury" href="logo_wolnelektury.png" media-type="image/png" />
42 <item id="jedenprocent" href="jedenprocent.png" media-type="image/png" />
45 <itemref idref="titlePage" />
48 <reference type="text" title="PoczÄ…tek" href="part1.html" />
53 <xsl:template match="dc:title" >
55 <xsl:value-of select="." />
59 <xsl:template match="text()" mode="person">
60 <xsl:value-of select="wl:person_name(.)" />
63 <xsl:template match="text()" mode="language">
64 <xsl:value-of select="wl:lang_code_3to2(.)" />