Skip to main content

 PSML

A complete reference of PageSeeder's markup language PSML

<section>

Summary

Within a PSML document, the <section> element is an organizing construct that can contain the following:

  • Fragmentssections provide order, semantics or context to the fragments which contain the PSML content.  
  • Title – an immutable text string for display to users.

Usage context

Element categorystructure
PSML levelportable
Permitted content<title> <fragment> <media-fragment> <properties-fragment> <xref-fragment>
Permitted parent<document>
HTML equivalent<section>
OpenXML equivalent

Attributes

This element includes the following attributes:

NameTypeRequiredDescription
editbooleannoWhether or not the section can be edited through the interface
fragmenttypefragment-typenoA comma-separated list of fragment types
idsection-idyesThe section ID
lockstructurebooleannoWhether or not the fragments can be moved/added/deleted in UI
overwritebooleannoWhether or not to overwrite existing section on an upload
titlexs:stringnoThe title for the section

@edit

A boolean flag indicating whether the fragments within the section can be edited through the user interface (default true).

@fragmenttype

A comma-separated list of values to restrict the type of fragments that the section can contain.

@id

A unique ID for the section. The section ID must be unique within the document.

@lockstructure

A boolean flag indicating whether the fragments within the section can be moved, added or deleted. It is possible to lock the structure, but allow the fragments to be edited (default false).

When the structure is locked, the list and order of fragments within the section can only modified through the API or by upload.

@overwrite

A boolean flag indicating whether the existing section and the fragments within it are to be overwritten when uploading the document (default true).

Setting the overwrite to false, allows fragment edits to be preserved.

@title

A section title that isn’t considered to be part of the content.

The title can be used in the user interface to display a user friendly title for the section that does not have the restrictions imposed on the section ID but does not interfere with the content.

To specify a title that is part of the content use the <title> element instead.

Examples

Schema

XML Schema

<xs:element name="section">
  <xs:complexType>
    <xs:sequence>
      <xs:element name="title" minOccurs="0" type="xs:string"/>

      <xs:choice minOccurs="1" maxOccurs="unbounded">
        <xs:element ref="fragment" minOccurs="0"/>
        <xs:element ref="media-fragment" minOccurs="0"/>
        <xs:element ref="xref-fragment" minOccurs="0"/>
        <xs:element ref="properties-fragment" minOccurs="0"/>
      </xs:choice>
    </xs:sequence>

    <xs:attribute name="id" type="section-id" use="required"/>
    <xs:attribute name="title" type="xs:string" use="optional"/>
    <xs:attribute name="fragmenttype"
                  type="xs:string"
                  use="optional"/>
    <xs:attribute name="lockstructure"
                  type="xs:boolean"
                  use="optional" 
                  default="true"/>
    <xs:attribute name="overwrite"
                  type="xs:boolean"
                  use="optional"
                  default="true"/>
    <xs:attribute name="edit"
                  type="xs:boolean"
                  use="optional"
                  default="true"/>
  </xs:complexType>
</xs:element>

Relax schema

element section {
   attribute id { section-id },
   attribute title { text }?,
   attribute fragmenttype { xs:string }?,
   attribute lockstructure { xs:boolean }?,
   attribute overwrite { xs:boolean }?,
   attribute edit { xs:boolean }?,
   element title { text }?,
   (fragment | media-fragment | properties-fragment | xref-fragment)+
}

Compatibility

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

Created on , last edited on