Subject: [xsl] displaying sql results in dropdown menus From: Matt Rich <mattaios@xxxxxxxxxx> Date: Thu, 19 Aug 2004 09:53:17 +0200 |
I'm trying to get dropdown menus of values from a xml file, which is the result of a SQL request:
<idattr>sql:id_collection</idattr> <idattr>sql:libelle_collection</idattr>
<td> <rowset xmlns="http://apache.org/cocoon/SQL/2.0" nrofrows="12"> <row> <id_collection>1</id_collection> <libelle_collection>CIP</libelle_collection> </row> <row> <id_collection>2</id_collection> <libelle_collection>Champignons</libelle_collection> </row> <row> <id_collection>3</id_collection> <libelle_collection>IEBC</libelle_collection> </row>
</rowset> </td>
(I don't directly put the attributes' id s in the xsl because I want a generalized file, which could work for any request' s result)
<xsl:variable name="idattr1" select="../../idattr[1]"/> <xsl:variable name="idattr2" select="../../idattr[2]"/>
<select size="1" name=""> <option value="-1">- Silectionnez :</option>
<xsl:for-each select="sql:row"> <option value= "$idattr1"> <xsl:value-of select="$idattr2"/> </option> </xsl:for-each> </select>
... All I manage to obtain is :
<td>Collection</td> <td> <select name="" size="1"> <option value="-1">- Silectionnez :</option> <option value="$idattr1">sql:libelle_collection</option> <option value="$idattr1">sql:libelle_collection</option> <option value="$idattr1">sql:libelle_collection</option> </select></td>
instead of the dropdown list with the values INSIDE the " libelle_collection" tags... Perhaps it is a problem with Cocoon's SQL Transformer...
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] interdependant dropdown l, greyson . smith | Thread | Re: [xsl] displaying sql results in, Jeni Tennison |
RE: [xsl] Speed: xsl with xml vs. h, Amir Yiron | Date | Re: [xsl] Dynamicly Generate a appl, Jeni Tennison |
Month |