cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ferran Urgell" <ferran_urg...@hotmail.com>
Subject Re: sql query
Date Thu, 03 Jan 2002 08:20:30 GMT
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" <darose@dti.net>
To: <cocoon-users@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: <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail: <cocoon-users-help@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: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message