You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Roger Ting <ro...@hotmail.com> on 2002/09/15 06:04:29 UTC

Weird Error

Have you tried ESQL instead of directly using sql transformer?

Well i have tried ESQL but it just throwing sitemap error even though
my sitemap seems to be correct!

<?xml version="1.0" encoding="UTF-8"?>
<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">

<!-- This is where all the component declarations go to  -->
    <map:components>

    <!-- All the Generators Declaration goes here-->
        <map:generators default="file">
    <!-- This is the declaration for the XSP generator component -->
        <map:generator name="xsp" 
src="org.apache.cocoon.generation.ServerPagesGenerator"/>
        </map:generators>
    <!-- All the Readers Declaration goes here-->
        <map:readers>
        </map:readers>
        <map:transformers default="xslt">
    <!-- All the Transfomers Declaration goes here-->
        </map:transformers>
        <map:actions>
    <!-- All the Actions Declaration goes here-->
        </map:actions>
        <map:serializers>
    <!-- All the Serializers Declaration goes here-->
        </map:serializers>
        <map:matchers>
    <!-- All the Matchers  Declaration goes here-->
        </map:matchers>
        <map:selectors>
    <!-- All the Selectors Declaration goes here -->
        </map:selectors>
    </map:components>
    <!-- This is where all the pipeline declared -->
    <map:pipelines>
     <!-- Pipeline definitions -->

     <!--
        This pipeline is setup for testing connection
        to JDBC
     -->
        <map:pipeline>
                <map:match pattern="*.xml">
                <map:generate type="xsp" src="Xsp/{1}.xsp"/>
                <map:serialize type="xml" />
                </map:match>
        </map:pipeline>
    </map:pipelines>
</map:sitemap>
                                                                       Is 
there something wrong with my sitemap or something wrong with ESQL
that everyone seems to be using SQL transformer?? Doesn't cocoon has
any decent debugging tools. The error message hasn't been much of help.


>From: Michael Maluck <ti...@gmx.de>
>Reply-To: cocoon-users@xml.apache.org
>To: cocoon-users <co...@xml.apache.org>
>Subject: pipeline or sql transformer problem
>Date: Sat, 14 Sep 2002 19:16:56 +0200
>
>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>




_________________________________________________________________
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com


---------------------------------------------------------------------
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: Weird Error

Posted by Michael Maluck <ti...@gmx.de>.
Hello Roger,

thanks for your answer.

> Have you tried ESQL instead of directly using sql transformer?
Yes, this works for me but I want parts of the page
dynamically created before processing the sql statements.
I don't know how to do this with ESQL.

> Well i have tried ESQL but it just throwing sitemap error even though
> my sitemap seems to be correct!
The error I get with your sitemap is about the matchers. The problem is
here:
>         <map:matchers>
>     <!-- All the Matchers  Declaration goes here-->
>         </map:matchers>
As you write already in your comment, this is the definition of all matchers.
You define here own matchers and overwrite the ones from the parent
sitemap. The definition is empty and so the cocoon egine complains
not to find any matchers. Just delete this component definition
or copy the one you need from the parent sitemap if you want to
reduce the number of matchers.
Be careful you are doing this not only with matchers.

>                                                                        Is 
> there something wrong with my sitemap or something wrong with ESQL
> that everyone seems to be using SQL transformer?? Doesn't cocoon has
> any decent debugging tools. The error message hasn't been much of help.
Decent debugging tools... hm. Not that I know of any... unfortunately.

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: Weird Error

Posted by Michael Maluck <mi...@gmx.de>.
Hello Roger,

thanks for your answer.

> Have you tried ESQL instead of directly using sql transformer?
Yes, this works for me but I want parts of the page
dynamically created before processing the sql statements.
I don't know how to do this with ESQL.

> Well i have tried ESQL but it just throwing sitemap error even though
> my sitemap seems to be correct!
The error I get with your sitemap is about the matchers. The problem is
here:
>         <map:matchers>
>     <!-- All the Matchers  Declaration goes here-->
>         </map:matchers>
As you write already in your comment, this is the definition of all matchers.
You define here own matchers and overwrite the ones from the parent
sitemap. The definition is empty and so the cocoon egine complains
not to find any matchers. Just delete this component definition
or copy the one you need from the parent sitemap if you want to
reduce the number of matchers.
Be careful you are doing this not only with matchers.

>                                                                        Is 
> there something wrong with my sitemap or something wrong with ESQL
> that everyone seems to be using SQL transformer?? Doesn't cocoon has
> any decent debugging tools. The error message hasn't been much of help.
Decent debugging tools... hm. Not that I know of any... unfortunately.

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: Weird Error

Posted by Michael Maluck <mi...@gmx.de>.
Hello Roger,

thanks for your answer.

> Have you tried ESQL instead of directly using sql transformer?
Yes, this works for me but I want parts of the page
dynamically created before processing the sql statements.
I don't know how to do this with ESQL.

> Well i have tried ESQL but it just throwing sitemap error even though
> my sitemap seems to be correct!
The error I get with your sitemap is about the matchers. The problem is
here:
>         <map:matchers>
>     <!-- All the Matchers  Declaration goes here-->
>         </map:matchers>
As you write already in your comment, this is the definition of all matchers.
You define here own matchers and overwrite the ones from the parent
sitemap. The definition is empty and so the cocoon egine complains
not to find any matchers. Just delete this component definition
or copy the one you need from the parent sitemap if you want to
reduce the number of matchers.
Be careful you are doing this not only with matchers.

>                                                                        Is 
> there something wrong with my sitemap or something wrong with ESQL
> that everyone seems to be using SQL transformer?? Doesn't cocoon has
> any decent debugging tools. The error message hasn't been much of help.
Decent debugging tools... hm. Not that I know of any... unfortunately.

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>