Bookmark Topic Watch Topic
  • New Topic

Can XSL sheets see Session Vars?  RSS feed

 
Steve Elliser
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • 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?
 
Steve Elliser
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Report post to moderator
I should add that my regular expression is being built dynamically, so I can't create a fixed variable in the stylesheet.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66260
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please do not cross-post the same question in multiple forums. It wastes people's time when multiple redundant conversations take place.
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!