Thanks to this post I've come up with the following template:-
<xsl:variable name="Doc">
<xsl:call-template name="OuterTemplate.GetTitle">
<xsl:with-param name="Title" select="@DocumentLink1"/>
</xsl:call-template>
</xsl:variable>
<a href="{substring-before($Doc,',')}">
<xsl:value-of select="substring-after($Doc,',')" />
</a>
This template is nested in an unorderd list and li tag (see below). Since this code has a physical and visual presence in the html page when no content exists I would like to add the li tags and possibly the ul tags to the template. Can anyone tell me how to accomplish this?
<ul>
<li>
<xsl:variable name="Doc">
<xsl:call-template name="OuterTemplate.GetTitle">
<xsl:with-param name="Title" select="@DocumentLink1"/>
</xsl:call-template>
</xsl:variable>
<a href="{substring-before($Doc,',')}">
<xsl:value-of select="substring-after($Doc,',')"/>
</a>
</li>
<li>
<xsl:variable name="Doc">
<xsl:call-template name="OuterTemplate.GetTitle">
<xsl:with-param name="Title" select="@DocumentLink2"/>
</xsl:call-template>
</xsl:variable>
<a href="{substring-before($Doc,',')}">
<xsl:value-of select="substring-after($Doc,',')"/>
</a>
</li>
<li>
<xsl:variable name="Doc">
<xsl:call-template name="OuterTemplate.GetTitle">
<xsl:with-param name="Title" select="@DocumentLink3"/>
</xsl:call-template>
</xsl:variable>
<a href="{substring-before($Doc,',')}">
<xsl:value-of select="substring-after($Doc,',')"/>
</a>
</li>