Skip to main content


Publishing PageSeeder data to print, the Web or both


This section explains how PageSeeder can output to different formats and applications.


Some publishing situations need multiple processing stages in order for resolved values to be available for other parts of the process. 

This is similar to the way a conventional typesetting app must first compose the individual pages, then insert page numbers in the Table of Contents (ToC) then adjust all page numbers based on how many pages the fully resolved ToC is.

Examples include:

  • Creating the navigation and content of a website.
  • Transforming, then generating pages and cross-reference values for PDF.

Multi-stage, batch processing is available through the PageSeeder publish function. Using the PageSeeder Ant API, Publish leverages Apache Ant , an open source technology that is available on most operating systems.

To get the most out of Publish, needs an understanding of Ant. While there are many sources of Ant reference and learning material, the focus of this site is how PageSeeder interacts with Ant. 

More information on batch processing is available through Publish scripts. To modify the user interface or configure different options, see <publishing>. For example publish scripts, see PSML Ant scripts.

Publish Engine components

Publish Engine is a Java servlet that communicates with the PageSeeder Core using HTTP. The publish script is an Apache Ant build script.

After the script is instantiated, the Publish Control passes a request to the Publish Engine for the following actions:

  • query – the engine processes the script, returning a list of user-selectable options, such as the following:
    • generate Table of Contents.
    • use hi-resolution images.
  • publish – executes the script and selected options.
  • check – displays the status of selected publishing task.
  • cancel – cancel the current task.

Depending on the actions initiated, the response is passed back to the Publish Control, processed by XSLT and rendered on the user screen. The architecture is outlined in the following diagram:


Publish parameters

These parameters are accessed in ANT using the Task config.

The following table lists the parameters passed to the Publish Ant Script:

ps-jsessionidThe user’s jsessionid in PageSeeder
ps-hostThe webSiteAddress from
ps-portThe webSitePort from
ps-servletPrefixThe servletPrefix from
ps-sitePrefixThe sitePrefix from
ps-groupIdid of group initiating the publish12
ps-groupNameName of group initiating the publishacme-demo
ps-groupFolderPath of default group folder
ps-groupFolderNoPrefixPath of default group folder with
no site prefix

ps-groupHostHost of default group
ps-groupPortPort of default group folder80
ps-groupTemplateTemplate for group (or default group if URI)acme
ps-globalTemplateglobalTemplate name from global.propertiesacmedefault
ps-style-ownerTemplate for group (or default group if URI). DEPRECATED in v5.99 use ps-groupTemplate instead.acme
ps-customFolderglobalTemplate name from DEPRECATED in v5.99 use ps-globalTemplate instead.acmedefault

ps-workingPath to local unique working folder
or this group/document
ps-workingRootPath to root for all local working folders
ps-documentsRootPath to PageSeeder documents folder
only if Publish Engine is installed on
PageSeeder server)
ps-webRootPath to the root for ps-publisher webapp

ps-engineUrlThe external URL used to contact
the Publish Engine
ps-sessionfolderA unique folder name for the current PS
user session to copy result files to
ps-usernameusername of the current userjsmith
ps-userIdID of the current user123
ps-userFirstnameGiven name of the current userJohn
ps-userSurnameFamily name of the current userSmith

Following are the parameters for a Document being published. These are not applicable for a Group or Batch being published or a document in the Loading Zone:

ps-uriIdURI id123
ps-uriSchemeURI schemehttp
ps-uriPortURI port80
ps-uriPathURI path/ps/acme/demo/minutes/2006-12-08.xml
ps-uriPathNoPrefixURI path without prefix/acme/minutes/demo/2006-12-08.xml
ps-uriPathNoGroupURI path without group prefix/minutes/demo/2006-12-08.xml
ps-uriFolderURI folder/ps/acme/demo/minutes
ps-uriFolderNoPrefixURI folder with /ps prefix/acme/demo/minutes
ps-uriFolderNoGroupURI folder without group prefix/minutes
ps-uriFilenameNoExtFilename without extension2006-12-08
ps-uriExtensionFile extensionxml
ps-uriDocumentIdURI docid (optional)mydoc1
ps-uriPublicationIdThe ID of the publication that URI is
the root of (optional)
ps-uriPublicationTypeThe type of the publication that URI
is the root of (optional)
ps-style-configURI document typedefinition

The following parameters are for processing a Batch of documents (requires PageSeeder v5.98 or higher):

ps-batchIdsA comma-separated list of URI IDs in the batch123,456,789
ps-searchQuestionThe search question used to select the batch IDs from (optional)green
ps-searchQuestionFieldsThe search question fields used to select the batch IDs from (optional)pstitle,pscontent,psfilename,psdocid,psid
ps-searchFiltersThe search filters used to select the batch IDs from (optional)psdocumenttype:product,pslabel:simple
ps-searchRangesThe search ranges used to select the batch IDs from (optional)psproperty-title:[A;C},ranges=psxrefcount:{50;]

The following parameters are for processing a Document in the Loading Zone:

ps-uploadPathDocument path/minutes/2006-12-08.xml
ps-uploadFolderDocument folder/minutes
ps-uploadFilenameDocument filename2006-12-08.psml
ps-uploadFilenameNoExtFilename without extension2006-12-08
ps-uploadExtensionFile extensionxml
ps-uploadConfirmedIf script is run before displaying the Upload confirmation, the value is false, otherwise it’s true.

Publish messages

Generally all messages output from an Ant script are logged by PageSeeder, but the following special Ant messages are also recognized:

<echoxml><progress percent="[n]" /></echoxml>
  • where n is an integer from 0 to 100, displays progress on the Publish Page (not logged by PageSeeder).
  • where url is a URL beginning with / or http://, displays the content of [url]?t=[timestamp] when the Publish is complete.
  • which displays the PSML at this path on the Publish Engine as HTML where path is to start with ‘/session/${ps-sessionfolder}’ (PageSeeder does the translation to HTML).
  • which displays the file at this path on the Publish Engine where path is to start with ‘/session/${ps-sessionfolder}’. If using a Publish Engine on a different PageSeeder server, this can be used to proxy the request using the local PageSeeder URL; however, it is more efficient to use the direct Publish Engine URL with <displayUriPath>.
  • where url is a URL beginning with / or http://, displays a link to [url] when the Publish is complete.

PageSeeder Ant tasks

The PageSeeder External API defines a few Ant tasks that are useful to connect and interact with the PageSeeder Server. For details, see Ant API and Using Ant.

Created on , last edited on