xsl-list
[Top] [All Lists]

Processing rowsets of multiple queries

2005-11-10 17:21:56
Hi,

I am writing a browser popup displaying results of multiple queries,
sort of a DB report using Cocoon 2.0.4 [XSL 1.0]

I am receiving correct XML output from SQLTransformer
(see below).

Now need XSLT page to work.

It seems that correct form to pick up a rowset in XSL is:
<xsl:variable name='custdata'
select="/page/content/sql:rowset[(_at_)sql:name='query1']"/>,
should have rows/columns under that.

The query returns 1 row (that's OK).
But for whatever reason I can't get to the row, to show the
values on the screen:
<xsl:for-each select='$custdata'>  <-- expect to pass $custdata/row
  <xsl:call-template name='row1'>
    <xsl:with-param name='therow' select='.'/>x
  </xsl:call-template>                  
</xsl:for-each>

<xsl:template name="row1">
  <xsl:param name='therow'/>
<tr>
  <td>data=<xsl:value-of select='$therow'/></td> <--- can see the whole row     
        
  <td align="left" valign="middle"><xsl:value-of
select='$therow/col1'/></td>                             <--- can't
see the column
</tr>
</xsl:template>

What am I doing wrong ?
(probably some silly XSL bug in my code :-(  )
Sorry for the newbie question.

Thank you,
Oleg.

<page>
  <content>

  <rowset nrofrows="1" name="query1">

    <row>
      <col1>Name1</col1>
      <col2>Property1</col2>
...
    </row>
   </rowset>

....  other rowsets
 </content>
</page>

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>