Publishing

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.

Note

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

Definition

Minimal definition:

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

 Full definition:

<ps:export
    src="[source]" or srcuris="[uriids]"
    dest="[destination]"
    group="[group name]"
    context="[context]"
    includes="[patterns]"
    excludes="[patterns]"
    xrefdepth="[forward xref depth]"
    version="[version]"
    compareto="[compare version]"
    metadataonly="[true|false]"
    resolveimages="[true|false]"
    imagemetadataonly="[true|false]"
    failonerror="[true|false]"
    config="[config name]">
  <filter
      with="[facet values]"
      since="[modified date]"
      indexcomplete="[true|false]" />
  <xrefs
      forward="[forward xref depth]"
      reverse="[reverse xref depth]"
      types="[xref types]" />
</ps:export>

Attributes

AttributeDescriptionRequired
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:
*.doc,archive,folder1/*.psml
*.jpg,**/*.jpg
No
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:
*.doc,archive,folder1/*.psml
*.jpg,**/*.jpg
No
xrefdepthThe maximum depth of forward XRefs to follow from the source files to find the export set - default 0.No
versionA decimal number or non-number version used to export a version equal to (or if a number less than) this version. If version is not found the original version is exported. If version is empty the current version is exported.No
comparetoA decimal number or non-number version used to compare a version equal to (or if a number less than) this version with the downloaded version. If version is not found the original version is compared. If compareto is empty the current version is compared.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

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>

Note

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.
AttributeDescriptionRequired
withComma separated list of facet:value pairs to filter source documents
(e.g. pslabel:cars,psdocumenttype:spec)
No
sinceISO date/time to return source documents modified after this (e.g. 2010-10-25 or 2010-10-25T12:26+10:00)No
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>

Note

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.

AttributeDescriptionRequired
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

Environment

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
  • uri.host or group.host – host for src documents
  • uri.port or group.port – port for src documents

Errors

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

Examples

<ps:export
    src="/acme/specs/documents/spec.psml"
    dest="c:\working\export"
    xrefdepth="2" />
<ps:export
    src="/acme/specs/documents"
    dest="c:\working\docs"
    xrefdepth="1"
    version="2.0">
  <filter since="2012-08-31" />
</ps:export>
<ps:export
    src="/acme/specs/documents"
    dest="c:\working\docs"
    xrefdepth="1">
  <filter with="psstatus:Approved" indexcomplete="true" />
</ps:export>
<ps:export
    src="/acme/specs/website/content/books/BOOK1/"
    dest="c:\working\"
    context="/acme/specs/website/" />

Created on , last edited on