cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Derek Hohls" <DHo...@csir.co.za>
Subject Re: duplicate attribute problem
Date Mon, 20 Sep 2004 06:12:58 GMT
1. it does not seem that "user" is part of the 
http://apache.org/cocoon/SQL/2.0 namespace 

2. rather than putting default namespaces on each element; try and
have:

<xsl:stylesheet version="1.0" 
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns="http://mynamespace.com"
  xmlns:sql="http://apache.org/cocoon/SQL/2.0"> 

and then use, say, 

<user...
<sql:execute-query ....
  <sql:query ....

or 

<xsl:stylesheet version="1.0" 
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:me="http://mynamespace.com"
  xmlns="http://apache.org/cocoon/SQL/2.0">

<me:user...
<execute-query ....
  <query ...

Does this work?

>>> fabrizio.picca@gmail.com 2004/09/18 03:11:59 PM >>>
this is the xsl in charge of doing the query

<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:param name="name"/>
  <xsl:param name="pwd"/>
  <xsl:template match="authentication">
    <user xmlns:sql="http://apache.org/cocoon/SQL/2.0">
      <execute-query xmlns="http://apache.org/cocoon/SQL/2.0"> 
		<query>
	    SELECT uid,username,password from users where username=
'<sql:substitute-value sql:name="$name"/>'
	    and password = '<sql:substitute-value sql:name="$pwd"/>' 
		</query>
      </execute-query>
    </user>
  </xsl:template>
</xsl:stylesheet>



On Sat, 18 Sep 2004 15:10:43 +0200, fabrizio picca
<fabrizio.picca@gmail.com> wrote:
> after this pipeline :
> 
>                                 <map:generate
src="docs/do-login.xml"/>
>                                 <map:transform
src="stylesheets/do-login.xsl">
>                                         <map:parameter
name="use-request-parameters" value="true"/>
>                                 </map:transform>
>                                 <map:transform type="sql"
label="debug3">
>                                         <!--sql per
autenticazione-->
>                                         <map:parameter
name="use-connection" value="mysql"/>
>                                         <map:parameter
name="clob-encoding" value="UTF-8"/>
>                                         <map:parameter
name="use-request-parameters" value="true"/>
>                                 </map:transform>
> 
> i get a duplicate attribute error  on my browser:
> 
> <user xmlns:sql="http://apache.org/cocoon/SQL/2.0"><rowset
> xmlns="http://apache.org/cocoon/SQL/2.0"
> xmlns="http://apache.org/cocoon/SQL/2.0"/></user>
> 
> why this?
> 
> --
> copyright - fabpicca
> 



-- 
copyright - fabpicca

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org 
For additional commands, e-mail: users-help@cocoon.apache.org 


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message