I can't make it work, the esql tags are not interpreted
i also use esql tags in file.xsp where it works
if someone can help me thanks.
(I know similar questions have been posted, but i could find a solution
in the answers )
C.
here's the namespace in my xsp file
===============file.xsp=======
<xsp:page
language="java"
xmlns:xsp="http://apache.org/xsp"
xmlns:esql="http://apache.org/cocoon/SQL/v2"
>
...
</xsp:page>
========================
the part of the xsl i'd like to see working :
==========file.xsl=====================
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:esql="http://apache.org/cocoon/SQL/v2"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>
<xsl:template match="columns" mode="add">
<xsl:apply-templates select="col" mode="add"/>
</xsl:template>
<xsl:template match="col" mode="add">
<xsl:variable name="nom"><xsl:value-of select="name/."/></xsl:variable>
<xsl:variable name="type"><xsl:value-of select="type/."/></xsl:variable>
<xsl:if test="$nom!='id'">
<td>
<xsl:choose>
<xsl:when test="starts-with($nom, 'text_')">
<xsl:value-of select="substring-after($nom,'_')"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$nom"/>
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="starts-with($nom, '_')">
<esql:connection>
<esql:driver>org.gjt.mm.mysql.Driver</esql:driver>
<esql:dburl>jdbc:mysql://xxxxxx/listes</esql:dburl>
<esql:username>****</esql:username>
<esql:password>*****</esql:password>
<esql:execute-query>
<esql:query>
select * from <esql:parameter><xsl:value-of
select="substring-after(substring-before($nom,'__'),'_')"/></esql:parameter>
</esql:query>
<esql:results>
<esql:row-results>
<esql:get-string column="type"/>
</esql:row-results>
</esql:results>
</esql:execute-query>
</esql:connection>
</xsl:when>
<xsl:otherwise>
</xsl:otherwise>
</xsl:choose>
</td>
</xsl:if>
</xsl:template>
---------------------------------------------------------------------
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]>