cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vadim Gritsenko" <vgritse...@hns.com>
Subject [C2] xsp:logic tag behaviour
Date Tue, 09 Jan 2001 14:58:28 GMT
Hi,

I noticed that <xsp:logic> tag behaves a little bit different than I thought
it should after reading http://xml.apache.org/cocoon/wd-xsp.html, especially
part "Page Readability".

In short: I thought that local variable visibility should be limited by
corresponding <xsp:logic> tag, but now it implemented such way that local
variables are visible across all page - and this breaks page readability.

Consider simple example:

<page>
  <xsp:logic>
    int i = 5;
  </xsp:logic>
  The value of i is: <xsp:expr>i</xsp:expr>
</page>

This example works now, and I think that this is reducing readability of XSP
and this XSP code is no different from jsp:

<page>
  <jsp:scriptlet>
    int i = 5;
  </jsp:scriptlet>
  The value of i is: <jsp:expression>i</xsp:expression>
</page>

So, example from "Page Readability" chapter of WD can be fully rewritten
using "JSP coding style"...

I propose to fix this error, I hope it is enough just to add couple of
symbols to xsp.java:
---------------------------------------------
  <xsl:template match="xsp:logic">
+   {
      <xsl:apply-templates/>
+   }
  </xsl:template>
---------------------------------------------

PS Sorry, I can not make patch: I can not get latest Cocoon version from
CVS, it times out always after "cvs server: Updating xml-cocoon/lib".


Thanks,
Vadim


Mime
View raw message