Are you saying that you want your logicsheet "my-logicsheet:do-with-i" to generate different XSP code depending on the value of i?  That isn't possible, to my knowledge.

If you just want to have a for-loop calling a template in a logicsheet, that's fine, but the logicsheet's XSLT templates cannot depend on the value of i (that value doesn't exist yet).  You can create Java code to do a case statement or a bunch of if-else statements to vary the behavior based on the value of i.

-Christopher



"Hubert Trzewik \(Prosystel\)" <[EMAIL PROTECTED]>

01/26/2004 01:22 PM
Please respond to users

       
        To:        <[EMAIL PROTECTED]>
        cc:        
        Subject:        XSP, "for" loop, XSP logicsheets



Is it possible to do something like this?
 
<xsp:logic>
    for (int i=0; i<max; i++) {
    <my-logicsheet:do-with-i><xsp:expr>i</xsp:expr></my-logicsheet:do-with-i>
    }
</xsp:logic>
 
The problem is, that I have working logicsheet and I need prepare a fragment tree to be processed by this logicsheet.
So, my XSP in fact should ganarete (using pure Java) another XSP with XML Logicsheet 'statments' and that one should be finally processed (so we process twice) - but I'm not sure if it's a good way of solving problem. Any idea?
--
Hubert Trzewik
Prosystel Sp. z o.o.

[EMAIL PROTECTED]

Reply via email to