This "$PAGE_SCOPE[title]" will display the title of the page i want to display different headlines based on the title so i am trying to get the page title in a variable, this variable is displaying the title in the paragraph tag but it's not working in the when loop.
<xsl:variable name="PageTitle" select="'$PAGE_SCOPE[title]'" />
<xsl:variable name="test"><xsl:value-of select="$PageTitle" /></xsl:variable>
<p><xsl:value-of select="$test" /></p>
<xsl:choose>
<xsl:when test="$test='RAQ'">
<h1 class="h3"><strong>.....</strong></h1>
</xsl:when>
<xsl:otherwise>
<h1 class="h3"><strong>Error</strong></h1>
</xsl:otherwise>
</xsl:choose>
any pointers would be helpful.
Assuming that $PAGE_SCOPE[title] works and does what it's supposed to normally (the quote marks above are kind of strange), is this actually returning an element? If it's returning a string value, then this should be working, but if the value of your variable is actually a node, then this would likely explain your issue.
Try using
string($test)for your comparison instead. Also, you might consider adding anormalize-space()just to make sure you don't have any white space that's shown up unexpectedly.