|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Converting markup to non-markup
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








