You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Per Kreipke <pe...@onclave.com> on 2000/09/06 22:28:54 UTC

Sample: XSP and XSL for browsing database tables

This code builds on Donald Ball's SQL taglib to pass in many of the required
parameters to a successful query as optional HTTP parameters.

Sample query:

http://localhost/table.xml?db=myDB&table=simple&start=10&max=20


It then styles any DB table into a HTML table with a header row and
alternating colors. It doesn't depend on any DB column or table names, e.g.
it allows a 'loose' contract [Stefano questioned that as an oxymoron :-)] to
browse the database and styling the results.

- You can change the colors and the number of rows in each group in the XSL
file.
- You can change the default table and DB names in the XML file so that it
automatically uses your favorite DB or table.
- You can override the display of any column with it's own style snippet
(e.g. template match).

Hope this is useful.

Per.

Re: Sample: XSP and XSL for browsing database tables

Posted by Pratik Machchar <pr...@elitecore.com>.
Thanks for this Sample .
Where Can I have more samples of cocoon?
Thanks Pratik


----- Original Message -----
From: "Per Kreipke" <pe...@onclave.com>
To: <co...@xml.apache.org>
Sent: Thursday, September 07, 2000 1:58 AM
Subject: Sample: XSP and XSL for browsing database tables


> This code builds on Donald Ball's SQL taglib to pass in many of the
required
> parameters to a successful query as optional HTTP parameters.
>
> Sample query:
>
> http://localhost/table.xml?db=myDB&table=simple&start=10&max=20
>
>
> It then styles any DB table into a HTML table with a header row and
> alternating colors. It doesn't depend on any DB column or table names,
e.g.
> it allows a 'loose' contract [Stefano questioned that as an oxymoron :-)]
to
> browse the database and styling the results.
>
> - You can change the colors and the number of rows in each group in the
XSL
> file.
> - You can change the default table and DB names in the XML file so that it
> automatically uses your favorite DB or table.
> - You can override the display of any column with it's own style snippet
> (e.g. template match).
>
> Hope this is useful.
>
> Per.
>


----------------------------------------------------------------------------
----


> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org