Subject: [xsl] using node-set on a query result From: Leona Slepetis <LSlepetis@xxxxxxxxxxxxxxxx> Date: Sat, 11 Sep 2004 22:46:38 -0500 |
Hi All, I'm trying to build a tree to be used in other places in my stylesheet. <?xml version="1.0" encoding="UTF-8"?> <xsl:transform xmlns:xsl=" http://www.w3.org/1999/XSL/Transform " version="1.0" xmlns:esql=" http://apache.org/cocoon/SQL/v2 " xmlns:exsl=" http://exslt.org/common " extension-element-prefixes="exsl"> <xsl:variable name="qinfo"> <Question> <esql:connection> <esql:autocommit>false</esql:autocommit> <esql:pool>MYDB</esql:pool> <esql:execute-query> <esql:query> select text from question where order = 1 </esql:query> <esql:results> <esql:row-results> <Text><esql:get-string column="text" /></Text> </esql:row-results> </esql:results> </esql:execute-query> </esql:connection> </Question> </xsl:variable> <xsl:template match="buildsomething"> ... <td>XXXXX<xsl:value-of select="exsl:node-set($qinfo)"/>XXXXX<td> <td>YYYYY<xsl:value-of select="exsl:node-set($qinfo)//Text"/>YYYYY<td> ... </xsl:template> </xsl:transform> This is the result of "buildsomething": <td>XXXXXfalseSURVEY select text from sur_question where order = 1 XXXXX</td><td>YYYYYYYYYY</td> Why am I not able to get the value of the Text node here? Am I doing something wrong with node-set(), or is there a better way to do this altogether (within the same stylesheet)? My actual query is more complex than the simplified version I show above. Many thanks, Leona
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Automatically discovering ava, David Adams | Thread | RE: [xsl] using node-set on a query, Michael Kay |
[xsl] Automatically discovering ava, David Adams | Date | RE: [xsl] using node-set on a query, Michael Kay |
Month |