cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald Ball <ba...@webslingerZ.com>
Subject Re: ESQL in stylesheet question
Date Tue, 17 Oct 2000 18:30:48 GMT
On Tue, 17 Oct 2000, Chris Meyer wrote:

> I'm trying to use ESQL in a stylesheet defined similar to the following:
> 
> <?xml version="1.0"?>
> 
> <xsl:stylesheet version="1.0"
>    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>    xmlns:esql="http://apache.org/cocoon/SQL/v2"
>    xmlns:xsp="http://www.apache.org/1999/XSP/Core"
>    xmlns:myss="http://someurl.com/myss"
> >
> 
> 
> <xsl:template match="myss:query">
>      <esql:execute-query>
>        ... driver, url, username, password, query, etc. clipped out ...
>      </esql:execute-query>
> </xsl:template>
> 
> <xsl:template match="xsp:page">
>    <xsp:page>
>      <xsl:apply-templates select="@*"/>
>      <xsl:apply-templates/>
>    </xsp:page>
> </xsl:template>
> 
> <xsl:template match="@*|*|text()|processing-instruction(  )">
>    <xsl:copy>
>      <xsl:apply-templates select="@*|*|text()|processing-instruction(  )"/>
>    </xsl:copy>
> </xsl:template>
> 
> </xsl:stylesheet>
> 
> 
> 
> I also have an .xml page like:
> 
> <?xml version="1.0"?>
> <?xml-stylesheet href="index.xsl" type="text/xsl"?>
> <?cocoon-process type="xsp"?>
> <!-- <?cocoon-process type="xslt"?> -->
> 
> <xsp:page
>    language="java"
>    xmlns:xsp="http://www.apache.org/1999/XSP/Core"
>    xmlns:request="http://www.apache.org/1999/XSP/Request"
>    xmlns:myss="http://someurl.com/myss"
> >
> 
> <data>
>    <myss:query/>
> </data>
> 
> </xsp:page>
> 
> 
> When I load this in my browser, all I get is the text of the driver, 
> the username, password, query, etc.
> 
> This is similar to other people's problems (mohamed ramzy) but I 
> haven't seen an answer that helps me.
> 
> I'm sure its something trivial -- anyone have any ideas?

you need to declare the esql namespace in your xml file. yes, it's stupid,
but it's necessary in c1. alternately, you could put a xml-logicsheet PI
in your xml file.

- donald


Mime
View raw message