Community-Credit.com | NonProfitWays.com | SOAPitstop.com   Skin:   
      User: Not logged in 
Home
Newsletter Signup
XSLT Library
Latest XML Blogs
Featured Examples
Presentations
Featured Articles
Book Chapters
Training Courses
Events
NewsGroups
 
Discussions
Examples
Tutorials
Tools
Articles
Resources
Websites
 
Sign In
My Profile
My Articles
My Examples
My Favorites
My Resources
Add a Resource
Logout
 
About Me
My Blog
HeadGeek Articles
Talking Portfolio
Resume
Pictures
World Trip Pics

Reply: assigning a value to variable

Date Posted:1/23/2007 10:14 PM
Posted by:
k t
Hi, Im trying to assign a different value to the variable name 'Severity' depending on the users selection from the drop down menu.

Is this the right way to do it?? That is, is <xsl:text> correct??
They are numeric values.. and then later on I will add more variables 'Exposre' & 'Probaility' and then multiply them together..

Any help would be most appreciated


          <xsl:when test="@type='calc'">
            <xsl:variable name="Severity">
              <xsl:choose>
                <xsl:when test="../cell/@key='Severity-1'">
                  <xsl:text>1000</xsl:text>
                </xsl:when>
                <xsl:when test="../cell/@key='Severity-2'">
                  <xsl:text>300</xsl:text>
                </xsl:when>
                <xsl:when test="../cell/@key='Severity-3'">
                  <xsl:text>100</xsl:text>
                </xsl:when>
                <xsl:when test="../cell/@key='Severity-4'">
                  <xsl:text>30</xsl:text>
                </xsl:when>
                <xsl:when test="../cell/@key='Severity-5'">
                  <xsl:text>10</xsl:text>
                </xsl:when>
                <xsl:when test="../cell/@key='Severity-6'">
                  <xsl:text>3</xsl:text>
                </xsl:when>
                <xsl:when test="../cell/@key='Severity-7'">
                  <xsl:text>1</xsl:text>
                </xsl:when>
              </xsl:choose>
            </xsl:variable>





Fans of "The Office"
Dwight Bobbleheads are here!
  “It's me! I'm the bobblehead! Yes!”



Advertise on XMLPitstop

Advertise on XMLPitstop


EggHead Cafe
Web Servicee development
DotNetSlackers
Buy links on this site!
online secure backup
Giorgio Armani sunglasses
Video Surveillance
Web Hosting Services
Color Laser Printer
Buy links on this site!

Interested in Text ads?
2,277 Total Members
42 members(last 30 days)
13 members(last 7 days)
3 members(today)

1,629 Total Discussions
17 Posts(last 30 days)
2 Posts(last 7 days)
1 Posts(today)

20,047 Total Blog Posts
2,133 Blogs(last 30 days)
573 Blogs(last 7 days)
56 Blogs(today)

8,699 Newsgroup Posts
0 Posts(last 30 days)
0 Posts(last 7 days)
0 Posts(today)

13,802 Total Resources
16 Resources(last 30 days)
1 Resources(last 7 days)
0 Resources(today)


 

David Silverlight's XMLPitstop.com| 2801 Florida Ave #225|Miami, FL 33133|Ph:305-447-1139