Skip to main content

 Element reference

PSML elements from <author> to <xref>

<row>

Summary

The <row> element.

Usage context

Element categorytable
PSML levelportable
Permitted content<cell> <hcell>*
Permitted parent<table>
HTML equivalent<tr>
OpenXML equivalent<w:tr>

* There is deprecation warning on the <hcell> element.

Attributes

This element includes the following attributes

NameTypeRequiredDescription
alignalign-horizontalnoHorizontal alignment for all cells in the row
parttable-partnoMark the row as part of the header or footer
rolerolenoCustom value that can be used for formatting

@align

Horizontal alignment of the text within the cells in the row.

Possible values are the following:

  • center
  • justify
  • left
  • right

@part 

The part of the table this row belongs to.

Possible values are:

  • body – implied default value for a row provided for completeness (it needn’t be used).
  • header – when the row is part of the table header.
  • footer – when the row is part of the table footer.

When a row is part of the header or footer, its cells have a different function. In HTML, they are part of the <thead> or <tfoot>. In tables spanning multiple pages, they are be repeated on each page. When dynamic behavior is applied on the table (for example, sorting, computing, or sums), the cells are excluded from the sorting algorithm.

@role

A custom value to provide semantics for the cell. This can be used for formatting.

Examples

 

A table with a header and footer row.

<table>
  <row part="header">
    <cell>Team</cell>
    <cell>Points</cell>
  </row>
  <row>
    <cell>A</cell>
    <cell>54</cell>
  </row>
  <row>
    <cell>B</cell>
    <cell>46</cell>
  </row>
  <row part="footer">
    <cell>Total</cell>
    <cell>100</cell>
  </row>
</table>

Displays in HTML as:

<table>
  <thead>
    <tr>
      <th>Team</th>
      <th>Points</th>
    </tr>
   </thead>
  <tbody>
    <tr>
      <td>A</td>
      <td>54</td>
    </tr>
    <tr>
      <td>B</td>
      <td>46</td>
    </tr>
  </tbody>
  <tfoot>
    <tr>
      <td>Team</td>
      <td>Points</td>
    </tr>
  </tfoot>
</table>

And renders as:

TeamPoints
TeamPoints
A54
B46

Schema

XML Schema

<xs:element  name="row">
  <xs:complexType>
    <xs:choice maxOccurs="unbounded">
      <xs:element ref="cell"/>
      <xs:element ref="hcell"/>
    </xs:choice>
    <xs:attribute name="align" type="xs:string"/>
    <xs:attribute name="part" type="xs:string"/>
    <xs:attribute name="role" type="role"/>
  </xs:complexType>
</xs:element>

Relax Schema

row = element row {
   attribute role { role }?,
   attribute align { "center" | "justify" | "left" | "right" }?,
   attribute part { "header" | "body" | "footer" }?,
   (cell | hcell)+
 }

Compatibility

This element was introduced in the first draft of PSML and is well-supported from PageSeeder 5.1.

Created on , last edited on