Did you know ... | Search Documentation: |
Pack weblog -- prolog/formatting/wl_table.pl |
These are oriented towards presenting tables of data, not towards controlling layout
head(List)
, outputs an HTML table representing
the data.
Upon encountering a head(List)
term the elements of List are
output in th tags.
Bare lists are output as td tags
fails silently if it can't parse the data
The generated html sets the class of body rows to even or odd alternately to allow alternate row styling
DataGen is expected to be an arity 3 predicate
my_data_gen(Key, Column, Value)
wl_table outputs an HTML table showing the data for all possible solutions to Key, Column
Note that if you want the keys you'll have to make sure the key is included as a column name.
Example, where my_key is the name of the primary key and my_data/3 is the underlying data.
... \wl_table(table_cells, []) ... table_cells(Key, my_key, Key) :- my_data(Key, _, _). table_cells(Key, Column, Value) :- my_data(Key, Column, Value).
The generated html sets the class of body rows to even or odd alternately to allow alternate row styling
fails silently if given invalid arguments
Options:
goal(Column, Label)
if the option is missing, the column ID's are used
as labels.
if the option header(none)
is provided, no headers are
produced
Note that you'll have to specify the module explicitly