cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthew Cordes <mcord...@maine.edu>
Subject Re: <?xml-logicsheet ...?> and esql
Date Thu, 14 Dec 2000 05:04:13 GMT
Donald, 

That didn't seem to work, but this is my second logicsheet so I most
likely am in error.

my logicsheet:

<?xml version="1.0"?>
<xsl:stylesheet version="1.0" 
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:mine="http://mine.com/my-logicsheet"  
>

<xsl:template match="mine:do-stuff">
  <esql:execute-query>
    <esql:query>
      select name, description from some_table where some condition
    </esql:query>

		<esql:results>
			<record>
				<name><esql:get-string column="name"/></name>
				<description><esql:get-string column="name"/></description>
			</record>
		</esql:results>

		<esql:error-results>

			<!-- BUG?: with the newest cvs version i get null pointer exceptions
				when i include the below -->
			<!--
				<message><esql:get-message/></message>
				<stack><esql:get-stacktrace/></stack>
			-->
		</esql:error-results>
  </esql:execute-query>
</xsl:template>

<xsl:template match="@*|*|text()|processing-instruction()">
<xsl:copy>
  <xsl:apply-templates select="@*|*|text()|processing-instruction()"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>	


my page: 
?xml version="1.0"?>
<?cocoon-process type="xsp"?>
<?xml-logicsheet href="logicsheet.xsl" type="text/xsl"?>
<xsp:page language="java"
	xmlns:esql="http://apache.org/cocoon/SQL/v2"
	xmlns:mine="http://mine.com/my-logicsheet"  
	xmlns:xsp="http://www.apache.org/1999/XSP/Core"
>

<page>
	<mine:do-stuff/>
</page>
</xsp:page>


the result:
<page xmlns:mine="http://mine.com/my-logicsheet">
	<esql:execute-query>
		<esql:query>
			select name, description from some_table where some condition
		</esql:query>
		
		<record>
			<name><esql:get-string column="name"></esql:get-string></name>
			<description><esql:get-string column="name"></esql:get-string></description>
		</record>
	</esql:execute-query>
</page>


Am i doing something wrong?  It appears exactly as before (I added
appropriate formatting) except <esql:results> is missing. Oh, and I'm
using esql from cvs as of 11:00pm Eastern 12/14/00.

-matt






On Wed, Dec 13, 2000 at 09:34:05PM -0500, Donald Ball wrote:
> On Wed, 13 Dec 2000, Matthew Cordes wrote:
> 
> > Anyone have any idea why when i use the esql logicsheet with my own logic
> > sheet it doesn't appear to work, the esql tags just appear in the output.
> > I am using the version that came with 1.8 and I include the namespace
> > in the logicsheet.
> 
> you'll need to declare the esql namespace in the page itself. yeah, this
> sucks, it's a deficiency in the xsp processor in c1.
> 
> - donald
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
> 

Mime
View raw message