Skip to main content

 Universal format

Portable, metadata and processed PSML

PSML

Overview

The PSML format is designed to replace PS XML. Some of the ways it improves on the existing format are as follows:

  • It is a more consistent, coherent and comprehensible format.
  • Metadata such as documentinfo and fragmentinfo no longer requires a separate namespace.
  • Document fragments of different types can be added more easily.
  • Document content can be reordered more easily in the user interface.

“PSML Quick Reference” can be downloaded from documents. For sample documents, see PSML Sample Code.

Key ideas

Following are some of the key technical ideas behind PSML: 

  • Use specific file extension .psml
  • Has specific media type to application/vnd.pageseeder.psml+xml
  • No namespace to keep language simple.
  • Use lower case all element and attribute names (like many other XML languages).
  • Use kebab case for compound names.
  • Consistent with some core PageSeeder API elements such as <uri> and <version>.
  • Use similar concept and syntax to HTML.

Example

<?xml version="1.0" encoding="UTF-8"?>
  <document version="2.0" 
            date="2010-10-25T12:26+10:00"
            type="spec"
            level="portable" 
            schemaversion="1.0">
    <documentinfo>
      <uri id="123"
           ...
           mediatype="application/vnd.pageseeder.psml+xml"
           documenttype="spec"> ...
      </uri>
      ...
    </documentinfo>
    <fragmentinfo>
      <locator fragment="5" ...> ... </locator>
      ...
    </fragmentinfo>
    <section id="title">
      <fragment id="5">
        <heading level="1">My Spec</heading>
      </fragment>
    </section>
    <toc/>
    <section id="properties" lockstructure="true">
      <properties-fragment id="6">
        ...
      </properties-fragment>
    </section>
    <section id="content" title="Content">
      <fragment id="3" type="intro"> ... </fragment>
      <media-fragment id="4"
                      mediatype="application/mathml+xml">
        ...
      </media-fragment>
      <fragment id="1"> ... </fragment>
    </section>
    <section id="links" lockstructure="true">
      <title>Links</title>
      <xref-fragment id="7"> ... </fragment>
    </section>
  </document>
Created on , last edited on