Home
TeamSite
XSL Appearance to get domain name
work4u
I am using the following in my XSL to retrieve the domain name
<div>
<xsl:variable name="output" select="'$CONTEXT{parameters}'"/>
Out: <xsl:value-of select="$output"/><br/>
<xsl:choose>
<xsl:when test="contains($output, 'iw_domain')" >
true
<xsl:variable name="afterOut" select="substring-after($output, 'iw_domain=')"/>
<xsl:variable name="beforeOut" select="substring-before($afterOut, 'IWAUTH')"/>
<xsl:variable name="serverName" select="substring-before($beforeOut, ';')"/>
Server Name : <xsl:copy-of select="$serverName"/>
</xsl:when>
</xsl:choose>
</div>
When I see the output the string has the iw_domain and if I copy the string and run it locally against the XSL it works great. However within the component the statement contains does not match.
Please any ideas.
Find more posts tagged with
Comments
Stokes
Just ran into this problem myself. Pounded a long time before finding out the
$CONTEXT
tokens are evaluated
after
the XSL is processed. So to do conditions in your XSL based on context values, you have to have a Java External put those values into the XML model.
Stokes.
work4u
Please if you be kind enough to share some details about your solution and provide some steps. I tried what you suggested but was not succesful.
Thanks