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