Web service API

How to use PageSeeder's Web service API

<discussion>

Summary

A discussion or comment thread.

The <discussions> element is a container for a list of <comment> elements that are part of the same discussion thread.

This model for the <discussion> element is used as a base for the <task> element.

Usage context

Permitted content<comment> <locator> <uri>
Permitted parent<discussions>

Attributes

This element defines the following attributes.

NameTypeRequiredDescription
idxs:longyesThe ID of the discussion
lastcommentdatexs:dateTimenoThe date of the last comment
lastcommentidxs:longnoThe ID of the last comment
replycountxs:intnoThe number of replies in the thread
titlexs:stringnoThe title of the discussion (250)

Note

All the discussion attributes are generated from the comments in the discussion. With the exception of the @id attribute, they are susceptible to change every time a new comment (i.e. a reply) is made to the discussion thread.

@id

The PageSeeder database identifier for the discussion. It is always an immutable positive long value that is unique on a specific PageSeeder server within the set all members.

The discussion ID is the same as the ID of the first comment (which initiated the discussion) and is immutable in practice.

@lastcommentdate

The date the last comment was created. This value changes every time a reply is made to the discussion.

@lastcommentid

The ID of the last comment in the discussion. This value changes every time a reply is made to the discussion.

@replycount

This attribute indicates how replies have been made to the discussion which is the same as the total number of comment minus one. This value changes every time a reply is made to the discussion.

@title

The title of the discussion is the title of the last comment in the discussion. It does not usually change but may be modified if a reply has a new title. It is limited to 250 characters.

Examples

Schema

XML Schema

<xs:element name="discussion" type="discussion"/>

<xs:complexType name="discussion">
  <xs:sequence>
    <xs:element name="uri"     type="uri"     minOccurs="0"/>
    <xs:element name="locator" type="locator" minOccurs="0"/>
    <xs:element name="comment" type="comment" minOccurs="0" maxOccur="unbounded"/>
  </xs:sequence>
  <xs:attribute name="id"              type="id" use="required"/>
  <xs:attribute name="lastcommentdate" type="xs:dateTime"/>
  <xs:attribute name="lastcommentid"   type="id"/>
  <xs:attribute name="replycount"      type="xs:int"/>
  <xs:attribute name="title"           type="comment-title"/>
</xs:complexType>

<xs:simpleType name="comment-title">
  <xs:restriction base="xs:string">
    <xs:maxLength value="250"/>
  </xs:restriction>
</xs:simpleType>

Relax Schema

element discussion {
   attribute id              { xs:long },
   attribute lastcommentdate { xs:dateTime }?, 
   attribute lastcommentid   { xs:long }?, 
   attribute replycount      { xs:boolean }?,
   attribute title           {  text { maxLength = "250"} }?,
   uri?
   locator?
}

Compatibility

See also

Created on , last edited on