Skip to main content

 Publishing

Publishing PageSeeder data to print, the Web or both

Task config

The Universal Ant PS Config is used to centralize common configuration parameters and to maintain transparency about the config in use.

Definition

<ps:config name="[name]" file="[file]">
  <entry key="[key]" value="[value]"/>
</ps:config>

Attributes

AttributeDescriptionRequiredDefault
nameThe name of the config - set to default if not specifiedNo
fileThe path of a file containing the properties to loadNo
load-defaultWhether to load the default properties from PageSeeder (only applicable if script is run within PageSeeder publisher)Notrue

Entries

Entries can also be specified individually using the inner element

<entry key="[key]" value="[value]">

Each entry overwrites any existing one with the same name.

Examples

Simplest case:

<ps:config />

 Reading properties from file:

<ps:config file="ps.properties" />

Named configuration:

<ps:config name="A" file="ps.properties" />
<ps:config name="B" file="ps.properties" />

Overriding file properties:

<ps:config file="ps.properties" >
  <entry key="scheme" value="https"/>
</ps:config>

Properties

The task adds a list of properties to the current project. Each property can be accessed using the following pattern: 

ps.config.[config].[property]

where [config] is the name of the config (if none was specified, default is used) and [property] is the name of the property.

ps.config.default.[property]

Following are the names of properties created by the PS config. They correspond to the old ps-* Ant properties except where 'new property' is specified.

PropertyDescription
jsessionidThe jsessionid for a PageSeeder user
hostThe webSiteAddress from PageSeeder global.properties
portThe webSitePort from PageSeeder global.properties
servlet.prefixThe servletPrefix from PageSeeder global.properties
site.prefixThe sitePrefix from PageSeeder global.properties
global.templateglobalTemplate name from PageSeeder global.properties (e.g. acmedefault)
group.idID of group initiating the publish (e.g. 12)
group.nameName of group initiating the publish (e.g. acme-demo)
group.folderPath of default group folder
  /ps/acme/demo
group.folder.no.prefixPath of default group folder with no site prefix
  /acme/demo
group.schemeScheme of default group folder (e.g. https) – new property
group.hostHost of default group folder
(e.g. mycompany.com)
group.portPort of default group folder (e.g. 80)
group.templateTemplate of group/default group for URI (e.g. acme) – previously ps-style-owner
custom.folderglobalTemplate name from global.properties (e.g. acmedefault). – DEPRECATED in v5.99 use global.template instead.
workingPath to local unique working folder for this group/document
working.rootPath to root for all local working folders
documents.rootPath to PageSeeder documents folder (only if Publish Engine is installed on PageSeeder server).
web.rootPath to the root for the ps-publisher webapp
engine.urlThe external URL used to contact the Publish Engine
(e.g. http://mycompany.com/ps-publisher)
session.folderA unique folder name for the current PS user session to copy result files to
(i.e. ${ps-webRoot}/session/${ps-sessionfolder} )

Document

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

PropertyDescription
uri.idURI id (e.g. 123)
uri.schemeURI scheme (e.g. http)
uri.hostURI host (e.g. mycompany.com)
uri.portURI port (e.g. 80)
uri.pathURI path
  /ps/acme/demo/minutes/2006-12-08.xml
uri.path.no.prefixURI path without prefix
  /acme/demo/minutes/2006-12-08.xml
uri.path.no.groupURI path without group prefix
  /minutes/2006-12-08.xml
uri.folderURI folder
  /ps/acme/demo/minutes
uri.folder.no.prefixURI folder with /ps prefix
 /acme/demo/minutes
uri.folder.no.groupURI folder without group prefix
  /minutes
uri.filenameFilename (e.g.  2006-12-08.xml)
uri.filename.no.extFilename without extension (e.g.  2006-12-08)
uri.extensionFile extension (e.g.  xml)
uri.document.idURI docid (e.g. mydoc1)
uri.document.typePSML document type (e.g. definition)
uri.publication.idThe ID of the publication that URI is the root of (e.g. mypub1)
uri.publication.typeThe type of the publication that URI is the root of (e.g. report) otherwise default.

Batch

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

ParameterDescription
batch.ids

A comma-separated list of URI IDs in the batch.
For example:

123,456,789
search.question

The search question used to select the batch IDs from (optional).
For example:

green
search.question.fields

The search question fields used to select the batch IDs from (optional).
For example:

pstitle,pscontent,psfilename,psdocid,psid
search.filters

The search filters used to select the batch IDs from (optional).
For example:

psdocumenttype:product,pslabel:simple
search.ranges

The search ranges used to select the batch IDs from (optional).
For example:

psproperty-title:[A;C},ranges=psxrefcount:{50;]

Loading Zone

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

PropertyDescription
upload.pathDocument path
  /minutes/2006-12-08.xml
upload.folderDocument folder
 /minutes
upload.filenameFilename (e.g.  2006-12-08.xml)
upload.filename.no.extFilename without extension (e.g.  2006-12-08)
upload.extensionFile extension (e.g.  xml)
upload.confirmedIf script is run before displaying the Upload confirmation then false, otherwise true

Current user

The following parameters are only passed when the current user is logged in:

PropertyDescription
usernameThe current user’s username (e.g.  jsmith)
user.idThe current users ID (e.g 123)
user.firstnameThe current user’s first name (e.g.  John)
user.surnameThe current user’s surname (e.g.  Smith)

Set manually

The following properties can only be set manually:

PropertyDescription
passwordThe password used to connect to PageSeeder. When setting this property use load-default="false" on <ps:config> to ensure that the default jsessionid does not override the password.
To see the list of configuration properties while running a script, you can either use the DEBUG or VERBOSE mode (developer only) or use the echo properties Ant task  <echoproperties />

 

Created on , last edited on