I have to create an xsl variable with a choose in it. Like the following:
<xsl:variable name="grid_position">
<xsl:choose>
<xsl:when test="count(/Element) >= 1">
inside
</xsl:when>
<xsl:otherwise>
outside
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
And later in my code, I do an xsl if:
<xsl:if test="$grid_position = 'inside'">
{...code...}
</xsl:if>
Problem is that my variable is never = 'inside' because of the line breaks and indent. How can I remove whitespaces from my variable? I know I can remove it using disable-output-escaping="yes"
when I use it in a xsl:copy-of, but it's not working on the xsl:variable tag. So how can I remove those whitespace and line breaks?