Skip to main content

 PSML

A complete reference of PageSeeder's markup language PSML

<publication>

Summary

The <publication> element is only used on the root document of a publication and can be used to create a publication when uploading documents.

The only attributes used by the upload are the following:

  • @id
  • @type

An existing publication ID/type is only overwritten if “overwrite properties” is selected under the Developer options on Upload.

If the uploaded publication ID is already used by another document, overwrite properties is selected and the user has contributor access to the other document, then the publication ID is moved to the uploaded document.

See Publications and publication types for more details.

Usage context

Element category
PSML levelportable
Permitted contentnone
Permitted parent<documentinfo>
HTML equivalent
OpenXML equivalent

Attributes

This element includes the following attributes:

NameTypeRequiredDescription
defaultgroupidxs:longnoThe ID of the publication’s default group
hostidxs:longnoThe ID of the publication’s host
idpublication-idyesThe ID of the publication
rooturiidxs:longnoThe URI ID of the publication’s root document
titlexs:stringnoThe title of the publication’s root document
typepublication-typenoThe publication type

@defaultgroupid

The ID of the publication’s default group. INFORMATIONAL - ignored by upload.

@hostid

The ID of the publication’s host. INFORMATIONAL - ignored by upload.

@id

The user defined ID of the publication – it can only contain letters, numbers, underscore and hyphen.

@rooturiid

The URI ID of the publication’s root document. INFORMATIONAL - ignored by upload.

@title

The title of the publication’s root document. INFORMATIONAL - ignored by upload.

@type

The publication type – it can only contain letters, numbers and underscores.

Examples

Example 1: New publication

When the intent is to create a new publication, specifying the following is sufficient:

<publication id="mypub1" type="report" />

On upload, it creates a new publication using the document as the root. The publication ID is “mypub1” and the publication type is "report."

Example 2: Existing publication

When a publication already exists, the publication element is included in the <documentinfo> element of the root element of the publication. It includes attributes that provide system-specific information about the publication. These additional attributes are ignored by upload.

<publication defaultgroupid="678"
             hostid="1" 
             id="install"
             rooturiid="2345" 
             title="Installation"
             type="default" />

In the preceding example, the URI ID of the document is “2345” and its title "Installation" and matches the values of the <uri> element.

<documentinfo>
  <uri id="2345" title="Installation" ...> ... </uri>
  <publication rooturiid="2345" title="Installation" ... />
  ...
</documentinfo>

Schema

XML Schema

<xs:element name="publication">
  <xs:complexType>
    <xs:attribute name="id" type="publication-id" use="required"/>
    <xs:attribute name="type"           type="publication-type"/>
    <xs:attribute name="hostid"         type="xs:long"/>
    <xs:attribute name="rooturiid"      type="xs:long"/>
    <xs:attribute name="title"          type="xs:string"/>
    <xs:attribute name="defaultgroupid" type="xs:long"/>
  </xs:complexType>
</xs:element>

Compatibility

This element was introduced in the v1.0 of PSML and is supported from PageSeeder 5.97.

Created on , last edited on