You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Adrian Geissel <ag...@zenark.com> on 2001/07/03 10:36:12 UTC
Extending the standard Cocoon XSP logicsheets, namely ESQL
Hi,
I'm using Cocoon 1.8.2 and it's great - dynamic content generation in an efficient and controlled manner - a real winner!
As with all technologies, there comes a point when you want it to do more - and my current aspiration is to improve the way that SQL is handled, specifically the ESQL.xsl logicsheet. What I am trrying to do is to structure the query statement that is passed as part of the esql:query tag, as follows:
...
<esql:query>
<zsql:select>
<zsql:field column="*"/>
<zsql:source view="v_test"/>
<zsql:where>
<zsql:eq>
<zsql:field column="id"/>
<zsql:value><request:get-parameter name="id"></zsql:value>
</zsql:eq>
</zsql:where>
</zsql:select>
</esql:query>
<esql:results>
...
</esql:results>
...
I have a logic sheet that handles the zsql namespace and it works really well on its own - it even allows other logicsheets (taglibs) to be called from it using a 'get-nested-content' template (such as the <request:get-parameter..> in the sample). However, the above code structure results in Cocoon generating a DOM sub-tree under the <esql:query> tag, rather than calling the appropriate templates to format the query string.
I have tried a number of approaches, including adding the zsql namespace to the esql <xsp:page> tag, and I believe that my logicsheet is locatable, as I created a jar, included it in the CLASSPATH and also updated the cocoon.properties to point to it.
Is there something that I have missed, or am I trying the impossible? Any help is gladly appreciated.
On a slightly different note, if anyone is curious about the zsql stuff, please drop me a line as I am putting together an open project to structure and deploy sql script from single source to multiple destination (vendors) as well as documentation - a really nice showcase for Cocoon, if nothing else.
Many thanks,
Adrian