XSLT logic

O

Oleg Konovalov

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.
 
S

Sammy

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

if(cond1)
{
block1;
}

block2;

if(cond3)
{

block3;
}
 

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,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top