The end-user manual for PageSeeder


PSML Schematron

The default.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

      <!-- 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)-->
      <sch:assert test="string-length(string-join(.//text(), '')) le 2000">
      Fragment '<sch:value-of select="@id"/>' has over 2000 characters.




Created on , last edited on