Dear all, I'm trying to write a logicsheet that accepts dynamic parameters from the XSP page (e.g. maybe request parameters, or session attributes), and uses them to request data from our application. I'd like the xsp code to look something like this:
<xsp:logic> String sortParameter = request.getParameter("sort"); </xsp:logic> <data> <parameters:categories> <xsp:param name="sortBy"> <xsp:expr>sortParameter</xsp:expr> </xsp:param> </parameters:categories> </data> What do I need to put in my logicsheet code to pick up the "sortParameter" value? At the moment I've got the following: <xsl:template match="parameters:categories"> <xsl:variable name="sortBy"> <xsl:choose> <xsl:when test="sortBy"> <xsl:call-template name="get-nested-content"> <xsl:with-param name="content" select="parameters:sortBy"/> </xsl:call-template> </xsl:when> </xsl:choose> </xsl:variable> <xsp:logic> System.out.println("Got value: " + "<xsl:copy-of select="$sortBy" />"); </xsp:logic> </xsl:template> <xsl:template name="get-nested-content"> <xsl:param name="content"/> <xsl:choose> <xsl:when test="$content/*"> <xsl:apply-templates select="$content/*"/> </xsl:when> <xsl:otherwise>"<xsl:value-of select="$content"/>"</xsl:otherwise> </xsl:choose> </xsl:template> Sorry if this is a stupid question, but I've been unable to find any documentation that describes this. I'd be very grateful for any help! Richard --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>