Publishing

Publishing PageSeeder data to print, the Web or both

Publishing

This section details PageSeeder's powerful publishing capabilities.

Overview

There are many situations where PageSeeder documents collections require multiple processing stages. Examples include:

  • creating a website with both navigation and content,
  • transforming and generating PDF files from PSML source documents.

Batch processing such as this is addressed with the PageSeeder publish function. Using the PageSeeder Ant API, Publish leverages Apache Ant , an open source technology that is available on most operating systems. Getting the most out of Publish really requires a basic understanding of Ant. There are many sources Ant reference and learning material. What is covered on this site really relates only to how PageSeeder interacts with Ant. 

For more information on batch processing with Publish see Publish script. For information about how to modify the user interface to present different publishing options see <publishing>.

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 passed to the Publish Ant Script:

ParameterDescription

ps-jsessionid

the user's jsessionid in PageSeeder

ps-host

the webSiteAddress from

template.properties

ps-port

the webSitePort from

template.properties

ps-servletPrefix

the servletPrefix from

template.properties

ps-sitePrefix

the sitePrefix from

template.properties

ps-groupId

id of group/default group for URI
For example:

12

ps-groupName

name of group/default group for URI
For example:

acme-demo

ps-groupFolder

path of default group folder

/ps/acme/demo

ps-groupFolderNoPrefix

path of default group folder with
no site prefix. For example:

/acme/demo

ps-groupHost

host of default group folder.
For example:

mycompany.com

ps-groupPort

port of default group folder.
For example

80

ps-style-owner

style owner of group/default group for URI
For example:

acme

ps-customFolder

customFolder name from template.properties
For example:

acmedefault

ps-working

path to local unique working folder
or 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

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

username of the current user
For example:

jsmith

ps-userId

ID of the current user. For example:

123

ps-userFirstname

first name of the current user
For example:

John

ps-userSurname

surname of the current user
For example:

Smith

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

ParameterDescription

ps-uriId

URI id. For example:

123

ps-uriScheme

URI scheme. For example:

http

ps-uriHost

URI host. For example:

mycompany.com

ps-uriPort

URI port. For example:

80

ps-uriPath

URI path. For example:

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

ps-uriPathNoPrefix

URI path without prefix.
For example:

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

ps-uriPathNoGroup

URI path without group prefix.
For example:

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

ps-uriFolder

URI folder.  For example:

/ps/acme/demo/minutes

ps-uriFolderNoPrefix

URI folder with /ps prefix.
For example:

/acme/demo/minutes

ps-uriFolderNoGroup

URI folder without group prefix.
For example:

/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. For example:

<?stylesheet css=""?>

ps-style-format

URI format. For example:

<?stylesheet format=""?>

ps-style-config

URI config. For example:

<?stylesheet config=""?>

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

ParameterDescription

ps-uploadPath

document path.
For example:

/minutes/2006-12-08.xml

ps-uploadFolder

document folder.
For example:

/minutes

ps-uploadFilename

document filename.
For example:

2006-12-08.psml

ps-uploadFilenameNoExt

Filename without extension.
For example:

2006-12-08

ps-uploadExtension

File extension.
For example:

xml

ps-uploadConfirmed

If 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, 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