Here is my XSLT:
<xsl:choose>
<xsl:when test="string-length(/*/location/name)">
<xsl:variable name="pagurl">/location/<xsl:value-of select="/*/location/@id" />comments</xsl:variable>
</xsl:when>
<xsl:otherwise>
<xsl:variable name="pagurl">/state/<xsl:value-of select="/*/state/@code" />/comments</xsl:variable>
</xsl:otherwise>
</xsl:choose>
<div class="pagination_outer" id="pager">
<xsl:call-template name="pagination">
<xsl:with-param name="url"><xsl:value-of select="$pagurl"/></xsl:with-param>
</xsl:call-template>
</div>
I am doing the following:
- Assigning a variable
$pagurl
to a value based on a string length. - Trying to use the variable inside the call
<xsl:with-param name="url"><xsl:value-of select="$pagurl"/></xsl:with-param>
When I include this call the page never seems to finish loading however when I do not use it the page loads just fine. I imagine there's an error in my usage of this.
I do not think it's necessary to see the pagination template
as it works fine if I hardcode a value.
Suggestions?