You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by David Rosenstrauch <da...@dti.net> on 2002/01/02 15:16:10 UTC
Re: sql query
At 12:48 PM 12/28/01 +0100, you wrote:
>I'm using cocoon2, and I've used sql queries, with the next query:
>
><?xml version="1.0"?>
><page xmlns:sql="http://apache.org/cocoon/SQL/2.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
> <title></title>
> <content>
> <para></para>
> <execute-query xmlns="http://apache.org/cocoon/SQL/2.0">
> <query name="bioquimica">
> select id,numero,url from bioquimica
> </query>
> </execute-query>
>
> </content>
></page>
>
>But I don't know how can I get the attribute of the query. (it's called "bioquimica")
><xsl:template match="sql:rowset">
><xsl:value-of select="???"/>
></xsl:template>
>
>
>thanks
<xsl:value-of select="query[@name='bioquimica'"/>
DR
---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: sql query
Posted by Ferran Urgell <fe...@hotmail.com>.
I don't know what happens but not work.....(Do you know that I'm using a
connection to database mysql for to get the xml file...
This is my xsl file........(the xml is in my last email) And I would to get
the name of the query......
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:sql="http://apache.org/cocoon/SQL/2.0"
xmlns:redirect="org.apache.xalan.xslt.extensions.Redirect"
extension-element-prefixes="redirect">
<xsl:template match="/">
<MENU1>
<TREE_SCRIPT> 1.01
<HEAD>gg
</HEAD>
<BODY>
<MENU>
<xsl:apply-templates select="query[@name='bioquimica']"/>
</MENU>
</BODY>
</TREE_SCRIPT>
</MENU1>
</xsl:template>
<xsl:template match="sql:row">
<MENU>text=<xsl:value-of select="query[@name]"/> ????????????????
<LINK>text=<xsl:value-of select="numero"/>,urlsource=<xsl:apply-templates
select="sql:url"/>,urltarget=main</LINK>
</MENU>
</xsl:template>
</xsl:stylesheet>
----- Original Message -----
From: "David Rosenstrauch" <da...@dti.net>
To: <co...@xml.apache.org>
Sent: Wednesday, January 02, 2002 3:16 PM
Subject: Re: sql query
> At 12:48 PM 12/28/01 +0100, you wrote:
> >I'm using cocoon2, and I've used sql queries, with the next query:
> >
> ><?xml version="1.0"?>
> ><page xmlns:sql="http://apache.org/cocoon/SQL/2.0"
> > xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
> > <title></title>
> > <content>
> > <para></para>
> > <execute-query xmlns="http://apache.org/cocoon/SQL/2.0">
> > <query name="bioquimica">
> > select id,numero,url from bioquimica
> > </query>
> > </execute-query>
> >
> > </content>
> ></page>
> >
> >But I don't know how can I get the attribute of the query. (it's called
"bioquimica")
> ><xsl:template match="sql:rowset">
> ><xsl:value-of select="???"/>
> ></xsl:template>
> >
> >
> >thanks
>
>
> <xsl:value-of select="query[@name='bioquimica'"/>
>
>
> DR
>
>
> ---------------------------------------------------------------------
> 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: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>
>
---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>