On 22.11.2003 03:49, Vadim Gritsenko wrote:
Joerg Heinicke wrote:

(By the way, the simplification to

<xsp:logic>
        if (somecondition()) {
                <true_tag/>
        } else {
                <false_tag/>
        }
</xsp:logic>

is exactly what does not work at Cocoon and was the reason for the problem at http://marc.theaimsgroup.com/?t=106931803600003&r=1&w=2.)


It *does* work. Everytime. Try it, if you do not believe me.

PS Do not forget that <xsp:expr> must be used in content mode, and not in language mode; to switch to content mode from the language mode you either (a) open a tag, (b) use <xsp:content> if you don't want a tag.

Argh. It was really to late to write mails :-) I mixed the situation of the problem (<xsp:expr/>) with the above (any XML). Sorry for the noise.


PPS Answering your question in the [1], here is trivial and commonly used use case:
String s = <xsp-request:get-parameter name="name"/>;
Which is identical to:
String s = <xsp-expr>request.getParameter("name")</xsp:expr>;


[1] http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=106932338722437&w=2

Thanks for this sample. XSP is really to complex - and so is the stylesheet ;-) Simply to many special cases.


Joerg



Reply via email to