Shouldn't the following construct work?

 ...
 <tag>
    <xsp:logic>
       try {

         <ns:list>
           Collection list = ...

           for (Iterator iterator = list.iterator(); iterator.hasNext();) {
             MyObj o = (MyObj) iterator.next();

             <ns:MyObj>
               <ns:name>o.getName()</ns:name>
             </ns:MyObj>

           }
         </ns:list>

       }
       catch(Exception e) {
         <xsp:content>Error: <xsp:expr>String.valueOf(e)</xsp:expr></xsp:content>
       }
    </xsp:logic>
 </tag>
 ...

Referring to some old C1 documentation http://xml.apache.org/cocoon1/xsp.html
(paragraph "logic tags") this should work.
And I think this should work the same way in C2!

One could use <xsp:element> (like e.g. esql does) to work around this.
But that's a not quite nice sollution. Can we aggree that this should
work?

Unfortunately the current implementation will treat any java code
within a tag inside the xsp logic tag as text nodes - not as java.

If we can aggree that this behaviour is wrong I'd like to change
the xsp.xsl accordingly.
--
Torsten


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to