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

Re: Converting markup to non-markup

Subject: Re: Converting markup to non-markup
From: Mike Brown <mike@xxxxxxxx>
Date: Thu, 12 Sep 2002 07:56:42 -0600 (MDT)
converting markup to string
Satish, L. Gnanendra wrote:
> Hello all,
>  I am very new to XML+XSLT. I have already done a rapid study of these which
> is required for my project.
>  My immediate query is:
>  How do I compare an attribute from XML with a parameter defined in XSLT and
> display some text.
>  eg. code is:
>  <xsl:variable name="TagVal"
> select="OIDInfo/Message/MessageInfo/MsgLevel/TextString"/>        
>  <xsl:choose>
>    <xsl:when test='$TagVal=Cleared'>

$TagVal=Cleared

compares the string-value of each node in $TagVal (which you set to be
one or more TextString elements) to the string-value of each node
selected by child::Cleared. If any match, the result is true.

You want

<xsl:when test='$TagVal="Cleared"'>
or
<xsl:when test="$TagVal='Cleared'">

Note you can save a little bit of memory if you put the xsl:choose inside
<font color="red">...</font>. Then you can remove the font elements from
inside the when/otherwise.

   - Mike
____________________________________________________________________________
  mike j. brown                   |  xml/xslt: http://skew.org/xml/
  denver/boulder, colorado, usa   |  resume: http://skew.org/~mike/resume/

 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.