Obviously the ESQL logicsheet is not being applied.  In Cocoon 1 this would
imply that you had removed the declaration of the esql logicsheet from
cocoon.properties, or that your namespace declaration URI didn't match the
one in the logicsheet.  I don't know how this works in Cocoon 2; maybe the
sitemap?  I know some of the namespace URI's have changed; is it possible
that the one for ESQL is something other than "
http://apache.org/cocoon/SQL/v2";?

If either of these is true then you shouldn't be able to even get a simple
XSP using ESQL to work.

If you *can* get ESQL to work using simple XSP, then it suggests that you
are somehow managing to strip out the ESQL namespace declaration with your
logicsheet.  If that is also not true, perhaps you have found a bug, and
should report it to cocoon-dev.

Sorry I can't help more - I haven't yet upgraded to C2.

-Christopher




Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:

Subject:  [c2] q: howto use ESQL inside own logicsheets?


Hi all,
i want my logicsheet to use ESQL, i try this:


<!-- my logicsheet -->
<xsl:stylesheet version="1.0"
     xmlns:esql="http://apache.org/cocoon/SQL/v2";
     xmlns:xsp="http://apache.org/xsp";
     xmlns:my-logicsheet="http://my.org/my-logicsheet";
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>

     <xsl:template match="my-logicsheet:my-tag">
          <esql:connection>
               <esql:pool>my-pool</esql:pool>

               <esql:execute-query>
                    <esql:query>SELECT * FROM my-table</esql:query>

                    <esql:results>
                         <esql:row-results>
                              <xsp:element name="my-element">
                                   <xsp:attribute name="my-attr">
                                         <esql:get-string column
="my-string-column"/>
                                   </xsp:attribute>
                              </xsp:element>
                         </esql:row-results>
                    </esql:results>
               </esql:execute-query>
          </esql:connection>
     </xsl:template>

</xsl:stylesheet>

<!-- my server page -->
<xsp:page
     xmlns:esql="http://apache.org/cocoon/SQL/v2";
     xmlns:xsp="http://apache.org/xsp";
     xmlns:my-logicsheet="http://my.org/my-logicsheet";>

     <element-embding-my-tag>
          <my-logisheet:my-tag>
     </element-embding-my-tag>
</xsp:page>


<!-- output is -->
<element-embding-my-tag
     <!-- namespace declarations -->
     >
     <esql:connection>
          <esql:pool>fp</esql:pool>
          <esql:execute-query>
               <esql:query>SELECT * FROM my-table</esql:query>
               <esql:results>
                    <esql:row-results>
                         <my-element my-attr=""/>
                         <!-- unprocessed esql tags -->
                         <!-- xsp has been processed -->
                    </esql:row-results>
               </esql:results>
          </esql:execute-query>
     </esql:connection>
</element-embding-my-tag>


please tell me why i sthat so, and what i i need to understend to use this
properly.

thanks in advance,
     hubert.

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

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>








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

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

Reply via email to