Fragment

Key point: The basic building block of documents to attach content, comments, tasks, notes, etc.

Documents in PageSeeder are composed of fragments.

Fragments can have a comment thread attached to them. If the document can be edited, or is in an editable format such as PSML, it’s fragments can also be edited.

Fragments have unique identifiers (IDs) which can be represented in a URL or email address. These IDs are either generated by the system or can be assigned through markup.

Where fragment IDs are created through markup, fragments can be edited programmatically. This can be very useful where there is a need to update only specific parts of a document.

Fragments are grouped into sections.

All documents have a default fragment, which is used to refer to the entire document.

For developers

In PSML, fragments are usually represented using the <fragment> element. 

There are also specialized fragment kinds:

  • <properties-fragment> for properties (simple name-value pairs).
  • <xref-fragment> for lists of xrefs.
  • <media-fragment> for non-PSML content.

If the <section> or <document> is not locked in the structure using the @lockstructure attribute, fragments can be repositioned within the section or document.

For more information, see the fragment element in the PSML reference on the PageSeeder developer’s website.