Let s say I have an XML document that has this:
<keywords>
<keyword>test</keyword>
<keyword>test2</keyword>
<keyword>test3</keyword>
<keyword>test4</keyword>
</keywords>
And i want to use XSLT to print it out in HTML like this:
<ul>
<li>test</li>
<li>test2</li>
<li>test3</li>
<li>test4</li>
</ul>
What would my XSLT look like? I tried this:
<ul>
<xsl:for-each select="keywords/keyword">
<li><xsl:value-of select="keyword"/></li>
</xsl:for-each>
</ul>
but that doesn t print out the keyword value, just a blank item.
<ul>
<xsl:for-each select="keywords">
<li><xsl:value-of select="keyword"/></li>
</xsl:for-each>
</ul>
doesn t work (for obvious reasons), but at least it prints the first keyword!
suggestions? thanks!