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->
� �� �<map:match pattern="authenticate">
� � � � <map:generate src=""/>
� � � �� <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="">
� � � � � <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


Reply via email to