|
Subject: [xsl] Conditional test is failing From: Gowri Ratakonda <gratakonda@xxxxxxxxx> Date: Thu, 16 Mar 2006 11:54:42 -0800 (PST) |
I am using <xsl:choose> to replace these values in the
XML file:
W, N, S
with these in the output HTML:
Weak, Nominal, Strong
Need help to figure out why my conditional statement
is picking the last value in the <xsl:choose> block
all the time.
My XMl file looks like this:
<macro>
<macro_name>NRTCLDFFBQ_F1_SNPM</macro_name>
<library>GS60</library>
<CV>
<Vdd>1.35</Vdd>
<size>9.875</size>
<electrical>
<slew>
<value>2</value>
<units>PS</units>
</slew>
<PTV>
<strength>N</strength>
<voltage>1.35</voltage>
<temp>25</temp>
</PTV>
.
.
.
</electrical>
</CV>
</macro>
-------------------------------------------------
Here is my code for the <xsl:choose> element:
<h2>Electrical characteristics Process =
<xsl:variable name="strength"
select="macro/CV/electrical/PTV/strength"/>
<xsl:choose>
<xsl:when test='$strength = W'>
Weak
</xsl:when>
<xsl:when test='$strength = N'>
Nominal
</xsl:when>
<xsl:otherwise>
Strong
</xsl:otherwise>
</xsl:choose>
</h2>
----------------------------------------------------
Instead of 'Nominal', I get 'Strong' in my output
file.
Could someone please tell me what's wrong with my
code?
Thanks,
Gowri
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| [xsl] [ANNOUNCE] Edit and Validate , Stylus Studio | Thread | RE: [xsl] Conditional test is faili, Sreeni Yetchina -X \ |
| Re: [xsl] Displaying one section of, Gowri Ratakonda | Date | RE: [xsl] Conditional test is faili, Sreeni Yetchina -X \ |
| Month |