Hi
It seems to me you are doing this wrong :
<sql:substitute-value name="request-param:username"/>
Replace that with
<sql:substitute-value name="username"/>
Look carefully at http://cocoon.apache.org/2.1/userdocs/sql-transformer.html
right bbelow "Substitution".
Hope it helps.
Regards
Armaz
> -----Original Message-----
> From: J.D. Williams [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, February 27, 2007 8:57 PM
> To: [email protected]
> Subject: Re: Authentication Framework and database
>
> Thought it might be some whitespace from careless XSL
> writing, but I got rid of the superfluous whitespace (I
> think) and still no luck.
>
> I could use another set of eyes on this to help me see what I
> am missing.
>
> The login page is the one from the authentication framework sample in
> 2.1.9
>
> The only changes I have made to the sitemap are the
> authentication resource, as follows:
>
> <map:pipeline internal-only="true">
> <map:match pattern="authenticate">
> <map:generate src="docs/sql-page.xml"/>
> <map:transform type="sql">
> <map:parameter name="use-connection" value="sandbox"/>
> <map:parameter name="show-nr-of-rows" value="true"/>
> <map:parameter name="username"
> value="{request-param:username}"/>
> </map:transform>
> <map:transform src="stylesheets/sql2xml.xsl">
> <map:parameter name="use-request-parameters" value="true"/>
> </map:transform>
> <map:serialize type="xml"/>
> </map:match>
> </map:pipeline>
>
> Using this query in the sql-page.xml:
>
> <page>
> <content>
> <sql:execute-query xmlns:sql="http://apache.org/cocoon/SQL/2.0">
> <sql:query>select * from user where name =
> '<sql:substitute-value name="request-param:username"/>'</sql:query>
> </sql:execute-query>
> </content>
> </page>
>
> And using this XSL:
>
> <?xml version="1.0"?>
>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> xmlns:sql="http://apache.org/cocoon/SQL/2.0">
>
> <xsl:template match="/page/content/sql:rowset/sql:row">
> <authentication
> xmlns:session="http://apache.org/cocoon/session/1.0">
> <xsl:apply-templates select="sql:name"/>
> </authentication>
> </xsl:template>
>
> <xsl:template match="sql:name">
> <ID>
> <xsl:value-of select="."/>
> </ID>
> </xsl:template>
>
> </xsl:stylesheet>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]