cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vadim Gritsenko" <vadim.gritse...@verizon.net>
Subject RE: XSP bug?
Date Thu, 10 Jan 2002 20:28:09 GMT
> From: Torsten Curdt [mailto:tcurdt@dff.st]
> 
> Shouldn't the following construct work?

Do you mean this:

>  ...
>  <tag>
>     <xsp:logic>
>        try {
> 
>          <ns:list>
             <xsp:logic>
>            Collection list = ...
> 
>            for (Iterator iterator = list.iterator();
iterator.hasNext();) {
>              MyObj o = (MyObj) iterator.next();
> 
>              <ns:MyObj>
                 <ns:name><xsp:expr>o.getName()</xsp:expr></ns:name>
>              </ns:MyObj>
> 
>            }
             </xsp:logic>
>          </ns:list>
> 
>        }
>        catch(Exception e) {
>          <xsp:content>Error:
> <xsp:expr>String.valueOf(e)</xsp:expr></xsp:content>
>        }
>     </xsp:logic>
>  </tag>
>  ...

IIRC, this works.


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

How you propose to rewrite this example:

<xsp:logic>
  try {
    <para>
      This is not a java code, but the document content.
      <xsp:expr>new Date()</xsp:expr>
    </para>
  ...
</xsp:logic>

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

I can't right now. May be I just do not get what you are proposing.

Regards,
Vadim


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message