Configuration

Configuration manual for PageSeeder

PSML document publishing

This article describes how the <publishing> element can be modified to provide custom processing for different types of documents.

<publishing> is valid in the following two places:

  • document-config.xml – it is under the <document-config> element and controls processing for a specific document type. This file can be seen by selecting the Document config page located 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. This file can be viewed by selecting the Project files page located under the Dev tab in the Developer perspective and going to the template/[project]/Publish folder.

It follows the structure below:

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

Note

When editing these config files in PageSeeder pressing ctrl-space will display autocomplete options to make editing easier.

Behavior

Typically PageSeeder is configured to extends the default values. This allows the publish actions to be added to the base actions. To select this option, add @override="true" to the <publishing> element.

If the <publishing> element is not specified or the document-config.xml doesn't exist, then the publishing options are automatically inherited from the default config.

Details

 Each <action> should define:

AttributeDescription
typethe type of action – import|export|publish|process or upload|upload-preview which can only be used in publish-config.xml (required)

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

The <source> element can define:

AttributeDescription
typeThe type of source object – group|folder|document (required)
extensionThe filename extension of the source - only applies to document

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

Each <target> defines:

AttributeDescription
nameThe name of the target - must match target name in Ant script (required)
perspectiveWhich perspective the target will be displayed in – standard|developer|lab (default standard)
roleThe minimal role required to run the process – contributor|manager|approver

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

Each <param> element can define:

AttributeDescription
nameThe name of the parameter (required)
labelDisplayed next to the field (required)
typeOne of text|select|checkbox|date|number|
documentversion
|documentlabel|documentstatus|fragmentlabel (default text)
perspectiveThe target will be displayed in this perspective
placeholderGuidance text displayed inside field.
patternA regular expression the field value must match in order to be valid.
defaultThe default value
minThe minimum value for a "number" field only
maxThe maximum value for a "number" field only
stepThe increment between valid numbers for a "number" field only (default is '1')

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

  • 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.
  • select – displays a simple drop-down list and allows only one value to be selected. <value> elements under <param> represent the list of options. 
  • checkbox – displays a check box which has possible values of true or false
  • date – displays a date picker interface and stores the value as ISO8601 (yyyy-mm-dd).
  • number – displays a number box which will allow only valid numbers as defined by the @min, @max and @step attributes.
  • documentversion – drop-down list of  all document versions used in the current group.
  • 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

Below is an example extracted from 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>

Below is an example from 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