You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Christoph Klocker <e0...@student.tuwien.ac.at> on 2007/05/21 21:56:08 UTC

sql Transformer missing sql namespace

Hi,

I am using the sql transformer. I have the problem that the resulting xml is 
missing the xmlns:sql declaration. 

I call it this way

<map:match pattern="userUris">
				<map:generate src="sql/userUri.xml" />
			 <map:transform type="sql">
				<map:parameter name="use-connection" value="vedanova" />
				<map:parameter name="show-nr-of-rows" value="true"/> 
   				<map:parameter name="clob-encoding" value="UTF-8"/> 
   				<map:parameter name="userId" value="1"/> 
			 </map:transform>			
	  			<map:transform type="xslt-saxon" 
src="stylesheets/userUri2IncludeXml.xslt"/>  
			  	<map:serialize type="xml" />   
			</map:match>

thats my query file

<page>  
    <sql:execute-query xmlns:sql="http://apache.org/cocoon/SQL/2.0"> 
     <sql:query name="user">
       select u.uri, u.description_de from uris u, userUri v where u.id = 
v.id_uri and v.id_user = 
		'<sql:substitute-value name="userId"/>'
     </sql:query>
    </sql:execute-query>  
</page>

and the result

<page>
	<sql:rowset nrofrows="2" name="user">
	<sql:row>
	<sql:uri>
http://www.google.com/
</sql:uri>
<sql:description_de>Christophs Privater Kalender</sql:description_de>
</sql:row>
</sql:rowset>
</page>

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


Re: sql Transformer missing sql namespace

Posted by Christoph Klocker <e0...@student.tuwien.ac.at>.
Hi,
that was the problem, indeed I used Firefox. I checked the source. The 
namespace declaration is included.

thanks,


On Monday 21 May 2007 22:25:20 Jasha Joachimsthal wrote:
> Hi,
>
> which application do you use to view the result? Firefox leaves away the
> namespace declaration often unless you view the 'source'.
>
> Jasha
>

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


RE: sql Transformer missing sql namespace

Posted by Jasha Joachimsthal <j....@hippo.nl>.
Hi,

which application do you use to view the result? Firefox leaves away the namespace declaration often unless you view the 'source'.

Jasha

-----Original Message-----
From:	Christoph Klocker [mailto:e0528012@student.tuwien.ac.at]
Sent:	Mon 5/21/2007 10:19 PM
To:	users@cocoon.apache.org
Cc:	
Subject:	Re: sql Transformer missing sql namespace

Hi, 
thats what i did, forgot to comment it out in my previous posting.
so, this leads to the same result, no sql namespace declaration.

<map:match pattern="userUris">
			 <map:generate src="sql/userUri.xml" />
			 <map:transform type="sql">
				<map:parameter name="use-connection" value="vedanova" />
				<map:parameter name="show-nr-of-rows" value="true"/> 
   				<map:parameter name="clob-encoding" value="UTF-8"/> 
   				<map:parameter name="userId" value="1"/> 
			 </map:transform>			
			  	<map:serialize type="xml" />   
			</map:match>

regards

On Monday 21 May 2007 22:13:19 Joerg Heinicke wrote:
> On 21.05.2007 21:56, Christoph Klocker wrote:
> > I am using the sql transformer. I have the problem that the resulting xml
> > is missing the xmlns:sql declaration.
>
> Sorry, but this makes me laughing :) I only know the effect that the
> namespace declaration is coming out twice.
>
> Can you try it without the xslt transformation after it, so serializing
> directly to XML?
>
> Regards
> Joerg
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org



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





Re: sql Transformer missing sql namespace

Posted by Christoph Klocker <e0...@student.tuwien.ac.at>.
Hi, 
thats what i did, forgot to comment it out in my previous posting.
so, this leads to the same result, no sql namespace declaration.

<map:match pattern="userUris">
			 <map:generate src="sql/userUri.xml" />
			 <map:transform type="sql">
				<map:parameter name="use-connection" value="vedanova" />
				<map:parameter name="show-nr-of-rows" value="true"/> 
   				<map:parameter name="clob-encoding" value="UTF-8"/> 
   				<map:parameter name="userId" value="1"/> 
			 </map:transform>			
			  	<map:serialize type="xml" />   
			</map:match>

regards

On Monday 21 May 2007 22:13:19 Joerg Heinicke wrote:
> On 21.05.2007 21:56, Christoph Klocker wrote:
> > I am using the sql transformer. I have the problem that the resulting xml
> > is missing the xmlns:sql declaration.
>
> Sorry, but this makes me laughing :) I only know the effect that the
> namespace declaration is coming out twice.
>
> Can you try it without the xslt transformation after it, so serializing
> directly to XML?
>
> Regards
> Joerg
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org



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


Re: sql Transformer missing sql namespace

Posted by Joerg Heinicke <jo...@gmx.de>.
On 21.05.2007 21:56, Christoph Klocker wrote:

> I am using the sql transformer. I have the problem that the resulting xml is 
> missing the xmlns:sql declaration. 

Sorry, but this makes me laughing :) I only know the effect that the 
namespace declaration is coming out twice.

Can you try it without the xslt transformation after it, so serializing 
directly to XML?

Regards
Joerg

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