You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Michael Maluck <ti...@gmx.de> on 2002/09/14 19:16:56 UTC

pipeline or sql transformer problem

hello again,

more strange things happen. please try the following:

use this pipeline:
------------------
      <map:match pattern="test">
        <map:generate src="test.xml"/>
        <map:transform src="test.xsl"/>
        <map:transform type="sql">
          <map:parameter name="use-connection" value="test"/>
          <map:parameter name="show-nr-of-rows" value="true"/>
        </map:transform>
        <map:serialize type="xml"/>
      </map:match>

content of test.xml
-------------------
<?xml version="1.0" encoding="UTF-8"?>
<page xmlns:sql="http://apache.org/cocoon/SQL/2.0">
  <execute-query xmlns="http://apache.org/cocoon/SQL/2.0">
    <query>  
      select name from users
    </query>
  </execute-query>
</page>

content of test.xsl
-------------------
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  <xsl:template match="@*|node()" priority="-1">
    <xsl:copy><xsl:apply-templates select="@*|node()"/></xsl:copy>
  </xsl:template>
</xsl:stylesheet>

The result is:
--------------
<?xml version="1.0" encoding="UTF-8"?>

<page xmlns:xmlns:sql="http://apache.org/cocoon/SQL/2.0">
  <rowset xmlns="http://apache.org/cocoon/SQL/2.0" xmlns:sql="http://apache.org/cocoon/SQL/2.0" nrofrows="1"><row><name>Firmenverwalter</name></row></rowset>
</page>

-------------------------------------------------------------

Look at the namespace definition in the page element. It is
"xmlns:xmlns:sql="http://apache.org/cocoon/SQL/2.0"!

A bit strange is the fact, that if you comment out the xslt
transformer in the pipeline the namespache definition in the
page element does not appear at all.
As you can see, the xslt transformer should not change the source
in any way. Don't understand this. Maybe someone can help.

Michael

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: pipeline or sql transformer problem

Posted by Michael Maluck <mi...@gmx.de>.
Now I tried it with esql and a logicsheet. Same problem.
If I use the logicsheet I get an xmlns:xmlns:sql namespace.
Any ideas?

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: pipeline or sql transformer problem

Posted by Michael Maluck <mi...@gmx.de>.
Have to correct myself. With esql and a logicsheet all works fine.

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: pipeline or sql transformer problem

Posted by Michael Maluck <ti...@gmx.de>.
Have to correct myself. With esql and a logicsheet all works fine.

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: pipeline or sql transformer problem

Posted by Michael Maluck <ti...@gmx.de>.
Now I tried it with esql and a logicsheet. Same problem.
If I use the logicsheet I get an xmlns:xmlns:sql namespace.
Any ideas?

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>