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:

  • 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
PSStandard equivalent<section>

Attributes

This element includes the following attributes:

NameTypeRequiredDescription
editbooleannoWhether or not the section can be edited via the interface.
fragmenttypefragment-typenoA fragment type.
idsection-idyesThe section ID.
lockstructurebooleannoWhether or not the fragments can be moved/added/deleted.
overwritebooleannoWhether or not the section can be overwritten on an upload.
titlexs:stringnoThe title for the section.

@edit

A boolean flag indicating whether the fragments within the section can be edited via the user interface.

@fragmenttype

A value to restrict the type of fragment 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.

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 section and the fragments within it should be overwritten when uploading the document.

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.

PS Standard document

Sections in PSML are still containers for fragments, but additional semantics have been provided to better control the fragment such as @lockstructure.

Section title

A @title attribute has been introduced for when a section should not be considered part of the content so that it does not affect the table of content.

Section format

Sections can no longer have a 'format' which was used to specify a format for their fragment. In PSML, fragments types should be used instead and a specific fragment type can be enforced inside a section using the @fragmenttype attribute.

As a consequence, predefined section formats 'psxreflist' and 'pslabelvalues' have been replaced by new kinds of fragments with specialized content, <xref-fragment> and <properties-fragment> respectively.

PS Standard XMLPSML
<section id="[id]"
  overwrite="[true|false]"
       edit="[true|false]"
     format="[section format]">


  <section id="[id]"
    overwrite="[true|false]"
         edit="[true|false]"
        title="[title]"
 fragmenttype="[type]"
lockstructure="[true|false]">
<section format="psxreflist">
  <fragment> ... <fragment>
</section>
<section>
  <xref-fragment> ... <xref-fragment>
</section>
<section format="pslabelvalues">
  <fragment> ... <fragment>
</section>
<section>
  <properties-fragment> ... <properties-fragment>
</section>

See also

Created on , last edited on