PSML

A complete reference of PageSeeder's markup language PSML

<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>
PSStandard equivalent<row>

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

  • '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 should be part of the table header
  • 'footer'  when the row should be part of the table footer

When a row is part of the header or footer, its cells have a different function. In HTML, they will be part of the <thead> or <tfoot>. In documents spanning multiple pages, they should be repeated on each page. When dynamic behavior is applied on the table (e.g. sorting, computing sums, etc.), 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>

Will display 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 will render 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.

See also

Created on , last edited on