I have a simple xml file like
<?xml version="1.0" encoding="UTF-8"?>
<tag>Funny</tag>
<tag>Hilarious</tag>
<tag>Stupid</tag>
I am having difficulty constructing a XSLT file without a parent node. Is it possible to do this?
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl"
>
<xsl:output method="html" indent="yes"/>
<xsl:template match="/" >
<body>
<xsl:apply-templates select ="tags/tag"/>
</body>
</xsl:template>
<xsl:template match="tag" >
<li>
<a>
<xsl:attribute name="href">
album.aspx/<xsl:value-of select="." />
</xsl:attribute>
<xsl:value-of select="."/>
</a>
</li>
I have to enclose my xml with XML for this xslt to work.