Following XSLT Logic not working

Joined
Oct 23, 2009
Messages
1
Reaction score
0
I have to check value of a variable in XSLT if it is null then i have to set it to default "$"
so for that i have written following XSLT code:

<XSL:variable name dummy select= "ArrayOfBookMark/BookMark[ShortName='Asp-7041-EndVar1]/Value">
<XSL:choose>
<XSL:when test="($dummy!='')">
<XSL:variable name="dummy1" select="$dummy"/>
</when>
<XSL:eek:therwise>
<XSL:variable name="dummy1" select="'$'"/>
</XSL:variable>
<XSL:eek:therwise>
</XSL:choose>


Here in Dummy i am copying the value comming from follwing XML.it is retriving value correctly in to dummy.
Condition also checking but the value assignment code for new variable "dummy1" is not happening.

<ArrayOfBookMark>
<BookMark>
<ShortName>Asp-7041-EndVar1</ShortName>
<Value>12345</Value>
</BookMark>
</ArrayOfBookMark>

please help...


Quick response will b appriciated.

-Sanket
(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,736
Latest member
zacharyharris

Latest Threads

Top