Versions Compared

Key

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

TELITAB2HTML$ returns a HTML table for a given TeLiTab set

Syntax

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

Arguments

  • TeLiTab$ is TeLiTab$ is a string parameter containing 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 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. 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 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 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 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 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"
  1. Quaestor will also place a <a ...> </a> tag around the parameter name. This will link to separate HTML files created automatically based on all reference text and binary data in the knowledge base (see Documentation of knowledge )

Examples

Example 1: using Option%=0

Further on the example of TeLiTab#of TeLiTab#(). You have a 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

...

<table class="table">
<tr class="table"><td class="tableref">&nbsp;</td><td class="tableref"><a href="file://E:/my documents/my knowledge/kbs/_Telitab2html/Html/documents/A.htm" tabindex="1000" class="popupLink" onMouseOver="return !showPopup('A', event);" onMouseOut="return !hideCurrentPopup();">A </a></td><td class="tableref"><a href="file://E:/my documents/my knowledge/kbs/_Telitab2html/Html/documents/B.htm" tabindex="1000" class="popupLink" onMouseOver="return !showPopup('B', event);" onMouseOut="return !hideCurrentPopup();">B </a></td></tr>
<tr class="table"><td class="tableref">&nbsp;</td><td class="tabledim">[-]</td><td class="tabledim">[-]</td></tr>
<tr class="table"><td class="tableref">"1"</td><td class="tableval">1  </td><td class="tableval">2</td></tr>
<tr class="table"><td class="tableref">"2"</td><td class="tableval">2  </td><td class="tableval">4</td></tr>
<tr class="table"><td class="tableref">"3"</td><td class="tableval">3  </td><td class="tableval">6</td></tr>
<tr class="table"><td class="tableref">"4"</td><td class="tableval">4  </td><td class="tableval">8</td></tr>
<tr class="table"><td class="tableref">"5"</td><td class="tableval">5 </td><td class="tableval">10</td></tr>
<tr class="table"><td class="tableref">"6"</td><td class="tableval">6 </td><td class="tableval">12</td></tr>
<tr class="table"><td class="tableref">"7"</td><td class="tableval">7 </td><td class="tableval">14</td></tr>
<tr class="table"><td class="tableref">"8"</td><td class="tableval">8 </td><td class="tableval">16</td></tr>
<tr class="table"><td class="tableref">"9"</td><td class="tableval">9 </td><td class="tableval">18</td></tr>
<tr class="table"><td class="tableref">"10"</td><td class="tableval">10 </td><td class="tableval">20</td></tr>
</table>

...

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

<table class="list">
<tr class="list"><td class="listref">A&#32;value</td><td class="listpar"><a href="file://E:/my documents/my knowledge/kbs/_Telitab2html/Html/documents/B.htm" tabindex="1000" class="popupLink" onMouseOver="return !showPopup('B', event);" onMouseOut="return !hideCurrentPopup();">B </a></td><td class="listval">2</td><td class="listdim">[-]</td></tr>
</table>
</br><table class="table">
<tr class="table"><td class="tableref">&nbsp;</td><td class="tableref"><a href="file://E:/my documents/my knowledge/kbs/_Telitab2html/Html/documents/A.htm" tabindex="1000" class=popupLink onMouseOver="return !showPopup('A', event);" onMouseOut="return !hideCurrentPopup();">A </a></td></tr>
<tr class="table"><td class="tableref">&nbsp;</td><td class="tabledim">[-]</td></tr>
<tr class="table"><td class="tableref">"1"</td><td class="tableval">1</td></tr>
<tr class="table"><td class="tableref">"2"</td><td class="tableval">2</td></tr>
<tr class="table"><td class="tableref">"3"</td><td class="tableval">3</td></tr>
<tr class="table"><td class="tableref">"4"</td><td class="tableval">4 </td></tr>
<tr class="table"><td class="tableref">"5"</td><td class="tableval">5</td></tr>
<tr class="table"><td class="tableref">"6"</td><td class="tableval">6</td></tr>
<tr class="table"><td class="tableref">"7"</td><td class="tableval">7</td></tr>
<tr class="table"><td class="tableref">"8"</td><td class="tableval">8</td></tr>
<tr class="table"><td class="tableref">"9"</td><td class="tableval">9</td></tr>
<tr class="table"><td class="tableref">"10"</td><td class="tableval">10</td></tr>
</table>

...

Assume you have two separate TeLiTab sets with list values:

Set 1, C1#:

...

<table class="list">
<tr class="list"><td class="listref">A&#32;value</td><td class="listpar"><a href="file://E:/my documents/my knowledge/kbs/_Telitab2html/Html/documents/A.htm" tabindex="1000" class=popupLink onMouseOver="return !showPopup('A', event);" onMouseOut="return !hideCurrentPopup();">A </a></td><td class="listval">1</td><td class="listdim">[-]</td></tr>
<tr class="list"><td class="listref">A&#32;value</td><td class="listpar"><a href="file://E:/my documents/my knowledge/kbs/_Telitab2html/Html/documents/B.htm" tabindex="1000" class="popupLink" onMouseOver="return !showPopup('B', event);" onMouseOut="return !hideCurrentPopup();">B </a></td><td class="listval">2</td><td class="listdim">[-]</td></tr>
</table><table class="list">
<tr class="list"><td class="listref">A&#32;far&#32;longer&#32;description&#32;for&#32;parameter&#32;C</td><td class="listpar"><a href="file://E:/my documents/my knowledge/kbs/_Telitab2html/Html/documents/C.htm" tabindex="1000" class="popupLink" onMouseOver="return !showPopup('C', event);" onMouseOut="return !hideCurrentPopup();">C </a></td><td class="listval">3</td><td class="listdim">[-]</td></tr>
<tr class="list"><td class="listref">A&#32;description&#32;for&#32;D</td><td class="listpar"><a href="file://E:/my documents/my knowledge/kbs/_Telitab2html/Html/documents/D.htm" tabindex="1000" class="popupLink" onMouseOver="return !showPopup('D', event);" onMouseOut="return !hideCurrentPopup();">D </a></td><td class="listval">4</td><td class="listdim">[-]</td></tr>
</table> 

...

<table><tr class="list"><td class="listref">A&#32;value</td><td class="listpar"><a href="file://E:/my documents/my knowledge/kbs/_Telitab2html/Html/documents/A.htm" tabindex="1000" class="popupLink" onMouseOver="return !showPopup('A', event);" onMouseOut="return !hideCurrentPopup();">A </a></td><td class="listval">1</td><td class="listdim">[-]</td></tr>
<tr class="list"><td class="listref">A&#32;value</td><td class="listpar"><a href="file://E:/my documents/my knowledge/kbs/_Telitab2html/Html/documents/B.htm" tabindex="1000" class="popupLink" onMouseOver="return !showPopup('B', event);" onMouseOut="return !hideCurrentPopup();">B </a></td><td class="listval">2</td><td class="listdim">[-]</td></tr>
<tr class="list"><td class="listref">A&#32;far&#32;longer&#32;description&#32;for&#32;parameter&#32;C</td><td class="listpar"><a href="file://E:/my documents/my knowledge/kbs/_Telitab2html/Html/documents/C.htm" tabindex="1000" class="popupLink" onMouseOver="return !showPopup('C', event);" onMouseOut="return !hideCurrentPopup();">C </a></td><td class="listval">3</td><td class="listdim">[-]</td></tr>
<tr class="list"><td class="listref">A&#32;description&#32;for&#32;D</td><td class="listpar"><a href="file://E:/my documents/my knowledge/kbs/_Telitab2html/Html/documents/D.htm" tabindex="1000" class=popupLink onMouseOver="return !showPopup('D', event);" onMouseOut="return !hideCurrentPopup();">D </a></td><td class="listval">4</td><td class="listdim">[-]</td></tr> 
</table> 

...

The knowledge base provides the two methods above.

TopGoal HTML_C0# generates the HTML table as described in Method 1, HTML_C1_C2# generates the HTML table as described in Method 2.


 

Quick links: Function overview | Attribute overview | Constants overview | Dimensions overview