hi guys, long time no see. if anyone's curious where i've been, see the apologetic post to cocoon-dev i just sent in. now, on to my questions. :)
1. a long while back, we had some discussion on whether or not one should be able to send a redirect from an xsp page. i'd thought the eventual consensus was that we should, but i guess i was wrong, since the response logicsheet doesn't seem to provide any way to send a redirect, nor does the Response interface provide a redirect method. however, one of the c2 docs _does_ reference such a method: http://xml.apache.org/cocoon/userdocs/concepts/actions.html compares and contrasts xsp pages and actions. the xsp page it contains has the following snippet: <esql:connection> <esql:dbpool>mypool</esql:dbpool> <esql:execute-query> <esql:query>SELECT userid FROM users WHERE name=<esql:parameter>name</esql:parameter> AND password=<esql:parameter>password</esql:parameter></esql:query> <esql:row-results> <xsp:logic> userid = <esql:get-int column="userid"/> </xsp:logic> </esql:row-results> <esql:no-results> <xsp-response:send-redirect url="/home"/> </esql:no-results> </esql:execute-query> </esql:connection> the alleged messiness of the code notwithstanding (;)), it seems to be a common development idiom to want to redirect the user to a different url or pipeline if something goes awry in an xsp page (the user can't login to the database, the user doesn't have permission to do something, etc.) if one cannot send a redirect from an xsp page in c2, can one switch pipelines based on a flow control statement in an xsp page? naturally, i can see that one could refactor and use actions to do the pipeline switching and/or redirecting instead, but i still can't see any good reason to prohibit early exit from a pipeline, via sendRedirect or sendError from any component, including xsp pages. it's not always desirable to factor to split the flow control stuff out of xsp pages into actions. or is it? 2. in developing my own standalone j2ee webapps using trax, i quickly realized that if you don't know at what url your webapp is going to be mounted, you can't use absolute links to resources in your webapp, e.g. images, javascript libraries, etc. but strictly using relative paths in your xslt stylesheets when referencing those resources is not only a real pita, it's impossible if that stylesheet if used in the construction of urls that appear at different depths in the urlspace. the easy solution is to parameterize the stylesheet with the context path information: <xsl:param name="contextPath"/> <img src="{$contextPath}/images/foo.png"/> i presume c2 does not already parameterize stylesheets with this datum by default. does anyone know how you would easily add that parameter to all, or a certain class, of xslt transformations? also, i presume that others have encountered this problem. is there an alternate solution anyone has used that's better? - donald --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faqs.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>