The <xtable> tag translates a source data set into a populated HTML table. The source data set can be the subclass data objects belonging to a composite member of the current data object (if applicable) - OR it can be a repository, with or without search critieria to limit the number of objects found. In the former case an attribute of member is used to specify the member. In the latter case an attribute of repos is used to specify the repository, and the attribute of criteria is used to state the criteria. The supplied critieria must only contain terms that are meaningful in the applicable repository. If no selection criteria is provided the whole table will be output, subject to a row limit (set by a row attribute). Other attributes are css for the CSS class, width (as a percentage) and height (in pixels).

The general form of the <xtable> tag is as follows:-

 <xtable repos="repository_name" criteria="some_criteria" rows="500" width="90" height="500" css="myTableStyle">
  <ifnone>Sorry no records ...</ifnone>
  <header>Table header ...</header>
  <footer>Table footer ...</footer>
  <col>member=\"member_name\"</col>
 </xtable >

The <ifnone> subtag specifies what HTML is to be displayed in the event of no objects found. The default is "<p>No Ojects Found</p>". An empty <ifnone> will display an empty table but this is not recommended as it can give the impression objects were found, but the browser failed to load them.

The <col> subtag specifies the columns. By default there is a column for every member of the applicable data class, and they are displayed in the order the members are listed in the data class definition. However if <col> subtags are used, there has to be one for each column displayed, and the order will be that of the subtags.

Table Limits: Next and Prev Buttons

The row attribute sets the limit on the number of objects displayed. If the number of objects found exceeds this limit, NEXT and PREV buttons automatically appear. If the number of objects displayed exceeds the available display height, a vertical scroll bar automatically appears on the right hand side. The HTML generated by the <xtable> tag can be very complex!

Special Cases: Directory Listings

<xdirlist> is a special case of <xtable>. Instead of listing objects it lists the entries in a directory.

Instead of having an attribute to name a repository as <xtable> does, <xdirlist> has an attribute to name the directory. There are the same <:col> subtags but these have an attribte of field rather than member, and are used to specify which parts of the file information is displayed. For example:-

 <xdirlist directory="/.../mydir/%e:resarg;" criteria="*" order="date/dec" open="false" width="90" height="600" css="main">
  <ifnone>Sorry directory empty ...</ifnone>
  <col>field=\"name\"</col>
  <col>field=\"date\"</col>
  <col>field=\"size\"</col>
 </xtable >

One key difference between <xdirlist> and <xtable> is that any subdirectories listed contain links that will bring up the subdirectory listing. And if the open attribute is true, the files listed contain links that will actually display or attempt to display the file.

Note the percent entity %e:resarg; is often used with <xdirlist>, as it evaluates to everything after the minus sign in the URL (if this is present). The subdirectories links generated by the <xdirlist> tag, all contain a minus sign followed by the subdirectory name.