[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

xsl:if confusion

Subject: xsl:if confusion
From: "Sargeant, Richard (GEIS)" <Richard.Sargeant@xxxxxxxxxxx>
Date: Tue, 21 Sep 1999 13:00:49 +0200
xsl for node
Hi,

   While processing a node I need to do conditional processing based on the
contents of another node of the same parent. For example my XML looks like

   <USER>
      <TYPE>1</TYPE>
      <PASSWORD>pwd</PASSWORD>
   </USER>

 The xsl for node password is

   <xsl:template match="PASSWORD">
      <td>
         <font face="arial" size="2">Password: </font>
         <font face="arial" size="2" color="#000080">
         <xsl:choose>
            <xsl:when test="../TYPE=1">########</xsl:when>
            <xsl:otherwise>
               <xsl:value-of select="."/>
            </xsl:otherwise>
         </xsl:choose>
         </font>
      </td>
   </xsl:template>

I've also tried ../TYPE/text()='1' but that also fails. What I'm I doing
wrong ?

regards
   Richard


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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.