You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Robert Douglass <r....@onlinehome.de> on 2003/03/11 23:45:57 UTC
double namespace attribute
Does anyone know why my sql transformation returns an element with two xmlns
attributes?
<rowset xmlns="http://apache.org/cocoon/SQL/2.0"
xmlns="http://apache.org/cocoon/SQL/2.0">
Using cocoon-2.0.4-bm14
<map:pipeline>
<map:match pattern="browse">
<map:generate src="Rob/browse/browse.xml"/>
<map:transform src="Rob/browse/browse.xslt">
<map:parameter name="use-request-parameters" value="true"/>
</map:transform>
<map:transform src="" type="sql">
<map:parameter name="use-connection" value="sites"/>
</map:transform>
<map:serialize/>
</map:match>
</map:pipeline>
The xml going into the sql transformation looks like this:
<execute-query xmlns="http://apache.org/cocoon/SQL/2.0">
<query>select type from all_documents where id='4711'</query>
</execute-query>
Thanks,
Robert Douglass
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org
SOLUTION: double namespace attribute in SQL Transformer
Posted by Robert Douglass <r....@onlinehome.de>.
Here is the solution that I believe Charles was suggesting (for those who
are as XML inept as I, it is nice to have this in black and white)
<?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="/">
<root>
<sql:execute-query>
<sql:query>
SELECT * FROM foo
</sql:query>
</sql:execute-query>
</root>
</xsl:template>
</xsl:stylesheet>
----------------------------------------------------------------------
Don't know why, exactly, but this has been discussed here before and
the work around is to use namespace prefixes on all elements, ie don't
use a default namespace in the document with the query. Something along
those lines anyway. This works for me.
Charles
Robert Douglass wrote:
>Does anyone know why my sql transformation returns an element with two
xmlns
>attributes?
>
><rowset xmlns="http://apache.org/cocoon/SQL/2.0"
>xmlns="http://apache.org/cocoon/SQL/2.0">
>
>Using cocoon-2.0.4-bm14
>
><map:pipeline>
><map:match pattern="browse">
><map:generate src="Rob/browse/browse.xml"/>
><map:transform src="Rob/browse/browse.xslt">
><map:parameter name="use-request-parameters" value="true"/>
></map:transform>
><map:transform src="" type="sql">
><map:parameter name="use-connection" value="sites"/>
></map:transform>
><map:serialize/>
></map:match>
></map:pipeline>
>
>The xml going into the sql transformation looks like this:
><execute-query xmlns="http://apache.org/cocoon/SQL/2.0">
><query>select type from all_documents where id='4711'</query>
></execute-query>
>
>Thanks,
>
>Robert Douglass
>
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org
RE: double namespace attribute
Posted by Robert Douglass <r....@onlinehome.de>.
Thank you Charles. The only tag with a default namespace is <query>... what
namespace should it be, and where do I define it?
-Robert Douglass
-----Original Message-----
From: Charles Yates [mailto:ceyates@stanford.edu]
Sent: Wednesday, 12 March, 2003 12:03 AM
To: cocoon-users@xml.apache.org
Subject: Re: double namespace attribute
Don't know why, exactly, but this has been discussed here before and
the work around is to use namespace prefixes on all elements, ie don't
use a default namespace in the document with the query. Something along
those lines anyway. This works for me.
Charles
Robert Douglass wrote:
>Does anyone know why my sql transformation returns an element with two
xmlns
>attributes?
>
><rowset xmlns="http://apache.org/cocoon/SQL/2.0"
>xmlns="http://apache.org/cocoon/SQL/2.0">
>
>Using cocoon-2.0.4-bm14
>
><map:pipeline>
><map:match pattern="browse">
><map:generate src="Rob/browse/browse.xml"/>
><map:transform src="Rob/browse/browse.xslt">
><map:parameter name="use-request-parameters" value="true"/>
></map:transform>
><map:transform src="" type="sql">
><map:parameter name="use-connection" value="sites"/>
></map:transform>
><map:serialize/>
></map:match>
></map:pipeline>
>
>The xml going into the sql transformation looks like this:
><execute-query xmlns="http://apache.org/cocoon/SQL/2.0">
><query>select type from all_documents where id='4711'</query>
></execute-query>
>
>Thanks,
>
>Robert Douglass
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
>For additional commands, e-mail: cocoon-users-help@xml.apache.org
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org
Re: double namespace attribute
Posted by Charles Yates <ce...@stanford.edu>.
Don't know why, exactly, but this has been discussed here before and
the work around is to use namespace prefixes on all elements, ie don't
use a default namespace in the document with the query. Something along
those lines anyway. This works for me.
Charles
Robert Douglass wrote:
>Does anyone know why my sql transformation returns an element with two xmlns
>attributes?
>
><rowset xmlns="http://apache.org/cocoon/SQL/2.0"
>xmlns="http://apache.org/cocoon/SQL/2.0">
>
>Using cocoon-2.0.4-bm14
>
><map:pipeline>
><map:match pattern="browse">
><map:generate src="Rob/browse/browse.xml"/>
><map:transform src="Rob/browse/browse.xslt">
><map:parameter name="use-request-parameters" value="true"/>
></map:transform>
><map:transform src="" type="sql">
><map:parameter name="use-connection" value="sites"/>
></map:transform>
><map:serialize/>
></map:match>
></map:pipeline>
>
>The xml going into the sql transformation looks like this:
><execute-query xmlns="http://apache.org/cocoon/SQL/2.0">
><query>select type from all_documents where id='4711'</query>
></execute-query>
>
>Thanks,
>
>Robert Douglass
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
>For additional commands, e-mail: cocoon-users-help@xml.apache.org
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org