You’re defining $search__url
inside the choose
, it won’t be defined outside it. Try rearranging your elements:
<xsl:variable name="search__url">
<xsl:choose>
<xsl:when test="$search_resource = 'people'"><xsl:value-of select="$search_url"/>employees</xsl:when>
<xsl:otherwise><xsl:value-of select="$search_url"/>otherwise</xsl:otherwise>
</xsl:choose>
</xsl:variable>
I left the otherwise
string inside the <xsl:otherwise/>
but I’m not sure if you intended that. Also, it’s pretty confusing that you’re defining $search__url
based in part on $search_url
, you might want to use more expressive variable names.