Changeset 93:5b55827de220 for šablona/makra/odkazy.xsl
- Timestamp:
- 02/09/12 14:52:20 (12 years ago)
- Branch:
- default
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
šablona/makra/odkazy.xsl
r87 r93 20 20 xmlns="http://www.w3.org/1999/xhtml" 21 21 xmlns:m="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/makro" 22 xmlns:k="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/konfigurace" 22 23 xmlns:xs="http://www.w3.org/2001/XMLSchema" 23 24 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 24 exclude-result-prefixes="m xs">25 exclude-result-prefixes="m k xs"> 25 26 26 27 <!-- … … 97 98 </xsl:call-template> 98 99 </xsl:template> 99 100 100 101 <!-- 101 102 Wikipedia … … 115 116 </xsl:call-template> 116 117 </xsl:template> 117 118 118 119 <!-- 119 120 Javadoc … … 134 135 </xsl:call-template> 135 136 </xsl:template> 136 137 137 138 <!-- 138 139 Seznam.cz … … 168 169 </xsl:call-template> 169 170 </xsl:template> 170 171 171 172 <!-- 172 173 Request for comments … … 185 186 </xsl:call-template> 186 187 </xsl:template> 187 188 188 189 <!-- 190 E-mail 191 ****** 192 Odkaz na e-mail v „obfuskovaném“ tvaru, 193 aby spamovací roboti nemohli tak snadno sbírat e-mailové adresy z webů. 194 Ale zároveň klikatelný, aby ho uživatel nemusel opisovat (vyžaduje JavaScript). 195 Obsah elementu je nepovinný – pokud chybí, vloží se e-mailová adresa. 196 * 197 @href e-mailová adresa (bez „mailto:“) 198 --> 199 <xsl:template match="m:a[@typ='email']"> 200 <xsl:variable name="česky" select="replace(replace(@href, '@', ' zavináč '), '\.', ' tečka ')"/> 201 <xsl:variable name="klíč" select="concat(tokenize($konfigurace/k:web/k:uuid/text(), '-')[1], '9df1')"/> 202 <xsl:variable name="pořadí"><xsl:number level="any"/></xsl:variable> 203 <xsl:variable name="idSpanu" select="concat('c', $klíč, $pořadí)"/> 204 <span title="{text()}" id="{$idSpanu}"> 205 <xsl:value-of select="$česky"/> 206 </span> 207 <span id="{$idSpanu}b" style="display: none"> 208 <xsl:apply-templates/> 209 </span> 210 <script type="text/javascript"> 211 xwg.odkazNaElektronickouPoštu("<xsl:value-of select="$idSpanu"/>"); 212 </script> 213 </xsl:template> 214 215 189 216 <xsl:template name="vložOdkaz"> 190 217 <xsl:param name="url"/>