• Post Reply Bookmark Topic Watch Topic
  • New Topic

Session variables in XSLT stylesheet  RSS feed

 
Steve Elliser
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to conditionally print a link in some XSLT based on whether or not a particular data element matches part of a regular expression.

My regular expression is stored in a session variable.
Is there any way to reference that variable in an XSLT sheet?

I want to print the following code:

<a><xsl:attribute name="href">
<xsl:value-of select="$contextPath"/>/personnel/faculty/ShowParameters.jsp?StudentID=<xsl:value-of select="STDNT_ID"/>&CourseID=<xsl:value-of select = "$crsid" />&RefNum=<xsl:value-of select = "$refnum" />
</xsl:attribute>
<xsl:value-of select="STDNT_ID"/>
</a>
<!--Peps Individual Report added 2/6/06 Steve Elliser-->
 | 
<a><xsl:attribute name="href">
<xsl:value-of select="$contextPath"/>/personnel/faculty/individualPEPSnew.jsp?StudentID=<xsl:value-of select="STDNT_ID"/>&CourseID=<xsl:value-of select = "$crsid" />&RefNum=<xsl:value-of select = "$refnum" />
</xsl:attribute>
PEPS
</a>

If and only if my STDNT_ID value exists in a list stored in my session.
Is this possible?

If so, how can it be accomplished?
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!