You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Michael Nachbaur <MN...@rei.com> on 2000/09/25 22:54:10 UTC

SQL Recordset Structure

Okay, I'm very new to the SQL taglib, so forgive me if I'm being obtuse.  But:

When I execute the following query, I get back a tree of <ROWSET><ROW><FIELD>...</ROW></ROWSET>.  However, this doesn't really fit well into my XSL stylesheet.  Now, I could make a stylesheet to convert this resultset into something useful, but is there a way to tell it the format of the tree I'd like it to create?  I figure, if its building a tree anyway, it would make sense for it to make it in the format I'd like it to make.  (wow...that was a lot of pronouns. ;)

<sql:execute-query>
   <sql:use-connection>default</sql:use-connection>
   <sql:skip-rows>0</sql:skip-rows>
   <sql:max-rows>3</sql:max-rows>
   <sql:null-indicator>y</sql:null-indicator>
   <sql:count-attribute>count</sql:count-attribute>
   <sql:doc-element>ROWSET</sql:doc-element>
   <sql:row-element>ROW</sql:row-element>
   <sql:tag-case>preserve</sql:tag-case>
   <sql:id-attribute>ID</sql:id-attribute>
   <sql:query>
       SELECT Summary
            , Title
            , TO_CHAR( CreationDate, 'Mon DD, YYYY HH24:MI' ) CreationDate_Str
         FROM News
        WHERE Sitename = ( SELECT SiteID FROM Site WHERE Name = 'mp3.nachbaur.com' )
        ORDER
           BY CreationDate DESC
  </sql:query>
</sql:execute-query>


--man
Michael A. Nachbaur (KE6WIA)
mike(at)nachbaur(dot)com
http://www.nachbaur.com
"......I've got blisters on my fingers!!!"  -- Ringo Starr


Re: SQL Recordset Structure

Posted by Donald Ball <ba...@webslingerZ.com>.
On Mon, 25 Sep 2000, Michael Nachbaur wrote:

> Okay, I'm very new to the SQL taglib, so forgive me if I'm being
> obtuse.  But:
> 
> When I execute the following query, I get back a tree of
> <ROWSET><ROW><FIELD>...</ROW></ROWSET>.  However, this doesn't really
> fit well into my XSL stylesheet.  Now, I could make a stylesheet to
> convert this resultset into something useful, but is there a way to
> tell it the format of the tree I'd like it to create?  I figure, if
> its building a tree anyway, it would make sense for it to make it in
> the format I'd like it to make.  (wow...that was a lot of pronouns. ;)

if you check out the new development esql logicsheet, i think you'll find
that it does everything you're looking for.

- donald