Skip to main content


Configuration manual for PageSeeder

PSML Schematron

Schematron enables developers to implement multiple validation regimes for any document set. For further information, see the article on Validating documents or the Schematron website .

When editing schematron files in PageSeeder, pressing ctrl-space displays autocomplete options to make editing easier.

View schema

To view Schematron schemas, navigate to the project above the group and select the ‘Schemas’ menu

Example schema

The best_practice.sch schematron file is used to validate and report on PSML documents.

<?xml version="1.0"?>
  This schematron validates a PSML document.

  The schematron rules can be used to enforce additional constraints required
  by the application.

<sch:schema xmlns:sch=""
            title="Rules for [config] documents">

    Set of rules applying to the entire document
  <sch:pattern name="Document">

    <sch:rule context="/document">

      <!-- Too many sections -->
      <sch:assert test="count(section) le 20">Your document contains over
      20 sections. You should consider splitting your document into
      multiple documents.</sch:assert>

      <!-- No Doc ID -->
      <sch:report test="not(documentinfo/uri/@docid)">Your document
      does not have a Doc ID.</sch:report>

      <!-- No Label -->
      <sch:report test="not(documentinfo/uri/@labels)">Your document
      has no label.</sch:report>



    Set of rules applying to the document sections
  <sch:pattern name="Sections">

    <sch:rule context="section/fragment">

      <!-- Section has no heading -->
      <sch:assert test="name(*[1]) = 'heading'">Fragment
      '<sch:value-of select="@id"/>' has no title.</sch:assert>

      <!-- Section is too long (over 2000 chars)-->
         test="string-length(string-join(.//text(), '')) le 2000">
      Fragment '<sch:value-of select="@id"/>' has over 2000 characters.




Create a schema

To create a new schema requires project manager rights, switch to the developer perspective and select Document types under the Dev tab. For each document type, there is an option to create a Schematron schema.


Created on , last edited on