Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

Can XSL sheets see Session Vars?

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 67682
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
He was giving me directions and I was powerless to resist. I cannot resist this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
    Bookmark Topic Watch Topic
  • New Topic