Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

TELITAB2HTML$ returns a HTML table for a given TeLiTab setgiven TeLiTab set

Syntax

  1. TELITAB2HTML$(TeLiTab$TeLiTab$, "NullString", Option%)

Arguments

  • TeLiTab$ is TeLiTab$ is a string parameter containing TeLiTab datacontaining TeLiTab data;
  • NullString, obsolete parameter;
  • Option%, option to get a HTML with or without table tag
    • Option%=0, (or not given) will return the HTML table including the <table> </table> tags;
    • Option%=1, will return the HTML table without the <table> </table> tags. In this way you can add several TeLiTab HTML several TeLiTab HTML tables to each other (especially when these are list values).

...

  1. The goal of this function is to create HTML tables to be used as part of a script to generated an HTML document (using for instance the TEMPLATE$() function);
  2. The use of this function assumes some basic HTML skills, meaning you are familiar to the HTML code required for creation  of an HTML document. This in order to understand the result obtained from this function. Please visit [W3C] for more background information;
  3. A TeLiTab will TeLiTab will contain a list and a table. This is transformed into HTML as followes:
    1. When Option%=0 is used, the a table of the list and a separate table of the table of the TeLiTab is the TeLiTab is created
    2. When Option%=1 is used, the table tags are removed and both the HTML as created for for Option%=0 is place behind each other
    3. The HTML table created for the list will always have the following structure (without the HTML tags...):
      Reference text | Parameter name | Parameter value | Parameter dimension
    4. The HTML table created for the table will always have the following struncture (without the HTML tags...):
      Parameter Name | Parameter Name | Parameter Name | etc...
      Dimension | Dimension | Dimension | etc...
      Parameter value | Parameter value | Parameter value | etc...
  4. By removing the <table></table> tag, it is made possible to add HTML tables to each other. Use Option%=1 within the TELITAB2HTML function for each TeLiTab you each TeLiTab you want to add and place "<table>" before and  "</table>" after the relation (see example);
  5. By standard, Quaestor will include "class" attributes to the table tag. This enables you to use separate style sheets (*.CSS files) to define the style of the table. The following attributes are placed:
  • For the list part of the TeLiTabthe TeLiTab:
    • (with Option%=0) The <table> of the list includes class="list"
    • The <tr> tag includes class="list"
    • The <td> for reference includes class="listref"
    • The <td> for the parameter name includes class="listpar"
    • The <td> for the parameter value includes class="listval"
    • The <td> for the parameter dimension includes class="listdim"
    • For the table part of the TeLiTabthe TeLiTab:
      • (with Option%=0) The <table> of the list includes class="table"
      • The <tr> tag includes class="list"
      • The <td> for reference includes class="tableref"
      • The <td> for the parameter name includes class="tablepar"
      • The <td> for the parameter value includes class="tableval"
      • The <td> for the parameter dimension includes class="tabledim"

...

Example 1: using Option%=0

Further on the example of TeLiTab#of TeLiTab#(). You have a TeLiTab C0#TeLiTab C0#:


2   "A" "B"
"1"    1   2
"2"    2   4
"3"    3   6
"4"    4   8
"5"    5  10
"6"    6  12
"7"    7  14
"8"    8  16
"9"    9  18
"10"  10  20

...

If only A is varied and B = 2 (in order to have a TeLiTab with TeLiTab with a list and table value), the same relation will result in:

...

Example 2: using Option%=1

Assume you have two separate TeLiTab sets separate TeLiTab sets with list values:

Set 1, C1#:

...