cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tagunov Anthony" <atagu...@nnt.ru>
Subject [C1-C2][xsp-java.xsl] feature request, [Patch] proposed
Date Wed, 27 Dec 2000 14:27:09 GMT
Hello, evrybody!

Well, when I started using xsp extensively, I found that
I want to write METHODS in the class that gets generated.

I can do it in <xsp:logic> very well, but if I want to generate
XML tags there, I find that I can't do that, cause I need local
variables that "live" in populateDocument() method..

What I'm asking you to adopt won't mess anything up and
is in fact very simple: maybe we could have some tags in
the xsp namespace that would expand to formal and actual
parameter lists, like this:

======example #1
<xsp:page>
  <xsp:logic>
  void sendIt(<xsp:get-std-param/>, String email){
    <send>
      <to><xsp:expr>email</xsp:expr></to>
    </send>
  }
  </xsp:logic>
  <page>
       .. <xsp:logic>sendIt(<xsp:put-std-param/>,email2)</xsp:logic> ..
   </page>
</xsp:page>
===============result #1
(this should expand into
 ...
 void send(HttpServletRequest request, HttpServletResponse response, Document document, Node
xspParentNode, Node xspCurrentNode,
                                          Stack xspNodeStack, HttpSession session, String
email)
 ...
 sendIt(request, responce, document, xspParentNode, xspCurrenyNode, xspNodeStack, session,
email)
)
=================================================
Additional facility could be creating a special
<xsp:structure>
  <xsp:include>com.smth......Smth*</xsp:include>
  <xsp:add-std-parm>Sting additional</xsp:add-std-param>
</xsp:structure>

elements. This should result in making example #1 expand into

===============result #1
(this should expand into
 ...
 void send(HttpServletRequest request, HttpServletResponse response, Document document, Node
xspParentNode, Node xspCurrentNode,
                                          Stack xspNodeStack, HttpSession session, String
additional, String email)
 ...
 sendIt(request, responce, document, xspParentNode, xspCurrenyNode, xspNodeStack, session,
additional, email)
)



Mime
View raw message