Yes, it works. Thanks!!!
From: Lars Huttar <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] To: Jonny Pony <[EMAIL PROTECTED]> CC: [EMAIL PROTECTED] Subject: Re: Return XML-nodes from logicsheet Date: Tue, 19 Oct 2004 14:41:58 -0500
Jonny Pony wrote:
Hi,
my aim is to return xml-nodes from a logicsheet, or more precise from the esql-logicsheet in my own logicsheet.
My logicsheet that doesn't work:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsp="http://apache.org/xsp" xmlns:foo="http://foo.bar/esql" xmlns:esql="http://apache.org/cocoon/SQL/v2" version="1.0">
<xsl:template match="xsp:page">
<xsp:page>
...
</xsp:page>
</xsl:template>
...
<xsl:template match="foo:simplexmlreturn"> <xsp:expr><returnnode/></xsp:expr> </xsl:template>
<!-- <xsl:template match="foo:esql"> <xsp:expr> <esql:connection> <esql:pool>mysql-pool-test</esql:pool> <esql:execute-query> <esql:query>SELECT name From mytable</esql:query> <esql:results> <table> <esql:row-results> <name> <esql:get-string column="name"/> </name> </esql:row-results> </table> </esql:results> <esql:no-results> <error>Sorry, no results!</error> </esql:no-results> </esql:execute-query> </esql:connection> <xsp:expr>
I assume you mean </xsp:expr> here.
Normally an XSP-page (with or without a logicsheet) does return XML, that is, it emits XML (as SAX events) that travel down the pipeline to the following transformer or serializer.</xsl:template> --> ...
</xsl:stylesheet>
If I only use the foo:simplexmlreturn-template, I don't get any XML-output in my XSP-Page.
Question 1: How do I return XML? Couldn't find any documentation on this.
If I uncomment the foo:esql-template the logicsheet crashes.
Question 2: How can I use the esql-logicsheet in my own logicsheet and return the resulting xml?
Cheers Jonny
It seems like you don't need the <xsp:expr> wrappers in the above code. If you remove them, does it work?
Lars
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
_________________________________________________________________
MSN Hotmail. Anmelden und gewinnen! http://www.msn.de/email/webbased/ Ihre Chance, eines von 10 T-Mobile MDA II zu gewinnen!
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
