npsobj table

Syntax

npsobj_table ::=

  <npsobj table = "name"
  [ sortedby = "sortkey" ]
  [ sortkey1 = "sortKey1" 
    [ sortmodifier1 = sortModifier ]
    [ sortkey2 = "sortKey2"
      [ sortmodifier2 = sortModifier ]
      [ sortkey3 = "sortKey3"
        [ sortmodifier3 =  sortModifier ]]]]
  [ start = "startIndex" ]
  [ ( length = "length" ) | ( end = "end" ) ]
  [ reverse = "" ] 
  [ columns = "columns" ]
  [ direction = ( "horizontal" | "vertical" ) ]
  { other_attribute } >
  content
  </npsobj>

sortModifier ::=
  "alpha" | 
  "numeric" | 
  "ascending" | 
  "descending" |
  "alpha ascending" | 
  "alpha descending" |
  "numeric ascending" | 
  "numeric descending"

other_attribute ::= string = "string"

Aufgabe

The instruction creates a table and fills the individual cells with texts. The individual texts result from the evaluation of the values name, sortkey, startIndex, length, and end as well as sortKey1, sortKey2 , sortKey3, sortModifier1, sortModifier2, sortModifier3 und reverse as described in the section npsobj_list. If a text only contains space characters (thus spaces, tabs or line breaks), then the cell will be filled with the text &nbsp;.

The table contains columns columns. If columns is not specified, then a single column is created. The created table tag contains as attributes all attributes of the NPSOBJ tag specified as other_attribute. For all rows a tr element with an opening tag and a closing tag are generated. For every cell a td element with an opening and a closing tag is generated. The generated tr and td start tags have no attributes.

The cells of the tables are filled with the calculated texts row by row from left to right, beginning in the uppermost line if direction="horizontal" is specified. Otherwise the cells are filled column by column from top to bottom, beginning with the first column. A number of rows or columns are generated that is exactly enough to create a dedicated cell for each text. Cells at the end of the last line or column for which no more text is available will be filled with the text &nbsp;.

Example

<npsobj table="children" columns="2" direction="vertical" border="1">
  <npsobj insertvalue="var" name="title"/>
</npsobj>