Using Session Variables in XSL

admin

Administrator
Staff member
I am working in an xsl doc and I'm trying to do determine whether to displaycertain portions of the data based on the users permission stored in a sessionvariable. So I'm trying to call a jscript to do this. below is the sectionsof the code that I added (it was working before I wanted this permissionsthing) or lines I think could be having an effect on it. I took out somelines for simplicity sake.If anyone has any suggestions as to why this is choking (other than I suck)I would appreciate it.<?xml version="1.0"?><xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl"><!-- xmlns:xsd="http://www.w3.org/1999/XMLSchema" --><!-- MENUS.XSL --><xsl:choose><xsl:choose><xsl:when expr="Access()">(The if statement works I tested it without the other additions) <xsl:ifmatch=".[@TYPE!='Admin']">this contains preexisting code that is fine</xsl:if><xsl:otherwise>all preexisting code</xsl:otherwise></xsl:choose>(this is the script being called from the expr=Access() above.)<SCRIPT LANGUAGE="JScript">function Access(){var sAccess = Session.Contents("AccessLevel");if (sAccess = "RO"){Access=true;}else{Access=false;}}</SCRIPT>
 
Back
Top