You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Tuan Luu <tu...@gmx.ch> on 2004/03/31 18:00:19 UTC

retrieve data from sql transformer in xsl

hello 
I used the sql Transformer inside an xsl Stylesheet. The resulting  output
looks like 

<anwendungen>
<rowset>
<row>
       <scid>9</scid>
       <anwid>3</anwid>
</row>
<row>
       <scid>11</scid>
       <anwid>4</anwid>
</row>
</rowset>
</anwendungen>

in another stylesheet I'd like to retrieve all the values, but it doesn't
work. The problem is I cannot pass through the rowset element, only <xsl:apply
templates/> works. 
I'd like to do <xsl:value-of select="/page/anwendungen/rowset/row/scid"/>
and this is not working. 
Normally when I put the sql in the xml the tag looks like
<sql:rowset><sql:row> .

thanks for any help, or do you need more infos?
Tuan 

-- 
+++ NEU bei GMX und erstmalig in Deutschland: TÜV-geprüfter Virenschutz +++
100% Virenerkennung nach Wildlist. Infos: http://www.gmx.net/virenschutz


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: retrieve data from sql transformer in xsl

Posted by Jeroen Reijn <jr...@hippo.nl>.
Tuan,

you have to use the sql namespace in front of the element names:

I guess your select would look something like:

<xsl:for-each select="/page/anwendungen/sql:rowset/sql:row">

<xsl:value-of select="sql:scid"/>

</xsl:for-each>

remember to declare the sql namespace in you xsl:stylesheet element like:

<xsl:stylesheet xmlns:sql="http://apache.org/cocoon/SQL/2.0">

Greetz,

Jeroen Reijn



Tuan Luu wrote:

>hello 
>I used the sql Transformer inside an xsl Stylesheet. The resulting  output
>looks like 
>
><anwendungen>
><rowset>
><row>
>       <scid>9</scid>
>       <anwid>3</anwid>
></row>
><row>
>       <scid>11</scid>
>       <anwid>4</anwid>
></row>
></rowset>
></anwendungen>
>
>in another stylesheet I'd like to retrieve all the values, but it doesn't
>work. The problem is I cannot pass through the rowset element, only <xsl:apply
>templates/> works. 
>I'd like to do <xsl:value-of select="/page/anwendungen/rowset/row/scid"/>
>and this is not working. 
>Normally when I put the sql in the xml the tag looks like
><sql:rowset><sql:row> .
>
>thanks for any help, or do you need more infos?
>Tuan 
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org