[xsl] Comparing Variables

Subject: [xsl] Comparing Variables
From: "Fernandes, John" <jfernandes@xxxxxxxxxx>
Date: Thu, 1 May 2003 13:48:08 -0400
Hi I am still new to this technology so bare with my problem. 
I have a default value from a xml document for an employee as <employee>John
In the XSL stylesheet I have a node set creating a drop down list as
described below
<select name="employee">             
   <xsl:for-each select="$v_employee/name">
        <option value="{.}"><xsl:value-of select="."/></option>
My problem is this. I want to be able to compare as each list item is being
created the value of the current item to the default value in employee, so
that I may make that value on the list the Selected Item. I have tried the
attempt below. However it seems that the value of the default value
(employee) is always null.
***<xsl:value-of select="employee"/> --- Value is John Doe ***********
<select name="employee">             
   <xsl:for-each select="$v_employer/employer/option">

***<xsl:value-of select="employee"/> --- Value is empty  *********** 
    <xsl:if test="employee= '{.}">
     <option value="{.}" selected="selected"><xsl:value-of
    <xsl:if test="not(employee= '{.}')">
     <option value="{.}" "><xsl:value-of select="./description"/></option>
I guess my question is can this be done or how can I bring a value from the
main template in to be compared to the item on the list as it is iterating
through it.
John M. Fernandes 


Get to know us
http://www.thestar.com - Canada's largest daily newspaper online
http://www.toronto.com - All you need to know about T.O.
http://www.workopolis.com - Canada's biggest job site
http://www.torontostartv.com - Webcasting & Production
http://www.newinhomes.com - Ontario's Largest New Home & Condo Website
http://www.waymoresports.com - Canada's most comprehensive sports site
http://www.tmgtv.ca - Torstar Media Group Television

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread
  • [xsl] Comparing Variables
    • Fernandes, John - Thu, 1 May 2003 13:48:08 -0400 <=
      • <Possible follow-ups>
      • me - Thu, 01 May 2003 12:08:19 -0700 (PDT)
      • Fernandes, John - Fri, 2 May 2003 09:08:20 -0400
      • me - Fri, 02 May 2003 09:29:17 -0700 (PDT)