<discussion>
Summary
A discussion or comment thread.
The <discussion> 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>, <group>, <locator>, <uri> |
|---|---|
| Permitted parent | <discussions> |
Attributes
This element defines the following attributes:
| Name | Type | Required | Description |
|---|---|---|---|
| id | xs:long | yes | The ID of the discussion |
| lastcommentdate | xs:dateTime | no | The date of the last comment |
| lastcommentid | xs:long | no | The ID of the last comment |
| replycount | xs:int | no | The number of replies in the thread |
| title | xs:string | no | The title of the discussion (250) |
@id attribute, they are susceptible to change every time a new comment (in other words, 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 many replies have been made to the discussion, which is the same as the total number of comments 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 can 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:choice minOccurs="0">
<xs:element name="group" type="group-basic" />
<xs:sequence>
<xs:element name="uri" type="uri" />
<xs:element name="locator" type="locator" minOccurs="0" />
</xs:sequence>
</xs:choice>
<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"} }?,
group?
uri?
locator?
comment*
}
Compatibility
No change since initial API release.