Versions Compared

Key

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

...

  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:

...

Further on the example 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

Relation:

HTML_C0#=TELITAB2HTML$(C0#,"NullString",0)

will return for HTML_C0# (in text):

<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>

As you see, there are no list values. This will result in the following HTML 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>

This will result in the following HTML tables:

...

HTML1#=TELITAB2HTML$(C1#,"NullString",0)+TELITAB2HTML$(C2#,"NullString",0)

Resulting into:

<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>

Resulting in the following two tables:

...

For sure you can doe this by first carrying out a union on the two sets using the UNION#() function. However, you can also present the two tables into one HTML table by using Opion%=1 in combination with an HTML table tag in front and closing tag at the end:

HTML1#="<table>" + TELITAB2HTML$(C1#,"NullString",1)+TELITAB2HTML$(C2#,"NullString",1) + "</table>"

Resulting into:

<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>

Resulting in the following table:

...