PSML

A complete reference of PageSeeder's markup language PSML

<preformat>

Summary

Used for computer source code typically with a monospaced font.

Note

This element replaces PS Standard's block level <code> element to avoid confusion with HTML inline <code> elements.

Usage context

Element categoryblock
PSML levelportable
Permitted contenttext only
Permitted parent<fragment> <item> <block> <cell>
HTML equivalent<pre>
OpenXML equivalent
PSStandard equivalent<code>

Attributes

This element includes the following attributes

rolerolenoCustom value that can be used for formatting.

@role

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

Examples

 

Preformatted plain text to preserve white space.

<preformat>            Yet do I fear thy nature;
It is too full o' the milk of human kindness
To catch the nearest way.</preformat>

 

Preformatted code sample

<preformat role="sample_javascript">function () {
  return "Hello!";
}</preformat>

Schema

XML Schema

<xs:element name="preformat">
  <xs:complexType mixed="true">
    <xs:group ref="character-style-group" minOccurs="0" maxOccurs="unbounded" />
    <xs:attribute name="role" type="role"/>
  </xs:complexType>
</xs:element>

Relax Schema

element preformat {
  attribute role { role }?,
  character-style
}

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