You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Sébastien Lefebvre <sl...@i2m.fr> on 2001/08/22 10:03:03 UTC
Problem getting xml from DB
Hi,
I try to get xml from my DB (MySQL), here is my piece of code :
<esql:execute-query>
<esql:query>SELECT piano from TFiche where
IdFiche=<esql:parameter><request:get-parameter
name="idfiche"/></esql:parameter></esql:query>
<esql:results>
<esql:row-results>
<sebas>
<esql:get-xml column="piano"/>
</sebas>
</esql:row-results>
</esql:results>
</esql:execute-query>
node <sebas> is a child of <page> so I have /page/sebas
here is the piece of xml in my DB :
<piano><couleurclaire>#B1DFB0</couleurclaire><couleurfoncee>#A4D1FF</couleurfoncee></piano>
When I try to apply a template in my XSL stylesheet, it does not apply
the template but, instead, write the values of <couleurclaire> and
<couleurfoncee>
....
<xsl:apply-templates select="/page/sebas"/
</body>
</html>
</xsl:template>
<xsl:template name="/page/sebas"/>
<h1>Hello</h1> <!--DOES NOT DISPLAY "HELLO" -->
</xsl:template>
Does you have any idea (I'm sure you have ;-) ) ?
What does the "root" argument of esql:get-xml mean ?
Thanks a lot
Sébastien
---------------------------------------------------------------------
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: Problem getting xml from DB
Posted by Sébastien Lefebvre <sl...@i2m.fr>.
Oups !!!
I had a template name because of the need of a <xsl:call-template> and I
didn't see it !
Thanks again
Sébastien
>hi Sébastien,
>
>><xsl:template name="/page/sebas"/>
>><h1>Hello</h1> <!--DOES NOT DISPLAY "HELLO" -->
>>
>
>u should use match not name
>
>hope it helps,
> hubert
>
>
>
>---
>Ausgehende Mail ist zertifiziert virenfrei.
>Uberpruft durch AVG Antivirus System (http://www.grisoft.com/de).
>Version: 6.0.265 / Virendatenbank: 137 - Erstellungsdatum: 2001-07-18
>
>
>---------------------------------------------------------------------
>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>
Re: Problem getting xml from DB
Posted by Hubert NEOtyk Iwaniuk <hu...@office.ferienwelt.com.pl>.
hi Sébastien,
> <xsl:template name="/page/sebas"/>
> <h1>Hello</h1> <!--DOES NOT DISPLAY "HELLO" -->
u should use match not name
hope it helps,
hubert
---
Ausgehende Mail ist zertifiziert virenfrei.
Uberpruft durch AVG Antivirus System (http://www.grisoft.com/de).
Version: 6.0.265 / Virendatenbank: 137 - Erstellungsdatum: 2001-07-18
---------------------------------------------------------------------
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>