RE: [xsl] Checking a literal

Subject: RE: [xsl] Checking a literal
From: PattiJo.Seglin@xxxxxxxxxx
Date: Tue, 2 Jul 2002 09:53:30 -0500
That worked!  Thank you very much!

                    Bodrul Haque                                                                                                               
                    <Bodrul.Haque@Synergy-Logist        To:     "'xsl-list@xxxxxxxxxxxxxxxxxxxxxx'" <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>          
          >                          cc:                                                                                    
                    Sent by:                            Subject:     RE: [xsl] Checking a literal                                              
                    07/02/2002 09:10 AM                                                                                                        
                    Please respond to xsl-list                                                                                                 

Try using some single quotes around your literal.
e.g.  <xsl:when test="string(../name)='ChiCS-Operator'">

-----Original Message-----
From: PattiJo.Seglin@xxxxxxxxxx [mailto:PattiJo.Seglin@xxxxxxxxxx]
Sent: 02 July 2002 14:28
To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx
Subject: [xsl] Checking a literal

I'm a definite novice at XSL.  I am learning it at work while I'm working
it and I have a question about checking a literal in a 'when' statement.
The code is as follows:

<xsl:for-each select="workgroups/workgroup/queue">
   <xsl:when test="string(../name)=ChiCS-Operator">
      <td align="left"><font class="f3">Operator</font>
   <xsl:when test="string(../name)=ChiCS-RegionCentral">
      <td align="left"><font class="f3">Central</font>
   <xsl:when test="string(../name)=ChiCS-RegionEast">
       <td align="left"><font class="f3">East</font>
   <xsl:when test="string(../name)=ChiCS-RegionWest">
       <td align="left"><font class="f3">West</font>
       <td align="left"><font class="f3">Default</font>


I tried to write the above just looking at code that was already there, this
is an application we received from a third party.  What I'm trying to do is
check the workgroup and if it equals 'something' then put something else in
it's place on the screen, to cut down on the length of the name and save
space.  I'm assuming (uh-oh) that 'workgroups/workgroup/queue/name' is where
want to look as that 'for-each select' stmt was already there and they were
using ../name to put the literal from wherever this is, on the screen.
However, all that happens with the above code is that 'Default' gets put on
the screen three times.  What am I doing wrong?

 XSL-List info and archive:


The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
Any views or opinions presented in this Email message are solely those
of the author and do not necessarily represent those of Synergy
Logistics Limited  unless specifically stated.
Email communications are not necessarily secure and therefore
Synergy Logistics Limited does not accept legal responsibility for the
contents of this message.
If you are not the intended recipient and have received this message in
error, Please notify Synergy Logistics Limited immediately.

         Synergy Logistics Ltd. 01509 232706

 XSL-List info and archive:

 XSL-List info and archive:

Current Thread