templates/ssm.epub.xsl
author František Kučera <franta-hg@frantovo.cz>
Fri, 10 May 2024 00:10:08 +0200
branchv_0
changeset 82 a11239f9f9e7
parent 81 47717a4ed4bb
permissions -rw-r--r--
EPUB: move Preamble to the same level as other chapters
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
81
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     1
<?xml version="1.0" encoding="UTF-8"?>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     2
<!--
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     3
	Sane software manifesto helper tools
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     4
	Copyright © 2019-2024 František Kučera (Frantovo.cz, GlobalCode.info)
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     5
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     6
	This program is free software: you can redistribute it and/or modify
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     7
	it under the terms of the GNU General Public License as published by
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     8
	the Free Software Foundation, version 3.
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     9
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    10
	This program is distributed in the hope that it will be useful,
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    11
	but WITHOUT ANY WARRANTY; without even the implied warranty of
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    12
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    13
	GNU General Public License for more details.
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    14
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    15
	You should have received a copy of the GNU General Public License
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    16
	along with this program.  If not, see <https://www.gnu.org/licenses/>.
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    17
-->
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    18
<xsl:stylesheet
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    19
	version="1.0"
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    20
	xmlns="http://www.w3.org/1999/xhtml"
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    21
	xmlns:h="http://www.w3.org/1999/xhtml"
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    22
	xmlns:m="tag:globalcode.info,2019:sane-software/manifesto"
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    23
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    24
	xmlns:fn="http://www.w3.org/2005/xpath-functions"
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    25
	xmlns:xs="http://www.w3.org/2001/XMLSchema"
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    26
	xmlns:exsl="http://exslt.org/common"
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    27
	extension-element-prefixes="exsl"
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    28
	exclude-result-prefixes="fn h m xs exsl"
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    29
>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    30
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    31
	<xsl:import href="ssm.xhtml.xsl"/>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    32
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    33
	<xsl:output
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    34
		method="xml"
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    35
		indent="yes"
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    36
		encoding="UTF-8"
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    37
	/>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    38
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    39
	<xsl:template match="/m:manifesto">
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    40
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    41
		<exsl:document href="META-INF/container.xml">
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    42
			<container
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    43
				xmlns="urn:oasis:names:tc:opendocument:xmlns:container"
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    44
				version="1.0"
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    45
			>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    46
				<rootfiles>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    47
					<rootfile
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    48
						full-path="OEBPS/content.opf"
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    49
						media-type="application/oebps-package+xml"
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    50
					/>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    51
				</rootfiles>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    52
			</container>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    53
		</exsl:document>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    54
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    55
		<exsl:document href="OEBPS/content.opf">
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    56
			<package
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    57
				xmlns="http://www.idpf.org/2007/opf"
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    58
				version="2.0"
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    59
				unique-identifier="bookid"
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    60
			>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    61
				<metadata>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    62
					<dc:identifier
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    63
						xmlns:dc="http://purl.org/dc/elements/1.1/"
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    64
						id="bookid"
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    65
					>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    66
						<xsl:value-of select="m:id"/>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    67
					</dc:identifier>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    68
					<dc:title xmlns:dc="http://purl.org/dc/elements/1.1/">
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    69
						<xsl:value-of select="m:title"/>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    70
					</dc:title>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    71
					<dc:language xmlns:dc="http://purl.org/dc/elements/1.1/">
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    72
						en
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    73
					</dc:language>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    74
				</metadata>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    75
				<manifest>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    76
					<xsl:for-each select="m:chapter">
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    77
						<item
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    78
							id="{m:id}"
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    79
							href="{m:id}.xhtml"
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    80
							media-type="application/xhtml+xml"/>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    81
					</xsl:for-each>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    82
					<item
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    83
						id="ncxtoc"
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    84
						media-type="application/x-dtbncx+xml"
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    85
						href="toc.ncx"/>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    86
					<item
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    87
						id="style_css"
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    88
						media-type="text/css"
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    89
						href="style.css"/>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    90
					<item
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    91
						id="cmunrm_woff"
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    92
						media-type="font/woff"
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    93
						href="cmunrm.woff"/>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    94
					<item
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    95
						id="cmunbx_woff"
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    96
						media-type="font/woff"
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    97
						href="cmunbx.woff"/>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    98
					<item
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    99
						id="htmltoc"
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   100
						media-type="application/xhtml+xml"
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   101
						href="index.xhtml"/>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   102
				</manifest>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   103
				<spine toc="ncxtoc">
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   104
					<itemref idref="htmltoc" linear="yes"/>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   105
					<xsl:for-each select="m:chapter">
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   106
						<itemref idref="{m:id}"/>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   107
					</xsl:for-each>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   108
				</spine>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   109
				<guide>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   110
					<reference
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   111
						href="index.xhtml"
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   112
						type="toc"
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   113
						title="Table of Contents"/>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   114
				</guide>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   115
			</package>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   116
		</exsl:document>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   117
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   118
		<exsl:document href="OEBPS/toc.ncx">
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   119
			<ncx xmlns="http://www.daisy.org/z3986/2005/ncx/" version="2005-1">
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   120
				<head>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   121
					<meta name="dtb:uid" content="{m:id}"/>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   122
				</head>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   123
				<docTitle>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   124
					<text>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   125
						<xsl:value-of select="m:title"/>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   126
					</text>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   127
				</docTitle>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   128
				<navMap>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   129
					<navPoint id="{m:id}_preamble" playOrder="1">
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   130
						<navLabel>
82
a11239f9f9e7 EPUB: move Preamble to the same level as other chapters
František Kučera <franta-hg@frantovo.cz>
parents: 81
diff changeset
   131
							<text>Preamble</text>
81
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   132
						</navLabel>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   133
						<content src="index.xhtml"/>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   134
					</navPoint>
82
a11239f9f9e7 EPUB: move Preamble to the same level as other chapters
František Kučera <franta-hg@frantovo.cz>
parents: 81
diff changeset
   135
					<xsl:for-each select="m:chapter">
a11239f9f9e7 EPUB: move Preamble to the same level as other chapters
František Kučera <franta-hg@frantovo.cz>
parents: 81
diff changeset
   136
						<navPoint
a11239f9f9e7 EPUB: move Preamble to the same level as other chapters
František Kučera <franta-hg@frantovo.cz>
parents: 81
diff changeset
   137
							id="{m:id}"
a11239f9f9e7 EPUB: move Preamble to the same level as other chapters
František Kučera <franta-hg@frantovo.cz>
parents: 81
diff changeset
   138
							playOrder="{count(preceding::m:chapter)+2}"
a11239f9f9e7 EPUB: move Preamble to the same level as other chapters
František Kučera <franta-hg@frantovo.cz>
parents: 81
diff changeset
   139
						>
a11239f9f9e7 EPUB: move Preamble to the same level as other chapters
František Kučera <franta-hg@frantovo.cz>
parents: 81
diff changeset
   140
							<navLabel>
a11239f9f9e7 EPUB: move Preamble to the same level as other chapters
František Kučera <franta-hg@frantovo.cz>
parents: 81
diff changeset
   141
								<text>
a11239f9f9e7 EPUB: move Preamble to the same level as other chapters
František Kučera <franta-hg@frantovo.cz>
parents: 81
diff changeset
   142
									<xsl:value-of select="m:name"/>
a11239f9f9e7 EPUB: move Preamble to the same level as other chapters
František Kučera <franta-hg@frantovo.cz>
parents: 81
diff changeset
   143
								</text>
a11239f9f9e7 EPUB: move Preamble to the same level as other chapters
František Kučera <franta-hg@frantovo.cz>
parents: 81
diff changeset
   144
							</navLabel>
a11239f9f9e7 EPUB: move Preamble to the same level as other chapters
František Kučera <franta-hg@frantovo.cz>
parents: 81
diff changeset
   145
							<content src="{m:id}.xhtml"/>
a11239f9f9e7 EPUB: move Preamble to the same level as other chapters
František Kučera <franta-hg@frantovo.cz>
parents: 81
diff changeset
   146
						</navPoint>
a11239f9f9e7 EPUB: move Preamble to the same level as other chapters
František Kučera <franta-hg@frantovo.cz>
parents: 81
diff changeset
   147
					</xsl:for-each>
81
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   148
				</navMap>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   149
			</ncx>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   150
		</exsl:document>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   151
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   152
		<exsl:document href="OEBPS/index.xhtml">
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   153
			<html>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   154
				<head>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   155
					<title>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   156
						<xsl:value-of select="m:title"/>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   157
					</title>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   158
					<link href="style.css" 	type="text/css" rel="StyleSheet"/>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   159
				</head>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   160
				<body>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   161
					<div id="content">
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   162
						<h1>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   163
							<xsl:value-of select="m:title"/>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   164
						</h1>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   165
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   166
						<xsl:call-template name="versionParagraph"/>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   167
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   168
						<p>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   169
							<xsl:value-of select="m:preamble"/>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   170
						</p>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   171
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   172
						<p>Table of contents:</p>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   173
						<ul>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   174
							<xsl:for-each select="m:chapter">
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   175
								<li>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   176
									<a href="{m:id}.xhtml">
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   177
										<xsl:value-of select="m:name"/>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   178
									</a>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   179
								</li>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   180
							</xsl:for-each>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   181
						</ul>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   182
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   183
						<xsl:call-template name="footerEPUB"/>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   184
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   185
					</div>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   186
				</body>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   187
			</html>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   188
		</exsl:document>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   189
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   190
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   191
		<xsl:for-each select="m:chapter">
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   192
			<exsl:document href="OEBPS/{m:id}.xhtml">
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   193
				<html>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   194
					<head>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   195
						<title>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   196
							<xsl:value-of select="m:name"/>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   197
						</title>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   198
						<link
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   199
							href="style.css"
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   200
							type="text/css"
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   201
							rel="StyleSheet"/>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   202
					</head>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   203
					<body>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   204
						<div id="content">
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   205
							<h1>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   206
								<xsl:value-of select="/m:manifesto/m:title"/>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   207
							</h1>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   208
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   209
							<h2>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   210
								<xsl:value-of select="m:name"/>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   211
							</h2>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   212
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   213
							<ul>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   214
								<xsl:apply-templates select="m:item"/>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   215
							</ul>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   216
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   217
							<xsl:call-template name="footerEPUB"/>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   218
						</div>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   219
					</body>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   220
				</html>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   221
			</exsl:document>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   222
		</xsl:for-each>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   223
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   224
	</xsl:template>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   225
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   226
	<xsl:template name="footerEPUB">
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   227
		<xsl:call-template name="footer">
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   228
			<!-- We need absolute URL in EPUB. -->
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   229
			<!-- Or maybe attach PDF and TXT inside EPUB? -->
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   230
			<xsl:with-param name="otherFormatsURL">
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   231
				https://sane-software.globalcode.info/v_0/
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   232
			</xsl:with-param>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   233
		</xsl:call-template>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   234
	</xsl:template>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   235
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   236
	<xsl:template match="m:item">
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   237
		<li id="{m:id}" class="{m:type}">
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   238
			<xsl:apply-templates select="m:text"/>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   239
			<xsl:if test="m:item">
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   240
				<ul>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   241
					<xsl:apply-templates select="m:item"/>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   242
				</ul>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   243
			</xsl:if>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   244
		</li>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   245
	</xsl:template>
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   246
47717a4ed4bb add EPUB (eBook) output
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
   247
</xsl:stylesheet>