Mam kod xml:
<a>
<b>
<c>tekst1</c>
<c>tekst2</c>
</b>
</a>
Chcę to przedstawić w postaci listy:
...
<xsl:template match="/">
<html>
<body>
...
<ul>
<xsl:for-each match="a/b/c">
<li><xsl:value-of select="." /></li>
</xsl:for-each>
</ul>
...
</body>
</html>
</xsl:template>
To działa ładnie. Daje w wyniku:
<ul>
<li>tekst1</li>
<li>tekst2</li>
</ul>
Ale ja potrzebuję ten fragment od listy umieścić w oddzielnym wzorcu. Zrobiłem tak:
...
<xsl:template match="/">
<html>
<body>
...
<xsl:apply-templates match="b" />
...
</body>
</html>
</xsl:template>
<xsl:template match="b">
<ul>
<xsl:for-each match="c">
<li><xsl:value-of select="." /></li>
</xsl:for-each>
</ul>
</xsl:template>
Niestety nie działa. Ktoś może powiedzieć, co robię źle?