Hi, there is currently a similar question from Zachary A Lendon but so far no answer (Vadim did miss some information). I do have the following problem:
I call the following web-page http://134.169.75.183:8080/cocoon/example.xsp?identifier="ITWORKS!!!!". All :) I want is to pass the parameter to a logicsheet where the value is used for an database request. I use the following files: ------------------------------------------- example.xsp ------------------------------------------------ <?xml version="1.0" encoding="ISO-8859-1"?> <xsp:page language="java" xmlns:xsp="http://apache.org/xsp" xmlns:vormsexample="http://www.vorms.org/xsl" xmlns:xsp-request="http://apache.org/xsp/request/2.0" xmlns:cinclude="http://apache.org/cocoon/include/1.0"> <vormsexample:header/> <page> <vormsexample:link> <xsl:attribute name="identifier"> <xsp-request:get-parameter name="identifier"/> </xsl:attribute> </vormsexample:link> <!-- THIS WORKS but is not dynamic" --> <!-- <vormsexample:link identifier="LO_VORMS_TP3_BIBLIOGRAPHY_VOSS_REINERS01_1_1"/>--> </page> </xsp:page> ---------------------------------------------- example.xsl ------------------------------------------------ <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsp="http://apache.org/xsp" xmlns:vormsexample="http://www.vorms.org/xsl" xmlns:xsp-request="http://apache.org/xsp/request/2.0" xmlns:cinclude="http://apache.org/cocoon/include/1.0" > <xsl:param name="identifier"/> <xsl:template match="vormsexample:header"> <xsp:structure> <xsp:include>DBInterface</xsp:include> </xsp:structure> <!-- Insert code to the xsl-file to read the uri of the file containing the data corresponding to the passed identifier --> <xsp:logic> public synchronized String getURI(String identifier) { DBInterface dbinterface = new DBInterface(); dbinterface.establishConnection("jdbc:mysql://134.169.75.183/vorms","vorms","vorms"); String msg = "cocoon:/processed/" + dbinterface.getURIForLM(identifier); return msg; } </xsp:logic> <xsl:apply-templates/> </xsl:template> <xsl:template match="vormsexample:link"> Output of identifier: <xsl:value-of select="identifier"/> End of Output <!-- <cinclude:include> <xsp:attribute name="src"> <xsp:expr>getURI("<xsl:value-of select="@identifier"/>")</xsp:expr> </xsp:attribute> <xsl:apply-templates/> </cinclude:include> --> <xsl:apply-templates/> </xsl:template> <xsl:template match="@*|node()" priority="-1"> <xsl:copy> <xsl:apply-templates select="@*|node()"/> </xsl:copy> </xsl:template> </xsl:stylesheet> Within the sitemap we use the following declarations <map:match pattern="example.xsp"> <map:generate type="serverpages" src="/home/vorms/website/example.xsp"/> <map:transform src="/home/vorms/website/vorms_stylesheet.xsl"> <map:parameter name="view-source" value="/home/vorms/website/example.xsp"/> </map:transform> --> <map:transform type="cinclude" /> <map:transform type="xslt-with-parameters" src="/home/vorms/website/vorms_stylesheet.xsl"> <map:parameter name="use-request-parameters" value="true"/> <map:parameter name="identifier" value="identifier"/> </map:transform> <map:serialize/> </map:match> At 19:10 19.04.2002 -0400, you wrote: > > From: Zachary A Lendon [mailto:[EMAIL PROTECTED]] > > > > In using the syntax: > > http://www.somesite.com/page.xml?param1=test > > > > and having an associated xsl stylesheet with: > > > > <?xml version="1.0"?> > > <xsl:stylesheet version="1.0" xmlns:xsl > > ="http://www.w3.org/1999/XSL/Transform" xmlns:xsp > > ="http://www.apache.org/1999/XSP/Core"> > > > > <xsl:param name="param1"/> > > .. > > <h1><xsl:value-of select="$param1"/></h1> > > > > I am getting the page to render (in html) but am not getting the >request > > parameter values to show up. Reading through the documentation, I > > attempted to do the following edits to sitemap.xmap: > > .. > > <map:transformers default="xslt"> > > <map:transformer logger="sitemap.transformer.xslt" name="xslt" > > pool-grow="2" pool-max="32" pool-min="8" src > > ="org.apache.cocoon.transformation.TraxTransformer"> > > <use-request-parameters>true</use-request-parameters> > > <use-browser-capabilities-db>false</use-browser-capabilities-db> > > <use-deli>false</use-deli> > > </map:transformer> > > > > <map:transformer name="xslt-with-parameters" > > src="org.apache.cocoon.transformation.TraxTransformer"> > > <use-request-parameters>true</use-request-parameters> > > </map:transformer> > > .. > > > > Any advice? This seems simple... > >You forgot to tell what your sitemap entry looks like. > >Vadim > > >--------------------------------------------------------------------- >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]> -- __ __ _ OO\| O__ O\__/O / O ///// O O\ / O O | -----.oOOo------oOOo.--------------------------------- Torsten Reiners Tel:++49-531-3913214 [EMAIL PROTECTED] Fax:++49-531-3918144 http://server3.winforms.phil.tu-bs.de/~treiners TU Braunschweig Abteilung Allgemeine Betriebswirtschaftslehre, Wirtschaftsinformatik und Informationsmanagement Abt-Jerusalem-Str.7 38106 Braunschweig, Germany Other EMails: [EMAIL PROTECTED] [EMAIL PROTECTED] ------------------------------------------------------ --------------------------------------------------------------------- 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]>