PSML

A complete reference of PageSeeder's markup language PSML

Universal Portable Format

For PageSeeder data, the Universal Portable Format is the metaphorical equivalent of a USB drive. It can be unplugged from one server and plugged into another.

Publications that may be composed of a tens of thousands of linked documents and images can be packaged into a single zip file and can be later uploaded to a new server with complete fidelity. The features are:

  • A consistent, standalone representation of a PS file set
  • Isomorphic conversion to/from PageSeeder (history and comments excepted, these are part of the group, not the document)
    • Includes all the necessary files plus a manifest,
    • Links fully resolved with relative paths.
  • Packaged in the widely supported 'zip' format.
  • Standard PageSeeder interfaces for processing portable format include:
    • Upload input/Export output
    • Start and End point for numerous Apache Ant tasks

Definition

The universal format package which can be a single .zip file consists of the following folders/files:

  • META-INF folder contains manifest.xml and a PSML metadata file [relative path].psml for every folder and non-PSXML file in the package (e.g. META-INF/images/figure1.jpg.psml). Any META-INF files are optional when uploading the package to PageSeeder.
  • META-INF/_urls folder contains a PSML metadata file [scheme]/[host]/[port]/[Unique ID].psml for every URL (external URI) referenced in the package (e.g. META-INF/_urls/http/www.acme.com/80/1234.psml). The Unique ID can be any string unique for that scheme/host/port. For an XRef to reference a URL the @href attribute must match the URL.
  • All PageSeeder files in the exported set relative to a specified context (e.g. /ps/acme/specs/documents/spec.xml with context /ps/acme/specs would be documents/spec.psml). Standard format PS XML files have the extension .psml and all extensions are converted to lower case.
  • _local folder contains files in the export set which are outside the specified context, relative to the context group (e.g. /ps/acme/specs/images/figure1.jpg with context /ps/acme/specs/documents would be images/figure1.jpg). If there is no context group (e.g. context=/acme) then these files would go in _External.
  • _external folder contains files in the export set which are outside the specified context and the source group (e.g. /ps/acme/products/images/figure2.jpg with source and context /ps/acme/specs/documents would be /acme-products/images/figure2.jpg)

The manifest.xml contains a list of all the documents in the export set in the following format:

<uris>
  <uri id="123"
    scheme="http" host="acme.com" port="80"
    path="/ps/acme/specs/documents/my%20spec.psml"
    decodedpath="/ps/acme/specs/documents/my spec.psml"
    mediatype="application/vnd.pageseeder.psml+xml"
    documenttype="spec" />
    ...
</uris>

The document metadata file for non-PS XML documents is PSML with level="metadata" and only includes <documentinfo> and optionally <fragmentinfo> as follows:

<document level="metadata">
  <documentinfo>
    <uri id="234" docid="fig2"
        scheme="http" host="acme.com" port="80"
        path="/ps/acme/products/images/figure%202.jpg"
        decodedpath="/ps/acme/products/images/figure 2.jpg"
        mediatype="image/jpg">
      <displaytitle>Figure 2</displaytitle> 
      <description>Overall system diagram</description> 
      <labels>Spec,System</labels>
    </uri>
  </documentinfo>
</document>

All PageSeeder PSML files have level="portable" and include <documentinfo>, <fragmentinfo> and <reversexrefs> elements.

Example

Source

Group

Path (in group)

References

acme-specs

documents/book.xml

graph.jpg, figure1.JPG, figure2.jpg

acme-specs

documents/graph.jpg

acme-specs

images/figure1.JPG

acme-products

images/figure2.jpg

Specifications

Parameter

Value

Source

/acme/specs/documents/book.xml

Context

/acme/specs/documents

Destination

{OUT}/

Output


{OUT}/
META-INF/manifest.xml

{OUT}/
META-INF/graph.jpg.psml

{OUT}/
META-INF/
_Local/images.psml

{OUT}/
META-INF/
_Local/images/figure1.jpg.psml

{OUT}/
META-INF/
_External/acme-products.psml

{OUT}/
META-INF/
_External/acme-products/images.psml

{OUT}/
META-INF/
_External/acme-products/images/figure2.jpg.psml

{OUT}/book.psml           
      (References: graph.jpg, 
_Local/images/figure1.jpg,
      
_External/acme-products/images/figure2.jpg)

{OUT}/graph.jpg

{OUT}/
_Local/images/figure1.jpg

{OUT}/
_External/acme-products/images/figure2.jpg

Created on , last edited on