217 | | </xsl:for-each> |
218 | | </xsl:template> |
219 | | |
| 217 | </xsl:for-each> |
| 218 | </xsl:template> |
| 219 | |
| 220 | <!-- |
| 221 | Makro pro jednoduché tabulky |
| 222 | --> |
| 223 | <xsl:template match="m:tabulka"> |
| 224 | <table> |
| 225 | <xsl:variable name="data" select="replace(replace(text(), '^\s+', ''),'\s+$','')"/> |
| 226 | <xsl:variable name="hlavička" select="substring-before($data, ' ')"/> |
| 227 | <xsl:variable name="tělo" select="substring-after($data, ' ')"/> |
| 228 | <thead> |
| 229 | <tr> |
| 230 | <xsl:for-each select="tokenize($hlavička, ';')"> |
| 231 | <td><xsl:value-of select="normalize-space(.)"/></td> |
| 232 | </xsl:for-each> |
| 233 | </tr> |
| 234 | </thead> |
| 235 | <tbody> |
| 236 | <xsl:for-each select="tokenize($tělo, '\n')"> |
| 237 | <xsl:if test="normalize-space(.)"> |
| 238 | <tr> |
| 239 | <xsl:for-each select="tokenize(., ';')"> |
| 240 | <td><xsl:value-of select="normalize-space(.)"/></td> |
| 241 | </xsl:for-each> |
| 242 | </tr> |
| 243 | </xsl:if> |
| 244 | </xsl:for-each> |
| 245 | </tbody> |
| 246 | </table> |
| 247 | </xsl:template> |