Name

table — a table of data elements that can be used as a lookup table

Synopsis

Content Model


	    <table> = lookup table data

      

Attributes

NameTypeDefault
idA label that is used to identify the lookup table (required) 
missingThe token to represent a missing input value 
splitA string regular expression used for the field separator, or if not specified then fixed column fields will be read 

Description

This element specifies rows and columns of values that make up a lookup table. The values in the rows are separated by field separator characters, typically a comma. Use the split attribute to specify a different field splitting value.

The first row of the table contains column headings. The tablemap function can be used to lookup a value in one column, and return the value in the same row but from a different column.

Parents

These elements contain table: ForestModel.

Children

No other elements can occur in a table.

Attributes

id

A label used to identify this table.

missing

The token that is used to represent a missing value in the input data. Blank values are always ignored, but input data that uses space characters to separate columns will require an explicit missing value token.

split

A character used to split each line in to fields. The default is to split the data by commas (split=",").

See Also

tablemap

Examples

In the following example a table has been added in CSV format. The table is given a label of 'Operability'. The lookupmap function can be used to retrieve values from one column that are matched to values in another column.

The function lookupmap('Operability','Type','SWD','Min') will operate on the 'Operability' table. It will search the 'Type' column for the 'SWD' value. If this value is found then the value in the same row from the 'Min' column will be returned.


  <table id="Operability" pattern="PRF.HDSEL.CT18.%h">
Type,Min,Max
AWR,0,9
SWD,27,60
HWD A,12,61
HWD,12,42
min26,26,28
Native,60,61
  </table>