šablona/makra/podČarou.xsl
author František Kučera <franta-hg@frantovo.cz>
Sat, 23 Jun 2012 19:22:21 +0200
changeset 95 eea9c4713045
parent 91 1a70b4045a19
child 136 d5feb9d8ebc3
permissions -rw-r--r--
#20 Skriptování: podpora výstupu ve formátu XML (musí být validní)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
91
1a70b4045a19 Poznámky pod čarou.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     1
<?xml version="1.0" encoding="UTF-8"?>
1a70b4045a19 Poznámky pod čarou.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     2
<!--
1a70b4045a19 Poznámky pod čarou.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     3
XML Web generátor – program na generování webových stránek
1a70b4045a19 Poznámky pod čarou.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     4
Copyright © 2012 František Kučera (frantovo.cz)
1a70b4045a19 Poznámky pod čarou.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     5
1a70b4045a19 Poznámky pod čarou.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     6
This program is free software: you can redistribute it and/or modify
1a70b4045a19 Poznámky pod čarou.
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
1a70b4045a19 Poznámky pod čarou.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     8
the Free Software Foundation, either version 3 of the License, or
1a70b4045a19 Poznámky pod čarou.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     9
(at your option) any later version.
1a70b4045a19 Poznámky pod čarou.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    10
1a70b4045a19 Poznámky pod čarou.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    11
This program is distributed in the hope that it will be useful,
1a70b4045a19 Poznámky pod čarou.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    12
but WITHOUT ANY WARRANTY; without even the implied warranty of
1a70b4045a19 Poznámky pod čarou.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1a70b4045a19 Poznámky pod čarou.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    14
GNU General Public License for more details.
1a70b4045a19 Poznámky pod čarou.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    15
1a70b4045a19 Poznámky pod čarou.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    16
You should have received a copy of the GNU General Public License
1a70b4045a19 Poznámky pod čarou.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    17
along with this program.  If not, see <http://www.gnu.org/licenses/>.
1a70b4045a19 Poznámky pod čarou.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    18
-->
1a70b4045a19 Poznámky pod čarou.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    19
<xsl:stylesheet version="2.0"
1a70b4045a19 Poznámky pod čarou.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    20
	xmlns="http://www.w3.org/1999/xhtml"
1a70b4045a19 Poznámky pod čarou.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    21
	xmlns:m="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/makro"
1a70b4045a19 Poznámky pod čarou.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    22
	xmlns:xs="http://www.w3.org/2001/XMLSchema"
1a70b4045a19 Poznámky pod čarou.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    23
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
1a70b4045a19 Poznámky pod čarou.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    24
	exclude-result-prefixes="m xs">
1a70b4045a19 Poznámky pod čarou.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    25
1a70b4045a19 Poznámky pod čarou.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    26
	<!--
1a70b4045a19 Poznámky pod čarou.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    27
		Poznámky pod čarou
1a70b4045a19 Poznámky pod čarou.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    28
		******************
1a70b4045a19 Poznámky pod čarou.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    29
		Vloží do textu číslo (odkaz) a obsah elementu dá až na konec stránky pod čáru.
1a70b4045a19 Poznámky pod čarou.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    30
		Z poznámek vede také zpětný odkaz na místo, odkud bylo odkazováno.
1a70b4045a19 Poznámky pod čarou.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    31
		*
1a70b4045a19 Poznámky pod čarou.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    32
	-->
1a70b4045a19 Poznámky pod čarou.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    33
	<xsl:template match="m:podČarou">
1a70b4045a19 Poznámky pod čarou.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    34
		<xsl:variable name="číslo"><xsl:number level="any"/></xsl:variable>
1a70b4045a19 Poznámky pod čarou.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    35
		<sup class="podČarou-odkaz" id="podČarou-odkaz-{$číslo}">
1a70b4045a19 Poznámky pod čarou.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    36
			<a href="#{encode-for-uri('podČarou-poznámka')}-{$číslo}"><xsl:value-of select="$číslo"/></a>
1a70b4045a19 Poznámky pod čarou.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    37
		</sup>
1a70b4045a19 Poznámky pod čarou.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    38
	</xsl:template>
1a70b4045a19 Poznámky pod čarou.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    39
1a70b4045a19 Poznámky pod čarou.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    40
	<xsl:template name="poznámkyPodČarou">
1a70b4045a19 Poznámky pod čarou.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    41
		<xsl:if test="//m:podČarou">
1a70b4045a19 Poznámky pod čarou.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    42
			<div class="podČarou-poznámky" title="Poznámky pod čarou">
1a70b4045a19 Poznámky pod čarou.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    43
				<xsl:for-each select="//m:podČarou">
1a70b4045a19 Poznámky pod čarou.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    44
					<p id="podČarou-poznámka-{position()}">
1a70b4045a19 Poznámky pod čarou.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    45
						<a href="#{encode-for-uri('podČarou-odkaz')}-{position()}" class="podČarou-odkaz-zpět"><xsl:value-of select="position()"/>.</a>
1a70b4045a19 Poznámky pod čarou.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    46
						<xsl:apply-templates/>
1a70b4045a19 Poznámky pod čarou.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    47
					</p>
1a70b4045a19 Poznámky pod čarou.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    48
				</xsl:for-each>
1a70b4045a19 Poznámky pod čarou.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    49
			</div>
1a70b4045a19 Poznámky pod čarou.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    50
		</xsl:if>
1a70b4045a19 Poznámky pod čarou.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    51
	</xsl:template>
1a70b4045a19 Poznámky pod čarou.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    52
1a70b4045a19 Poznámky pod čarou.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    53
</xsl:stylesheet>
1a70b4045a19 Poznámky pod čarou.
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    54