Pro tvorbu tabulek #15 se bude používat tabulátor (místo středníku).
--- a/vstup/služby.xml Thu Jan 05 16:00:01 2012 +0100
+++ b/vstup/služby.xml Thu Jan 05 16:19:22 2012 +0100
@@ -14,10 +14,10 @@
<p>Fusce eu libero sit amet mauris molestie suscipit. Integer porttitor euismod luctus. Sed elementum quam et quam pharetra tincidunt. Pellentesque vitae augue quis mi blandit dapibus. Vestibulum iaculis magna sit amet nisl tristique at consectetur odio blandit. Proin aliquam lectus ac arcu condimentum tempus. Suspendisse potenti. Suspendisse porttitor euismod accumsan. Sed nibh lacus, laoreet id consequat gravida, eleifend eget lectus. Curabitur accumsan, nisi at elementum aliquam, nisl nulla volutpat lorem, ac elementum metus lacus eget lectus. Praesent odio nulla, porttitor vitae hendrerit vel, ullamcorper in velit. Sed in est ipsum, iaculis accumsan sem. Integer pretium ultrices justo a mattis. Nullam id lacus in lectus bibendum tempor. Nulla non viverra eros. Praesent scelerisque, nisi et placerat convallis, nisi nulla lobortis mauris, eu ultricies est mi ac orci. Suspendisse ullamcorper dapibus interdum. Curabitur ac metus eros, sed venenatis sapien.</p>
<m:tabulka>
- Velikost ptáka;Cena za jedno krmení
- malý;250
- střední;500
- velký;1000
+ Velikost ptáka Cena za jedno krmení
+ malý 250
+ střední 500
+ velký 1000
</m:tabulka>
<p>Dodáváme pouze prvotřídní krmivo.</p>
--- a/šablona/stránka.xsl Thu Jan 05 16:00:01 2012 +0100
+++ b/šablona/stránka.xsl Thu Jan 05 16:19:22 2012 +0100
@@ -227,8 +227,10 @@
<xsl:variable name="tělo" select="substring-after($data, ' ')"/>
<thead>
<tr>
- <xsl:for-each select="tokenize($hlavička, ';')">
- <td><xsl:value-of select="normalize-space(.)"/></td>
+ <xsl:for-each select="tokenize($hlavička, '\t')">
+ <xsl:if test="normalize-space(.)">
+ <td><xsl:value-of select="normalize-space(.)"/></td>
+ </xsl:if>
</xsl:for-each>
</tr>
</thead>
@@ -236,8 +238,10 @@
<xsl:for-each select="tokenize($tělo, '\n')">
<xsl:if test="normalize-space(.)">
<tr>
- <xsl:for-each select="tokenize(., ';')">
- <td><xsl:value-of select="normalize-space(.)"/></td>
+ <xsl:for-each select="tokenize(., '\t')">
+ <xsl:if test="normalize-space(.)">
+ <td><xsl:value-of select="normalize-space(.)"/></td>
+ </xsl:if>
</xsl:for-each>
</tr>
</xsl:if>