PSML

A complete reference of PageSeeder's markup language 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.
  • In future the user interface will allow document content to be reordered more easily.

"PS Standard v's PSML" and "PSML Quick Reference" can be downloaded from Documents. For sample documents, see PSML Sample Code

Technical Detail

Following are some of the differences between PSML and PS Standard XML in great technical detail. 

  • Has the file extension .psml
  • No <?stylesheet .. ?> processing instruction
  • Change <root> to <document version="[versionname/'current'/'original']" date="[version/modified date/created date]" type="[document type]" level="[portable|metadata|processed]" edit="[true|false]" lockstructure="[true|false]" schemaversion="x">
  • No <title> element under the <document> element.
  • No separate namespace on <documentinfo> and <fragmentinfo>
  • Under <documentinfo> add <compareto version="[versionname/'original']" date="[version/created date]">
  • Replace <releases> with <versions> and <release> with <version id=[xlinkid] name="[unique string]" creation="[date]" status="[status]" priority="[priority]" duedate="[duedate]"><assignedto ...>...</assignedto> <description>...</description><labels>...</labels></version>
  • No <discussion> element (this may be added in future)

  • Replace uri/@behavior with @mediatype and @documenttype (aka document config), change uri/@datecreated to @created and add uri/@modified
  • Changed media type to application/vnd.pageseeder.psml+xml
  • Change fragmentinfo/fragment element to <locator @id="[locator id]" fragment="[id]" @modified="[last edit date] @editid="[xlink id]">
  • Change notes/xlink to notes/note
  • There is no <properties> section – use <properties-fragment> element instead or corresponding <document> attributes:
    • @add-fragment=false or @delete-fragment=false should set document/@lockstructure="true"
    • @broadcast-discussion=false is no longer supported
  • Move section/toc to document/toc (by default this is after the first <section> in Reference documents only) and programmatically  remove toc/@maxLevel when converting from standard (non-master) PS XML to PSML.
  • Change <body id="[id]" type="[section type]"> to <fragment id="[id]" type="[fragment type]">. id can now be a simple incrementing integer with no constraints on the order it appears in the document.
  • Change <customBody> to <media-fragment> and changed attribute @contentType to @mediatype.
  • Remove section/@format and map fragment types to editors instead
    • If @edit="false" or @overwrite="false" it's easier to generate update documents externally if the structure is locked by setting document[@lockstructure="true"]
  • Add to <section> the attribute @lockstructure="[true|false]"
  • Change all elements/attributes to lower case (e.g. blockxref ) and @type  on xref, reversexref and blockxref to lowercase
  • Removed deprecated constructs such as pageBreak, table/@align, xref/@manual @doublelink @doublelinktitle @doublelinkmanual
  • Changed attributes @uritype, @uriconfig on xref and blockxref to @mediatype, @documenttype
  • Add attributes xref/@id, blockxref/@id, reversexref/@docid, reversexref/@mediatype, reversexref/@documenttype
  • Remove elements table/tgroup, tgroup/colspec, mlist, mitem and attribute caption/@numbered
  • Change <graphic> to <image>
  • Change <code> to <preformat>
  • Change <inlineLabel name="x"> to <inline label="x">
  • Change <paraLabel name="x"> to <block label="x">
  • Deprecated attribute title/@level (use Properties fragment instead, see below)
  • Replace <section ... format="pslabelvalues"><body> with <section><properties-fragment ...>.
  • Replace <section ... format="psxreflist"><body> with <section><xref-fragment ...> 
    • convert <xref> inside to <blockxref> and <xref type='Replace'> to type='embed'
  • Replace body/xref[@type='Replace'] with <xref-fragment ...> ,  convert any <xref> inside to <blockxref>, any xref type='Replace' to type='embed' and remove any other content.
  • For portable format levels up to 6 (<= 6), change <heading[x]> to <heading level="x">
  • Add support for:
    • section/@title: not part of document content used to show section boundary when editing but is 
    • para/@prefix, heading/@prefix: used for manual numbering

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