---
title: "Element <section>"
source: https://dev.pageseeder.com/psml/elements/element-section.html
description: "PSML Element reference for <section>"
last_updated: 2026-08-07T17:09:54+10:00
tokens: ~1156
---

# \<section\>

## Summary

Within a PSML [document](../../reference/glossary/document.md), the `<section>` element is an organizing construct that can contain the following:

- **Fragments** – [sections](../../reference/glossary/section.md) provide order, semantics or context to the [fragments](../../reference/glossary/fragment.md) which contain the [PSML](../../reference/glossary/psml.md) content.  
- **Title** – an immutable text string for display to users.

## Usage context

| Element category | structure |
| --- | --- |
| PSML level | portable |
| 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:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| edit | [boolean](../datatypes/pageseeder_datatypes.md) | no | Whether or not the section can be edited through the interface |
| fragmenttype | [fragment-type](../datatypes/pageseeder_datatypes.md) | no | A comma-separated list of fragment types |
| id | [section-id](../datatypes/pageseeder_datatypes.md) | yes | The section ID |
| lockstructure | `boolean` | no | Whether or not the fragments can be moved/added/deleted in UI |
| overwrite | `boolean` | no | Whether or not to overwrite existing section on an upload |
| title | [xs:string](../datatypes/xml_schema_datatypes.md) | no | The title for the section |

### `@edit`

A boolean flag indicating whether the fragments within the [section](../../reference/glossary/section.md) 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](../../reference/glossary/section_id.md) 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](../../reference/glossary/section_title.md) 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

```lang-xml

<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

```lang-relax

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.

