Publishing PageSeeder data to print, the Web or both

Task export

This task is used to export individual, or multiple, documents to the Universal Portable Format. The output of this task is a list of files and their metadata.

Documents are selected in the following order:

If srcuris is specified select documents with those URI IDs.

Otherwise if src is specified select the document with that path or if a folder then:

if <filter> specified search for documents within that folder,

if includes or excludes is specified also use that to filter the documents.

If xrefdepth or <xrefs> is specified apply them to selected files and add referenced documents.

If resolveimages="true" add referenced images.


URLs are only exported if they are referenced in the exported documents and xrefdepth is 1 or more.


Minimal definition:

<ps:export src="[source]" dest="[destination]"/>

 Full definition:

    src="[source]" or srcuris="[uriids]"
    group="[group name]"
    xrefdepth="[forward xref depth]"
    compareto="[compare version]"
    publicationid="[publication ID"
    config="[config name]">
      with="[facet values]"
      since="[modified date]"
      ranges="[range values]"
      indexcomplete="[true|false]" />
      forward="[forward xref depth]"
      reverse="[reverse xref depth]"
      types="[xref types]" />


srcThe PS source document/folder path excluding site prefix (e.g. /acme/specs/documents)Yes, if srcuris not specified
srcurisComma separated list of PS URI Ids to download.Yes, if src not specified
destThe destination file system folder or if a path ending with .zip, just a zip of the files will be saved.Yes
groupUse document content for this group if possible (if not specified uses the src URIs default group or 1st accessible group)Yes, if filter indexcomplete=true
contextThe PS context path - defaults to the source folder or parent folder of the source document (e.g. /acme/specs)Yes, if srcuris specified
includesA comma-separated list of patterns matching documents/folders to include. When not specified, all documents/folders are included.
The format is similar to other Ant tasks file pattern selection. Here are some examples:
excludesA comma-separated list of patterns matching documents/folders to exclude. When not specified, no documents/folders are excluded.
The format is similar to other Ant tasks file pattern selection. Here are some examples:
xrefdepthThe maximum depth of forward XRefs to follow from the source files to find the export set - default 0.No
versionA decimal number, ISO 8601 date or non-number version used to export a version equal to (or if a number/date less than) this version. If version is not found the original uploaded version is exported. If version is empty or 'current' the current version is exported.No
comparetoA decimal number, ISO 8601 date or non-number version used to compare a version equal to (or if a number/date less than) this version with the downloaded version. If version is not found the original uploaded version is compared. If compareto is 'current' the current version is compared.No
publicationidThe publication ID that version and compareto must be related to. If no version or compareto related to this ID can be found the original uploaded version is used. PageSeeder 5.96 or later only.No
metadataonlyIf true only create metadata, do not download files - default false.No
resolveimagesIf true also export all images referenced in PSML documents (requires metadataonly=false) - default true. DEPRECATED use loadimages instead.No
loadimagesIf true also export all resolved images referenced in PSML documents (requires metadataonly=false) - default true.No
loadalternatesIf true also export targets of all XRefs with type="alternate" (requires metadataonly=false) - default true.No
imagemetadataonlyIf true only create metadata, do not download resolved image files (requires resolveimages=true) - default false.No
failonerrorIf true stop build process on error - default true.No
configUniversal PS config name - default is default.No


Elements can be used to specify more detailed options than their attribute equivalent. It is an error if both the attribute and element are specified.

Element <filter>


As the filter relies on the group index it is recommended to set indexcomplete=true to ensure large indexing jobs are complete before exporting.

The filter will only work when exporting a folder and will only search the single group specified or calculated (see group attribute above).
withComma separated list of facet:value pairs to filter source documents
(e.g. pslabel:cars,psdocumenttype:spec)
sinceISO date/time to return source documents modified after this (e.g. 2010-10-25 or 2010-10-25T12:26+10:00)No

Comma separated list of ranges to filter source documents (same format as ranges parameter on Service: /groups/{group}/search [GET] e.g. ranges="pslastediteddate:[2017-12-06;2017-12-20],psxrefcount:[1;]").

indexcompleteIf true then wait until no jobs are in the indexing queue for the group before exporting (@group attribute must also be specified)No

Element <xrefs>


This task will only download an XRef's target document it will not embed or transclude the content inline. For that you need to use Task process.

forwardSame as @xrefdepth attribute.No
reverseSame as @xrefdepth attribute except for reverse XRefs.No
typesComma separated list of XRef types to follow - defaults to all (i.e. none, transclude, embed )No


This task uses the following PS config environment properties:

  • scheme – scheme for connecting to PageSeeder
  • host – host for connecting to PageSeeder
  • port – port for connecting to PageSeeder
  • servlet.prefix – servlet prefix for connecting to PageSeeder – default  /ps/servlet
  • site.prefix – site prefix for connecting to PageSeeder – default  /ps
  • jsessionid or username/password – jsessionid pr username/password for connecting to PageSeeder
  • uri.scheme or group.scheme – scheme for src documents
  • or – host for src documents
  • uri.port or group.port – port for src documents


Possible errors are:

  • Required attribute or environment property missing
  • Attribute or property invalid
  • Src not contained in context
  • Download access denied
  • Resolve image access denied
  • Resolve image not found
  • Image URI ID not found
  • Download not found


    xrefdepth="2" />
  <filter since="2012-08-31" />
  <filter with="psstatus:Approved" indexcomplete="true" />
    context="/acme/specs/website/" />

Created on , last edited on