cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Torsten Curdt <>
Subject RE: XSP bug?
Date Fri, 11 Jan 2002 08:53:12 GMT
On Thu, 10 Jan 2002, Vadim Gritsenko wrote:

> > From: Torsten Curdt []
> >
> > > <xsp:logic>
> > >    Enumeration e = request.getHeaderNames();
> > >    if ((e != null) && (e.hasMoreElements())) {
> > >     <p>Here are the request headers...
> > >
> > > There is no escaping here! XSP automagically switches from Java to
> > > content once any tag or <xsp:content> is found.
> >
> > Yes... but in C2 only for the first tag! Already found the
> > caveat in the xsp.xsl!
> You lost me here! Do you mean second <p> would require <xsp:content>
> inside?

On my way home I realized I did not make myself clear. Too late,
too much work ;) Let's give another try:

The current implementation shows the following behaviour for
text nodes:

    text nodes are java code - OK
        text nodes are copied as text nodes - WRONG?
        in order to write java here you have open
        another xsp:logic tag. (AFAIR that's not how it
        was in C1 - look at the C1 docs)
          text nodes are java code - OK

You will get these problems only if you create tags inside
a xsp:logic section and want to write more nested java code. Clear?
So is this behaviour correct or not?

(You might also look at the esql.xsl)

I'd like to have only *ONE* xsp:logic tag meaning all descending text
nodes are java. If you want to switch back to normal processing you have
to use xsp:content to be back in copy mode.

Like this:

     if (request.getParameter("test")) {
         String test = request.getParameter("test");

           <info>info text</info>

         // or

         <info><xsp:content>info text</xsp:content></info>


What do you think?

I realize that there is also a xsp:text. Can someone please
explain the difference between xsp:text and xsp:content. AFAICS it's
only used inside xsp:attribute. Maybe this supposed to be xsp:content,

To unsubscribe, e-mail:
For additional commands, email:

View raw message