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-PSML 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 files in the exported set are relative to a specified context. For example /ps/acme/specs/documents/spec.psml with context /ps/acme/specs would be documents/spec.psml).
    • where export set files in _local folder are outside the specified context, relative to the context group. For example, a file such as /ps/acme/specs/images/figure1.jpg with context of /ps/acme/specs/documents would be represented as images/figure1.jpg. Without a context group /acme, it would go in _external.
    • The export set files in _external folder are outside the specified context and the source group. For example, /ps/acme/products/images/figure2.jpg with source and context /ps/acme/specs/documents would be /acme-products/images/figure2.jpg.

The manifest.xml lists 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>

Non-PSML documents are expressed as the <document> element and attribute level="metadata". Only the <documentinfo> element is required with <fragmentinfo> optional. 

<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" on the <document> element. <documentinfo>, <fragmentinfo> and <reversexrefs> elements are all included.

Example

Source

Group

Path (in group)

References

acme-specs

documents/book.psml

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.psml

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