microsoft.public.sqlserver.notificationsvcs
[Top] [All Lists]

Formatting Notifications- xslt variables

Subject: Formatting Notifications- xslt variables
From: jplankala
Date: Fri, 13 May 2005 06:58:06 -0700
Newsgroups: microsoft.public.sqlserver.notificationsvcs
Hi,

When I use xslt for formatting the notification, I am facing some issues 
with the variables inside xslt.I have a variable which is declared with 
global scope. I am assigning a value to this variable within a TABLE( 
<TABLE>..</TABLE>) and I am not able  to use the value of this variable 
outside the table where is is defined. When the Notification service creates 
the notification It is is failing to populate the the value of the varibale 
in a different place(other than the decalred <TABLE>..</TABLE>).

When I test this using a simple XML and and the same XSLT, It is working fine.

eg: 

<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
        xmlns:msxsl="urn:schemas-microsoft-com:xslt"
        xmlns:user="urn:my-scripts"
         version="1.0">
   <xsl:variable name="var1"/>
<xsl:template match="/">
         <HTML><BODY>
<TABLE>
..
..
<xsl:variable name="var1"/>
<xsl:value-of select="abc" />
</xsl:variable> 
<TABLE/>

<!--Variable var1 is not giving the above assigned value in the below 
block-- happening only when Notification service formats the notification in 
a normal XML value of this variable isgetting displyed -->

<TABLE>
..
..
 
<xsl:value-of select="$abc" />
... 
<TABLE/>


Please help me in resolving this,

Jplankala


<Prev in Thread] Current Thread [Next in Thread>
  • Formatting Notifications- xslt variables, jplankala <=