Publishing

Publishing PageSeeder data to print, the Web or both

Publishing

This section details PageSeeder's powerful publishing capabilities.

Overview

There are many situations that require collections of files to be processed through multiple stages. For example, creating an entire website or paginating, then generating the PDF files necessary to print a book. In these situations, the PageSeeder publish function provides a mechanism to automate batch processing. The Publish solution is based on Apache Ant, an open source technology that is widely supported and available on most operating systems. Having a basic understanding of Ant is really a prerequisite for getting the most out of the following document which contains both background information on PageSeeder publish and some detailed reference information.

For information on the different types of Publish scripts see Publish script.

Publish Engine components

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

After the Script is instantiated, the Publish Control passes a request to the Publish Engine where these actions are available:

  • query – the engine reads the script and returns a list of user selectable processing options (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 which actions are initiated, the response is passed back to the Publish Control and processed by XSLT for display on the Member's screen. This architecture is outlined in the following diagram:

Website-Engine-Overview1.png

Publish parameters

The table below lists the parameters that are passed to the PageSeeder Publish Ant Script:

ParameterDescription

ps-jsessionid

the user's jsessionid in PageSeeder

ps-host

the webSiteAddress from PageSeeder template.properties

ps-port

the webSitePort from PageSeeder template.properties

ps-servletPrefix

the servletPrefix from PageSeeder template.properties

ps-sitePrefix

the sitePrefix PageSeeder template.properties

ps-groupId

id of group/default group for URI (e.g. 12)

ps-groupName

name of group/default group for URI (e.g. acme-demo)

ps-groupFolder

path of default group folder

/ps/acme/demo

ps-groupFolderNoPrefix

path of default group folder with no site prefix

/acme/demo

ps-groupHost

host of default group folder. For example:

mycompany.com

ps-groupPort

port of default group folder (e.g. 80)

ps-style-owner

style owner of group/default group for URI (e.g. acme)

ps-customFolder

customFolder name from template.properties (e.g. acmedefault)

ps-working

path to local unique working folder for this group/document

ps-workingRoot

path to root for all local working folders

ps-documentsRoot

path to PageSeeder documents folder (only if Publish Engine is installed on PageSeeder server).

ps-webRoot

path to the root for the ps-publisher webapp

ps-engineUrl

the external URL used to contact the Publish Engine. For example:

http://mycompany.com/ps-publisher

ps-sessionfolder

A unique folder name for the current PS user session to copy result files to. For example:

${ps-webRoot}/session/${ps-sessionfolder}

ps-username

The current user's username (e.g.  jsmith)

ps-userId

The current user's ID (e.g.  123)

ps-userFirstname

The current user's first name (e.g.  John)

ps-userSurname

The current user's surname (e.g.  Smith)

The following parameters are only passed when a Document is being published (not when a Group is being published and not when the document is in the Loading Zone):

ParameterDescription

ps-uriId

URI id (e.g. 123)

ps-uriScheme

URI scheme (e.g. http)

ps-uriHost

URI host (e.g. mycompany.com)

ps-uriPort

URI port (e.g. 80)

ps-uriPath

URI path

/ps/acme/demo/minutes/2006-12-08.xml

ps-uriPathNoPrefix

URI path without prefix

/acme/minutes/demo/2006-12-08.xml

ps-uriPathNoGroup

URI path without group prefix

/minutes/demo/2006-12-08.xml

ps-uriFolder

URI folder

/ps/acme/demo/minutes

ps-uriFolderNoPrefix

URI folder with /ps prefix

/acme/demo/minutes

ps-uriFolderNoGroup

URI folder without group prefix

/minutes

ps-uriFilename

Filename, for example:

 2006-12-08.xml

ps-uriFilenameNoExt

Filename without extension, for example

2006-12-08

ps-uriExtension

File extension, for example

xml

ps-style-css

URI css from

<?stylesheet css=""?>

ps-style-format

URI format from 

<?stylesheet format=""?>

ps-style-config

URI config from

<?stylesheet config=""?>

The following parameters are only passed when a Document in the Loading Zone is being published.

ParameterDescription
ps-uploadPathdocument path
/minutes/2006-12-08.xml
ps-uploadFolderdocument folder
/minutes
ps-uploadFilenameFilename (e.g.  2006-12-08.xml)
ps-uploadFilenameNoExtFilename without extension (e.g.  2006-12-08)
ps-uploadExtensionFile extension (e.g.  xml)
ps-uploadConfirmedIf script is run before displaying the Upload confirmation then false, otherwise 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, will display progress on the Publish Page (not logged by PageSeeder)
<echoxml><displayUriPath>[url]</displayUriPath></echoxml>
  • where url is a URL beginning with / or http://, will display the content of [url]?source=true&t=[timestamp] when the Publish is complete. The URL should point to a document on the PageSeeder server.
<echoxml><previewPath>[path]</previewPath></echoxml>
  • which will display the PS XML at this path on the Publish Engine as HTML where path should start with '/session/${ps-sessionfolder}' (PageSeeder does the translation to HTML).
<echoxml><publisherPath>[path]</publisherPath></echoxml>
  • which will display the file at this path on the Publish Engine where path should start with '/session/${ps-sessionfolder}'.
<echoxml><downloadLink>[url]</downloadLink></echoxml>
  • where url is a URL beginning with / or http://, will display 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