PSML

A complete reference of PageSeeder's markup language PSML

PageSeeder datatypes

PageSeeder datatypes extend primitive types and are constrained by a pattern or by enumerated values. For readability, the following conventions are used.

Character definitions used in this article
Letters[A-Za-z]ASCII letter in upper case and lower case
Digits[0-9]ASCII digits 0 to 9
Underscore_Underscore ASCII character U+005F
Hyphen-Hyphen-minus ASCII character U+002D
Dot.Full stop or baseline dot character U+002E

Boolean

An "xs:boolean" value can only be one of the canonical boolean values of "true" or "false".

Note

PageSeeder does not extends the XML Schema "xs:boolean" datatype to support literal values '1' or '0'.
<xs:simpleType name="boolean">
  <xs:restriction base="xs:boolean">
    <xs:pattern value="true|false"/>
  </xs:restriction>
</xs:simpleType>

Cross-reference display

An xs:string value determines the display of a cross-reference.

When PageSeeder resolves a cross-reference, the textual content of an inline cross-reference is affected. This is the reason why the textual content of a cross-reference is considered informational.

ValueEffect
document

The URI title of the target document:

[document title]
document+manual

The URI title of the target document, followed by some manual text:

[document title]: [manual title]
document+fragment

The URI title of the target document, followed by the fragment ID:

[document title]: [target fragment ID]
manual

Only the manual text:

[manual title]
template

The manual title (@title on the XRef) can contain any combination of text and the following tokens which will be replaced dynamically:

  • {document}: display title of the target document;
  • {filename}: filename of the target document;
  • {docid}: docid of the target document;
  • {fragment}: target fragment ID;
  • {prefix}: the @prefix of the first heading or para in the target fragment (<xref> only);
  • {parentnumber}: the number of the parent heading or para for the target fragment (<xref> only);
  • {heading}: the text of the first heading or property in the target fragment (<xref> only). The property can not have type xref or markdown or have multiple values.

Note

The {prefix}, {parentnumber} and {heading} can be used with each other but should not be used in the same title with other tokens.

Note

The @xs:string attribute only affects the forward direction, reverse cross-references must use a fixed reverse title.

<xs:simpleType>
   <xs:restriction base="xs:string">
      <xs:enumeration value="document" />
      <xs:enumeration value="document+manual" />
      <xs:enumeration value="document+fragment" />
      <xs:enumeration value="manual" /> 
      <xs:enumeration value="template" />
   </xs:restriction>
</xs:simpleType>

Cross-reference level

The level of a cross-reference indicates how the heading levels in the target document are affected.

<xs:simpleType>
   <xs:restriction base="xs:integer">
      <xs:pattern value="[1-5]"/>
   </xs:restriction>
</xs:simpleType>

Cross-reference type

The type of cross reference in the forward direction.

TypeEffect
none

Defines a simple reference between the source and the target content much like a regular link.

alternate

An alternate representations of the current document.

math

An in-line transclude link to a file or <media-fragment> with mediatype of application/mathml+xml or text/asciimath. Used for equations. Only allowed on <xref>.

embed

Indicates that the target content is intended to be embedded in place of the link during publishing or some post-processing. Only allowed on <blockxref>.

transclude

Indicates that the target content is should be included in place of the link whenever the document is viewed. Only allowed on <blockxref>.

See article on transclusion for a discussion on the differences between embedded links and a transclusions.
Model for <xref>:

<xs:simpleType>
   <xs:restriction base="xs:string">
      <xs:enumeration value="none"/>
      <xs:enumeration value="alternate"/>
      <xs:enumeration value="math"/>
   </xs:restriction>
</xs:simpleType>

Model for <blockxref>:

<xs:simpleType>
   <xs:restriction base="xs:string">
      <xs:enumeration value="none"/>
      <xs:enumeration value="alternate"/> 
      <xs:enumeration value="embed"/>
      <xs:enumeration value="transclude"/>
   </xs:restriction>
</xs:simpleType>

Document ID

The document ID is an xs:string that only contains letters, digits, underscores or hyphens.

<xs:simpleType name="document-id">
   <xs:restriction base="xs:string">
      <xs:pattern value="[a-zA-Z0-9_\-]+"/>
   </xs:restriction>
</xs:simpleType>

Document level

The document level is one of three values "metadata", "portable" or "processed".

Only "portable" documents can be uploaded to PageSeeder; but PageSeeder can generate documents in "metadata" or "processed" level.

<xs:simpleType>
   <xs:restriction base="xs:string">
      <xs:enumeration value="metadata"/>
      <xs:enumeration value="portable"/>
      <xs:enumeration value="processed"/>
   </xs:restriction>
</xs:simpleType>

Document title

Also known as URI title, the title of a document title is an xs:string which must not exceed 250 characters.

<xs:simpleType>
   <xs:restriction base="xs:string">
      <xs:maxLength value="250"/>
   </xs:restriction>
</xs:simpleType>

Document type

The document type is an xs:string that only contains letters, digits or underscores.

<xs:simpleType name="document-type">
   <xs:restriction base="xs:string">
      <xs:pattern value="[a-zA-Z0-9_]+"/>
   </xs:restriction>
</xs:simpleType>

Fragment ID

The fragment ID is an xs:string that only contains letters, digits, underscores, hyphens or dots which must not exceed 250 characters.

<xs:simpleType name="fragment-id">
   <xs:restriction base="xs:string">
      <xs:pattern value="[a-zA-Z0-9_\-\.]+"/>
   </xs:restriction>
</xs:simpleType>

Fragment type

The fragment type is an xs:string that only contains letters, digits, underscores, hyphens or dots. 

<xs:simpleType name="fragment-type">
   <xs:restriction base="xs:string">
      <xs:pattern value="[a-zA-Z0-9_\-\.]+"/>
   </xs:restriction>
</xs:simpleType

Heading level

The heading level is an xs:integer value between 1 and 6.

<xs:simpleType>
   <xs:restriction base="xs:integer">
      <xs:pattern value="[1-6]"/>
   </xs:restriction>
</xs:simpleType>

Horizontal alignment

An enumerated value used for attributes to determine the horizontal alignment of the text content.

It must be one of the following values: "left", "center", "right", "justify". Usually the value "left" is the default.

More formally, this type is defined as:

<xs:simpleType>
   <xs:restriction base="xs:string">
      <xs:enumeration value="left" />
      <xs:enumeration value="center" />
      <xs:enumeration value="right" />
      <xs:enumeration value="justify" />
   </xs:restriction>
</xs:simpleType>

Indent

The indent level is an xs:integer value between 1 and 6.

<xs:simpleType>
   <xs:restriction base="xs:integer">
      <xs:pattern value="[1-6]"/>
   </xs:restriction>
</xs:simpleType>

Label

The @label datatype extends xs:string but can only contain the following characters [a-zA-Z0-9_-].

Note

There is no limit on the length of a label, it is recommended that the name of a label does not exceed 245 characters.
<xs:simpleType name="label">
   <xs:restriction base="xs:string">
      <xs:pattern value="[a-zA-Z0-9_\-]+"/>
   </xs:restriction>
</xs:simpleType>

Label list

An unordered comma separated list of label names.

Empty and duplicate label names are ignored, so the "note,,important,important," is semantically equivalent to "important,note".

<xs:simpleType name="label-list">
   <xs:restriction base="xs:string">
      <xs:pattern value="[a-zA-Z0-9_\-,]*"/>
   </xs:restriction>
</xs:simpleType>

List type (ordered)

The list type determines what prefix is displayed before each item. The list type is used for predetermined prefixes, it's possible to used custom schemes using the @role attribute.

Prefixes for each list type
TypePrefixes
arabic1  2  3  4  5 ...
upperalphaA.  B.  C.  D.  E. ...
loweralphaa.  b.  c.  d.  e. ...
upperromanI  II  III  IV  V ...
lowerromani  ii iii iv  iv ...
<xs:simpleType>
   <xs:restriction base="xs:string">
       <xs:enumeration value="arabic"/>
       <xs:enumeration value="upperalpha"/>
       <xs:enumeration value="loweralpha"/>
       <xs:enumeration value="upperroman"/>
       <xs:enumeration value="lowerroman"/>
    </xs:restriction>
</xs:simpleType>

List type (unordered)

The list type determines the bullet style of each list item. This list type is used as a fallback, it's possible and often preferable to define the bullet style externally (for example in CSS, or Word template properties when PSML is converted to HTML or DOCX).

<xs:simpleType>
   <xs:restriction base="xs:string">
      <xs:enumeration value="none"/>
      <xs:enumeration value="disc"/>
      <xs:enumeration value="circle"/>
      <xs:enumeration value="square"/>
   </xs:restriction>
</xs:simpleType>

Length

The length is the width or height of an object in pixels or percent, or more formally:

[0-9\.]+(px|%)?

Length (fixed)

The fixed length of an object is numeric value that corresponds to the length in pixels.

Port number

The port number of a URI.

<xs:simpleType>
   <xs:restriction base="xs:positiveInteger">
      <maxInclusive value="65535"/>
   </xs:restriction>
</xs:simpleType>

Property count

The property count defines the maximum number of values that the property can have.

<xs:simpleType>
   <xs:restriction base="xs:string">
      <xs:pattern value="[0-9n]+"/>
   </xs:restriction>
</xs:simpleType>

Publication ID

The publication ID is an xs:string that only contains letters, digits, underscores or hyphens.

<xs:simpleType name="publication-id">
   <xs:restriction base="xs:string">
      <xs:pattern value="[a-zA-Z0-9_\-]+"/>
   </xs:restriction>
</xs:simpleType>

Role

The role of an object is an xs:string that only contains letters, digits, underscores and hyphens.

<xs:simpleType name="role">
   <xs:restriction base="xs:string">
      <xs:pattern value="[a-zA-Z0-9_\-]+"/>
   </xs:restriction>
</xs:simpleType>

Section ID

The section ID is an xs:string that only contains letters, digits, underscores, hyphens or dots.

<xs:simpleType name="section-id">
   <xs:restriction base="xs:string">
      <xs:pattern value="[a-zA-Z0-9_\-\.]+"/>
   </xs:restriction>
</xs:simpleType>

Table part

The part of the table the row or column belongs to.

Meaning of table part on <row> or <col>
ValueRowColumn
bodyimplied default value and provided for completeness (it needn't be used)
headerShould be part of the table header
(e.g. inside <thead> in HTML)
 
Cells in the column are considered to be header cells.
(e.g. <th> in HTML)
footerShould be part of the table footer
(e.g. inside <tfoot> in HTML)
 
Cells in the column are considered to be footer cells, this is used for columns to right-hand side of a table that may represent aggregate values of the cells to their left (e.g. Total column)
<xs:simpleType>
   <xs:restriction base="xs:string">
      <xs:enumeration value="body" />
      <xs:enumeration value="header" />
      <xs:enumeration value="footer" />
   </xs:restriction>
</xs:simpleType>

Vertical alignment

An enumerated value used for attributes to determine the vertical alignment of the text content. It must be one of the following values: "top", "middle", "bottom", "baseline". Usually the value "baseline" is the default.

More formally, this type is defined as:

<xs:simpleType>
   <xs:restriction base="xs:string">
      <xs:enumeration value="top" />
      <xs:enumeration value="middle" />
      <xs:enumeration value="bottom" />
      <xs:enumeration value="baseline" />
   </xs:restriction>
</xs:simpleType>

XRef config

The configuration name for a cross-reference of a certain kind, see xref-config.xml.

<xs:simpleType name="xref-config">
  <xs:restriction base="xs:string">
    <xs:pattern value="[a-zA-Z0-9\-_]+"/>
  </xs:restriction>
</xs:simpleType>

Created on , last edited on