Following XSLT Logic not working

Discussion in 'XML' started by sanket002, Oct 23, 2009.

  1. sanket002

    sanket002

    Joined:
    Oct 23, 2009
    Messages:
    1
    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
    Sanket.chougule@gmail.com
    sanket002, Oct 23, 2009
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Oleg Konovalov

    XSLT logic

    Oleg Konovalov, May 6, 2005, in forum: XML
    Replies:
    1
    Views:
    487
    Sammy
    May 6, 2005
  2. ozy
    Replies:
    1
    Views:
    1,840
  3. peter_hanzel@yahoo.com

    XSLT with following-sibling

    peter_hanzel@yahoo.com, Feb 21, 2007, in forum: XML
    Replies:
    3
    Views:
    6,898
    peter_hanzel@yahoo.com
    Feb 21, 2007
  4. spike
    Replies:
    8
    Views:
    1,464
    Steve Holden
    Feb 9, 2010
  5. timr
    Replies:
    9
    Views:
    180
Loading...

Share This Page