Configuration

Configuration manual for PageSeeder

<publishing> element

This article describes how the <publishing> element can be modified to provide custom processing for different types of documents. The content on this element determines the options that are presented to users when the Publisher is invoked. 

See also Ant API.

<publishing> is valid in the following files:

  • document-config.xml – the <publishing> element is under the <document-config> element and controls processing for a specific document type.
    • To access this file, select Document config under the Dev tab in the Developer perspective.
  • publish-config.xml – is the root element of the file and controls publishing across all groups, folders and documents in a project.
    • To access this file, select Project files under the Dev tab in the Developer perspective, then select the template/[project]/Publish folder.

The configuration follows the structure below:

<publishing>
  <action ... />*
</publishing>

Note

When editing config files in PageSeeder, ctrl-space will provide suggestions that are contextually correct at the insertion point. This will ensure that the config file is valid.

Behavior

The PageSeeder model allows the default functionality to be extended by adding the @override attribute to the <publishing> element.

<publishing override="true">
   <action ... />*
</publishing>

If the <publishing> element is not specified, or the config files do not exist, options are inherited from the default files. To see the default document-config.xml and publish-config.xml, select Default files under the Dev tab in the Developer perspective.

Element Details

<action>

Each <action> should define:

AttributeDescription
@type

actions that are only valid in publish-config.xml (required)

import|export|publish|process

or

upload|upload-preview

In publish-config.xml, each <action> element must have a <source> element.

<source>

The <source> element can define:

AttributeDescription
@type

The type of object (required)

group|folder|document
@extension

The extension of the source file, only valid for

document-config.xml

Each <action> element must have one or more <target> element that corresponds to each target in the Ant script.

<target>

The <target> element defines:

AttributeDescription
@nameMust match the target name in the Ant script (required)
@perspective

Which perspective the target name will be displayed in. (default standard)

standard|developer|lab

@role

The minimal role required to run the process

contributor|manager|approver

Each <target> element must have a <description> element to describes the process in the user interface. Each <target> element can have one or more <param> elements for the specified parameters.

<param>

Each <param> element can define:

AttributeDescription
@nameThe name of the parameter (required)
@labelDisplayed next to the field (required)
@type

One of the following values (default is text). See below for further detail.

text|select|checkbox|
date|number|localdocumentversion|
documentversion| documentlabel|
documentstatus|fragmentlabel
@perspectiveWhich perspective the target name will be displayed in.
@placeholderGuidance text to display inside a field.
@patternA regular expression to constrain the value of a field.
@defaultThe default value of a field.
@minThe minimum value for a "number" field only
@maxThe maximum value for a "number" field only
@stepThe allowable value by which the minimum number can increment to the maximum number. (default is '1')

Following are the available options when the value of @type is "text":

  • text – will display a simple input box for text to be entered manually.
    • placeholder – can be used to display a hint in the text box when no value has been specified.
    • pattern – can specify a regular expression that the value must match to be submitted. This can constrain the format or value of the field.

When the value of @type is "select" or "checkbox"the <param> element can have one or more <value> elements for the valid choices.

  • select – displays a simple drop-down list and allows only one value to be selected. The content of each <value> element is displayed as an option in the list.
  • checkbox – displays a check box which has possible values of true or false.
  • date – invokes a date picker interface and stores the value as ISO8601 (yyyy-mm-dd).
  • number – displays a number field which will allow only valid numbers as defined by the @min, @max and @step attributes.

The following options provide additional flexibility for users to select content for processing: 

  • documentversion – drop-down list of all document versions used in the current group.
  • localdocumentversion – drop-down list of document versions in the current document.
  • documentlabel – drop-down list of document labels for the current group.
  • documentstatus – drop-down list of document status values for the current group.
  • fragmentlabel – drop-down list of fragment labels for the current group.

Examples

document-config.xml

Following is an example of the <publishing> element deployed to a document-config.xml file:

<publishing>
    <action type="publish">
    <target name="psml-to-website">
      <description>Publish to website</description>
               </target>
    <target name="psml-to-blog">
      <description>Publish to blog</description>
               </target>
   </action>

    <action type="export">
    <target name="psml-to-pdf-columns"
     perspective="developer">
      <description>Export as PDF in 3 columns</description>

     <param name="depth"
           label="Depth of XRefs to publish"
            type="number"
             min="1"
             max="8" />

     <param name="isbn"
            type="text"
           label="ISBN"
     placeholder="Enter a valid ISBN 13 number (97xxxxxxxxxxx)"
         pattern="97[89][0-9]{10}" />

     <param name="in-stock"
            type="checkbox"
          label="In Stock"
        default="true"
    perspective="developer" />

    <param name="language"
           type="select"
          label="Language"
        default="Spanish">
            <value>English</value>
            <value>French</value>
            <value>Spanish</value>
      </param>

    </target>
  </action>
</publishing>

publish-config.xml

Following is an example of the <publishing> element deployed to a publish-config.xml file:

<publishing>

    <action type="export">
    <source type="document"
       extension="psml" />
    <target name="psml-to-pdf-columns"
     perspective="developer">
      <description>Export as PDF in 3 columns</description>
    </target>  
  </action>

    <action type="publish">
    <source type="folder" />
    <target name="psml-to-website">
     <description>Publish to website</description>
      <param name="depth"
            label="Depth of XRefs to publish"
             type="number"
              min="1"
              max="8" />
       </target>
    </action>

</publishing>

Created on , last edited on