cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Torsten Curdt <tcu...@dff.st>
Subject RE: XSP bug?
Date Thu, 10 Jan 2002 20:52:24 GMT
On Thu, 10 Jan 2002, Vadim Gritsenko wrote:
> >  ...
> >  <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.

Well, it should... but seems not to...

>
>
> > 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>

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

IIRC that's how it was in the old days?!;)

> > 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.

Hope it is clearer now
--
Torsten


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


Mime
View raw message