I'm trying to add a little more logic to the following template named "drawcell" specifically to the "target" attribute within <a>. If the value within the DOCUMENT_URL column row contains "sirepub", I'd like the value to be "_blank", otherwise the value should be "_self". The param $document_url has been defined as DOCUMENT_URL (a column name in a SQL database). Currently, the results being returned show the target within the <a> as target="". Neither _blank or _self are being added. Is this even doable using XSLT? Here's my code.
<xsl:template name="drawcell">
<xslaram name="meta"/>
<xslaram name="linkfield"/>
<xslaram name="document_url"/>
<td valign="top">
<xsl:if test="$linkfield=$meta">
<a>
<xsl:attribute name="href">
<xsl:value-of select="MT[@N='DOCUMENT_URL']/@V"/>
</xsl:attribute>
<xsl:attribute name="target">
<xsl:choose>
<xsl:when test="$meta=$document_url and contains(/@value, 'sirepub')">
<xsl:value-of select="_blank" />
</xsl:when>
<xsltherwise>
<xsl:value-of select="_self"/>
</xsltherwise>
</xsl:choose>
</xsl:attribute>
</a>
</xsl:if>
</td>
</xsl:template>
<xsl:template name="drawcell">
<xslaram name="meta"/>
<xslaram name="linkfield"/>
<xslaram name="document_url"/>
<td valign="top">
<xsl:if test="$linkfield=$meta">
<a>
<xsl:attribute name="href">
<xsl:value-of select="MT[@N='DOCUMENT_URL']/@V"/>
</xsl:attribute>
<xsl:attribute name="target">
<xsl:choose>
<xsl:when test="$meta=$document_url and contains(/@value, 'sirepub')">
<xsl:value-of select="_blank" />
</xsl:when>
<xsltherwise>
<xsl:value-of select="_self"/>
</xsltherwise>
</xsl:choose>
</xsl:attribute>
</a>
</xsl:if>
</td>
</xsl:template>