Hi Franco
I think is's because SQLTransformer doesn't understand
use-request-parameters, you'll have to specify them explicitly: Tripped me
up a couple of times too!
Like this
�� �<map:pipeline internal-only="true">
� �� �<map:match pattern="authenticate">
� � � � <map:generate src="userSql.xml"/>
� � � �� <map:transform type="sql">
� � � � � � <map:parameter name="use-connection" value="mdgDB"/>
� � � � � � <map:parameter name="show-nr-of-rows" value="true"/>
� � � � � � <map:parameter name="clob-encoding" value="UTF-8"/>
� � � � � � <map:parameter name="parameter_name"
value="{request-param:parameter_name}"/>
� � � � � � <map:parameter name="parameter_passwd"
value="{request-param:parameter_passwd}"/>
� � � � � <map:parameter name="use-request-parameters"
value="true"/>
� � �� </map:transform>
� � � � <map:transform src="stylesheets/authenticate.xsl">
� � � � � <map:parameter name="use-request-parameters" value="true"/>
� � � � </map:transform>
� � � � <map:serialize type="xml"/>
� � � </map:match>
� � </map:pipeline>
Franco Andrao <[EMAIL PROTECTED]> wrote on 09-06-2005 16:34:37:
> Hi,
> I'm trying to use the sample Authentication-fw using mysql, but
> actually is not working and I'm lost.
>
> I modify the pipelines with:
>
> �� �<map:pipeline internal-only="true">
> � �� �<map:match pattern="authenticate">
> � � � � <map:generate src="userSql.xml"/>
> � � � �� <map:transform type="sql">
> � � � � � � <map:parameter name="use-connection" value="mdgDB"/>
> � � � � � � <map:parameter name="show-nr-of-rows" value="true"/>
> � � � � � � <map:parameter name="clob-encoding" value="UTF-8"/>
> � � � � � <map:parameter name="use-request-parameters"
value="true"/>
> � � �� </map:transform>
> � � � � <map:transform src="stylesheets/authenticate.xsl">
> � � � � � <map:parameter name="use-request-parameters" value="true"/>
> � � � � </map:transform>
> � � � � <map:serialize type="xml"/>
> � � � </map:match>
> � � </map:pipeline>
>
> where�userSql.xml"
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <authentication>
> � � <execute-query xmlns="http://apache.org/cocoon/SQL/2.0">
> � �� <query name="authUser">
> � � � � � select ut_login,ut_psw from dbutenti
> � � � � � where
> � � � � � ut_login='<substitute-value name="parameter_name"/>
> � � � � � AND ut_psw='<substitute-value name="parameter_passwd"/>'
> � �� </query>
> � � </execute-query>
> </authentication>
>
> and�authenticate.xsl
>
> <?xml version="1.0"?>
> <xsl:stylesheet version="1.0"
> � � � � � � � � xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>
> <xsl:param name="ut_login"/>
> <xsl:param name="ut_psw"/>
>
> <xsl:template match="authentication">
> � <authentication>
> � � <xsl:apply-templates select="rowset"/>
> � </authentication>
> </xsl:template>
>
> <xsl:template match="row">
> � � <!-- Compare the name of the user -->
> � � <xsl:if test="normalize-space(ut_login) = $ut_login">
> � � � � <xsl:if test="normalize-space(ut_psw) = $ut_psw">
> � �� �� �� �<ID><xsl:value-of select="name"/></ID>
> � � � � </xsl:if>
> � � </xsl:if>
> </xsl:template>
>
> </xsl:stylesheet>
>
> The connection to the db is working but i don't know how test is the
> parameter are passed properly...
> Someone could help me to understand what is wrong
> Thanks
>
> Franco
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]