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

AttributeDescriptionRequired
nameThe name of the config - set to "default" if not specified.No
fileThe path of a file containing the properties to load.No
load-defaultWhether to load the default properties from PageSeeder (only applicable if script is run within PageSeeder publisher) - default "true".No

Entries

Entries can also be specified individually using the inner element

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

Each entry will overwrite 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" />

Overridding file properties:

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

Properties

The task will add 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]

Below 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 user's jsessionid in PageSeeder
hostthe webSiteAddress from PageSeeder template.properties
portthe webSitePort from PageSeeder template.properties
servlet.prefixthe servletPrefix from PageSeeder template.properties
site.prefixthe sitePrefix PageSeeder template.properties
group.idid of group/default group for URI (e.g. 12)
group.namename of group/default group for URI (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.templatestyle owner of group/default group for URI (e.g. acme) - previously ps-style-owner
custom.foldercustomFolder name from template.properties (e.g. acmedefault)
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} )

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):

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/minutes/demo/2006-12-08.xml
uri.path.no.groupURI path without group prefix
 

/minutes/demo/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.typePSML document type (e.g. book)

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.

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 user's ID (e.g 123)
user.firstnameThe current user's first name (e.g.  John)
user.surnameThe current user's surname (e.g.  Smith)

The following properties can only be set manually:

PropertyDescription
passwordThe password used to connect to PageSeeder

Note

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