Re: how to generate html table from "table" data?



petr.jakes.tpc@xxxxxxxxx a écrit :
Hi group,
I would like to convert the output of the SQL query, or more generally
I would like to convert any "table" data to the html table.

There's MoreThanOneWayToDoIt... from simple string formatting to a full-blown template engine.

I would like to set some rules to format cells, columns or rows (font,
colour etc.) of the html table, according to the values in the
specific cells.

<ot>
Markup should only convey semantic informations - presentation is best done using css. IOW : presentation-related stuff in the html should be restricted to css class declarations.
</ot>

Googling for a while I have found only this tool:
http://pasko.net/PyHtmlTable/

Your tips to some other tools or/and your suggestion how to solve
above mentioned will be very helpful.

As I said, wrt/ html generation, there are quite a lot of possible solutions - FWIW, generating an html table from a set of tabular data is nothing difficult. So without more information on the context, it's hard to give any valuable advice. Are you doing a web application ? If yes, you should already use a template engine, so just use it. Else, why is your application generating html at all ?
.



Relevant Pages

  • Re: library for html generation
    ... Larry White wrote: ... > Is there a ruby library for generating HTML? ... > (other than what rails comes with), that's not tied tightly to any ...
    (comp.lang.ruby)
  • library for html generation
    ... Is there a ruby library for generating HTML? ... (other than what rails comes with), that's not tied tightly to any ... particular web server framework. ...
    (comp.lang.ruby)
  • Re: CGI over C++
    ... Generating HTML is up to your C++ program. ... String the HTML together. ... may be some helper libs out there but it's pretty simple to do it yourself. ...
    (Fedora)
  • Re: library for html generation
    ... > Larry White wrote: ... >> Is there a ruby library for generating HTML? ...
    (comp.lang.ruby)