XSLT logic

Discussion in 'XML' started by Oleg Konovalov, May 6, 2005.

  1. Hi,

    I am new to XSLT, trying to fix a bug in somebody else's XSL transformer [it
    is XSLT1.x code, part of Cocoon2.0 app].

    The logic of the code goes like that (in all cases filling in one XML
    structure mystruct):
    ....
    <xml:if (condition1)
    <mystruct>..block1..</mystruct>
    </xml:if>
    <mystruct>..block2..</mystruct>
    <xml:if (condition3)
    <mystruct>..block3..</mystruct>
    </xml:if>
    .....

    Does it seem fishy to you (no "else" or "choose/when/otherwise") ?

    I am trying to understand when block2 is executed
    and whether condition1, no-condition, condition3 become mutually exclusive.

    Or should I read it as I would do it normal languages (C/C++ or Java) ?

    Please advise.


    Thank you in advance,
    Oleg.
     
    Oleg Konovalov, May 6, 2005
    #1
    1. Advertising

  2. Oleg Konovalov

    Sammy Guest

    Yes, you should read it just like a normal C language

    if(cond1)
    {
    block1;
    }

    block2;

    if(cond3)
    {

    block3;
    }
     
    Sammy, May 6, 2005
    #2
    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. Stylus Studio
    Replies:
    0
    Views:
    686
    Stylus Studio
    Aug 3, 2004
  2. Benjamin Hillsley
    Replies:
    3
    Views:
    1,690
    Dimitre Novatchev
    Sep 25, 2003
  3. Hvid Hat
    Replies:
    3
    Views:
    596
    Joseph Kesselman
    Feb 8, 2008
  4. sanket002
    Replies:
    0
    Views:
    1,158
    sanket002
    Oct 23, 2009
  5. spike
    Replies:
    8
    Views:
    1,474
    Steve Holden
    Feb 9, 2010
Loading...

Share This Page