DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=28017>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=28017 xsp: generating a XSP computed attribute does not work for ROOT element ------- Additional Comments From [EMAIL PROTECTED] 2004-03-29 23:43 ------- > Trial 1 is a known restriction of XSP. Here, I don't agree. It's not a restriction, it is per XSP "specification", that's exactly as it should work. > Trial 2 is a duplicate of bug #15841: the xsp:attribute elements are > collected first. If you think about it, that's the only way it can work. xsp:logic can have any Programming Language code, including invocations of the contentHandler's methods (like startElement), thus xsp:logic must be executed inside element. xsp:attribute, on the other hand, must be executed before element - because in SAX attributes go together with startElement method. Following should work: <xsp:logic> private String getIt() { String dummy = "aaa"; return (String)(request.getParameter("test")); } </xsp:logic> <dum2> <xsp:attribute name="key"><xsp:expr>getIt()</xsp:expr></xsp:attribute> </dum2> Vadim
