PSML

A complete reference of PageSeeder's markup language PSML

<table>

Summary

The <table> element.

Warning!

This element has been changed in PSML Beta 7, some attributes have been deprecated and columns can be specified.

Restrictions on content

Although, table cells can contain some block-level elements, tables must not contain headings <heading> or a nested table <table>.

Usage context

Element categoryblock
PSML levelportable
Permitted content<caption> <col> <row>
Permitted parent<fragment>
HTML equivalent<table>
OpenXML equivalent<w:table>
PSStandard equivalent<table>

Attributes

This element includes the following attributes:

NameTypeRequiredDescription
heightlengthnoHeight of table in pixels.
rolerolenoCustom value that can be used for formatting.
summaryxs:stringnoSummary of tables purpose for non-visual readers.
widthlengthnoWidth of table in pixels or percent.

The attributes below have been deprecated and may not be available in the future:

NameTypeRequiredDescription
borderfixed-lengthnoThe width (in pixels) of the border around table cells.
cellpaddingfixed-lengthnoThe number of pixels between the border of the cell and its contents.
cellspacingfixed-lengthnoThe number of pixels between the border of the cell and the table frame or other cells.

@height

The height of the table in pixels (may have px suffix).

@role

A role for the table which can be used for formatting.

@summary

A summary of the table for non-visual readers.

@width

The width of the table in pixels or percent (pixels if no px or % suffix).

Examples

Schema

XML Schema

<xs:element name="table">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="caption" maxOccurs="1" minOccurs="0" type="character-style"/>
        <xs:element ref="col" maxOccurs="unbounded" minOccurs="0"/>
        <xs:element ref="row" maxOccurs="unbounded"/>
      </xs:sequence>
      <xs:attribute name="width">
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:pattern value="[0-9\.]+(px|%)?"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="height">
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:pattern value="[0-9]+(px)?"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="cellspacing" type="xs:string"/>
      <xs:attribute name="cellpadding" type="xs:string"/>
      <xs:attribute name="border" type="xs:string"/>
      <xs:attribute name="summary" type="xs:string"/>
      <xs:attribute name="role" type="role"/>
   </xs:complexType>
</xs:element>

Relax Schema

element table {
   attribute width { text { pattern="[0-9\.]+(px|%)?" } }?,
   attribute height { text { pattern="[0-9]+(px)?" } }?,
   attribute cellspacing { text }?,
   attribute cellpadding { text }?,
   attribute border { text }?,
   attribute summary { text }?,
   attribute role { role }?,
   element caption?,
   element col*,
   element row+
}

Compatibility

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

Columns were introduced in PSML beta 7.

See also

Tables structural elements: <caption><col> , <row> and <cell>.

Created on , last edited on