Publishing

Publishing PageSeeder data to print, the Web or both

Publishing

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

Overview

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 conventional typesetting application must first compose the individual pages, then insert page numbers in the Table of Contents (ToC) then adjust all page numbers based on how pages the fully resolved ToC is.

Examples include:

  • creating the navigation and content of a website,
  • transforming, then generating pages and cross-referernce 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 via  Publish scripts. To modify the user interface or configure different options see <publishing>.

Publish Engine components

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 for the following actions:

  • query – the engine processes the script returning a list of user-selectable options, such as
    • 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 member screen. The architecture is outlined in the following diagram:

Website-Engine-Overview1.png

Publish parameters

Note

These parameters should be access in ANT via the Task config.

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 initiating the publish
For example:

12

ps-groupName

name of group initiating the publish
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]?t=[timestamp] when the Publish is complete.
<echoxml><previewPath>[path]</previewPath></echoxml>
  • which will display the PSML 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}'. If using a Publish Engine on a different PageSeeder server this can be used to proxy the request via the local PageSeeder URL however it is more efficient to use the direct Publish Engine URL with <displayUriPath>.
<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