cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald Ball <ba...@webslingerZ.com>
Subject Re: [C1.8.1-dev] esql.xsl
Date Fri, 29 Sep 2000 01:54:24 GMT
On Thu, 28 Sep 2000, OD wrote:

> I have to admit to not understanding what you mean, I've looked at W3C's
> namespace docs and I've reread the cocoon docs.
> Maybe my question was ambigious.

yes. when you said GUI, it sounded like you were trying to generate, i
dunno, a gnome applet or something.

> This is easily transformable into a nice html table with rows for every
> database row upto <esql:max-rows>
> If <esql:query> matches 839 records from the database and I've limited the
> xml to 10 rows.
> How would my taglib know how many records in total were returned and display
> that information?

we can add elements for this information, sure. esql:get-total-rows?

> How would my taglib know where we are in the resultset and display that
> information?

already have it - esql:get-row-number

> How would my taglib be able to navigate backwards and forwards through the
> entire resultset?

already have it - esql:skip-rows

> At the end of the day I wanted a html a little like this
> 
> --------------------------------------------------
> Found 839 records, displaying records 151 - 160|
> --------------------------------------------------
> Row1
> --------------------------------------------------|
> Row2
> --------------------------------------------------|
> Etc...
> --------------------------------------------------|
> Prev                                                           Next |

hmm. here you do expose a flaw in the current esql implementation - the
children of esql:results are instantiated once per each row in the result
set. i can see where one would want the capability to have a set of
elements instantiated once, upon a successful query. how to address...

<esql:results>
 <esql:header>
  <total-rows><esql:get-total-rows/></total-rows>
 </esql:header>
 ...
 <esql:footer>
  is this necessary?
 </esql:footer>
</esql:results>

that would work. alternately, we could write

<esql:results>
 <total-rows><esql:get-total-rows/></total-rows>
 <esql:result-rows>
  <id><esql:get-string column="id"/></id>
  <name><esql:get-string column="name"/></name>
 </esql:result-rows>
</esql:results>

on the whole, i think i like the latter better, it'll make the xslt a bit
cleaner. what do y'all think?

- donald

(note i'm sure there are some other utility esql get methods we need to
add - get-query to return the query that was used, etc.)


Mime
View raw message