Aloha Cocooners,
I'm having a problem using esql in a logic sheet. Please keep in mind I'm using Cocoon 1.82 so cocoon 2.x solutions won't help :( Here's the logicsheet <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsp="http://www.apache.org/1999/XSP/Core" xmlns:esql="http://apache.org/cocoon/SQL/v2" xmlns:xspdoc="http://apache.org/cocoon/XSPDoc/v1" xmlns:fourc="http://foo.4charity.com/fourc" version="1.0"> <!-- This template copies the root elements for processing by --> <!-- other logicsheets as necessary. Also, various class-level --> <!-- code and package imports may be done here. --> <xsl:template match="xsp:page"> <xsl:copy> <xsl:apply-templates select="@*"/> <xsl:apply-templates/> </xsl:copy> </xsl:template> <!-- This template defines the tag "greeting:hello-world" --> <xsl:template match="fourc:test"> <!-- more complex XSLT is possible here as well --> <xsp:logic> String msg = "Poop Really Smells!"; </xsp:logic> <greeting><xsp:expr>msg</xsp:expr></greeting> </xsl:template> <xsl:template match="fourc:categories1"> <xsp:logic> <Categories>This Worked</Categories> </xsp:logic> </xsl:template> <xsl:template match="fourc:categories"> <!-- more complex XSLT is possible here as well --> <xsp:logic> <xsp:content> <!-- I've tried not using the content tags too--> <Categories> <esql:connection> <esql:pool>default</esql:pool> <esql:execute-query> <esql:query>select * from AWARD_CATEGORY</esql:query> <esql:results> <esql:row-results> <Category> <CATEGORY_ID> <esql:get-int column="CATEGORY_ID"/> </CATEGORY_ID> <DESCRIPTION> <esql:get-string column="DESCRIPTION"/> </DESCRIPTION> </Category> </esql:row-results> <esql:no-results> <user>No Results</user> </esql:no-results> </esql:results> </esql:execute-query> </esql:connection> </Categories> </xsp:content> </xsp:logic> </xsl:template> <xsl:template match="@*|node()" priority="-1"> <xsl:copy> <xsl:apply-templates select="@*|node()"/> </xsl:copy> </xsl:template> </xsl:stylesheet> ----------------------------------------- both <fourc:test/> and <fourc:categories1/> work fine, however <fourc:categories/> just returns the raw esql xml and never hits the database. Any ideas out there?? ------------------------------------------- here's the xml <?xml version="1.0"?> <?cocoon-process type="xsp"?> <?xml-logicsheet href="logicsheet.categories.xsl"?> <xsp:page xmlns:xsp="http://www.apache.org/1999/XSP/Core" xmlns:fourc="http://foo.4charity.com/fourc"> <page> <fourc:categories/> </page> </xsp:page> -------------------------------------------------------- Also a WORKING XML file that does the same query as I want to do in the logicsheet. <?xml version="1.0"?> <?cocoon-process type="xsp"?> <xsp:page xmlns:xsp="http://www.apache.org/1999/XSP/Core" xmlns:esql="http://apache.org/cocoon/SQL/v2"> <Categories> <esql:connection> <esql:pool>default</esql:pool> <esql:execute-query> <esql:query>select * from AWARD_CATEGORY</esql:query> <esql:results> <esql:row-results> <Category> <CATEGORY_ID> <esql:get-int column="CATEGORY_ID"/> </CATEGORY_ID> <DESCRIPTION> <esql:get-string column="DESCRIPTION"/> </DESCRIPTION> </Category> </esql:row-results> <esql:no-results> <user>No Results</user> </esql:no-results> </esql:results> </esql:execute-query> </esql:connection> </Categories> </xsp:page> HELP!!! Mahalo! Sunday, March 10, 2002, 11:17:25 PM, you wrote: SB> Yes I taje a look at this address. I *believe* that my application is equal SB> to this example. SB> I have written SB> <xi:include> SB> <xsp:attribute name="href"><xsp:expr></xsp:expr></xsp:attribute> SB> </xi:include> SB> and I have tried also with SB> <xi:include href="example.xml"/> SB> but the error is always the same. SB> Perhaps I don't understand what do you mean with: SB> ********************************************************************** SB> *This takes an HREF. Might work w/ xsp:expr, never tried... * SB> ********************************************************************** SB> Thanks SB> Stefano SB> ----- Original Message ----- SB> From: "Benjamin Grant" <[EMAIL PROTECTED]> SB> To: <[EMAIL PROTECTED]>; "Stefano Bonnin" <[EMAIL PROTECTED]> SB> Sent: Friday, March 08, 2002 3:33 AM SB> Subject: Re: xinclude problem >> >> Sorry, hit send before pasting the link: >> >> RTFM at >> SB> http://xml.apache.org/cocoon/userdocs/transformers/xinclude-transformer.html >> >> >> This takes an HREF. Might work w/ xsp:expr, never tried... >> >> >> On Thursday 07 March 2002 07:50 am, Stefano Bonnin wrote: >> > Hi I'm trying to use XInclude transformer but when I run the Cocoon >> > application I receive the following error >> > >> >> <snip> >> >> --------------------------------------------------------------------- >> 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]> SB> --- SB> Outgoing mail is certified Virus Free. (CopyRight FLASHH!) SB> Checked by AVG anti-virus system (http://www.grisoft.com). SB> Version: 6.0.330 / Virus Database: 184 - Release Date: 28/02/02 SB> --------------------------------------------------------------------- SB> Please check that your question has not already been answered in the SB> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html> SB> To unsubscribe, e-mail: <[EMAIL PROTECTED]> SB> For additional commands, e-mail: <[EMAIL PROTECTED]> -- Mahalo, Russell mailto:[EMAIL PROTECTED] Distinguished Engineer "I know how hard it is for you to put food on your family." -Our President --------------------------------------------------------------------- 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]>