Web service API

How to use PageSeeder's Web service API

<context>

Summary

Indicate the context of the comment, that is the group, document or URL where the comment was posted.

The <context> element wraps a single <uri> or <group> element to indicate whether the comment was posted against a document/URL or group.

Usage context

Permitted content<group> <uri>
Permitted parent<comment>

Attributes

This element includes the following attributes.

NameTypeRequiredDescription
fragmentxs:stringnoThe fragment of the context if it is a document fragment

@fragment

This optional attribute is only provided when the comment was posted against a document fragment. This attribute is not specified if the comment was posted against a group or an entire document.

Examples

Group comment

The comment has been posted as a general comment in a group.

<context>
   <group id="99" name="example-general" 
  description="General discussions at Example" 
   owner="Example" access="member" common="false"/>
</context>

Document comment

The comment has been posted against the entire document.

<context>
   <uri id="197142" scheme="https" host="example.com" port="443" 
        path="/ps/example/test/attachments/2016/07/Albatross_Facts.pdf" 
 decodedpath="/ps/dev/ps/attachments/2016/07/Albatross_Facts.pdf" 
    external="false" mediatype="application/pdf" 
     created="2016-07-22T15:04:43+10:00"
    modified="2016-07-22T15:04:43+10:00"
        size="1136435">
      <displaytitle>Albatross_Facts.pdf</displaytitle>
   </uri>
</context>

Fragment comment

The comment has been posted against a specific fragment of a document.

<context fragment="habitat">
   <uri id="197142" scheme="https" host="example.com" port="443" 
        path="/ps/example/test/attachments/2016/07/Albatross_Facts.pdf" 
 decodedpath="/ps/dev/ps/attachments/2016/07/Albatross_Facts.pdf" 
    external="false" mediatype="application/pdf" 
     created="2016-07-22T15:04:43+10:00"
    modified="2016-07-22T15:04:43+10:00"
        size="1136435">
      <displaytitle>Albatross_Facts.pdf</displaytitle>
   </uri>
</context>

Schema

XML Schema

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

<xs:complexType name="context">
  <xs:choice>
    <xs:element name="group" type="group-core"/>
    <xs:element name="uri"   type="uri"/>
  </xs:choice>
  <xs:attribute name="fragment" type="fragment-id"/>
</xs:complexType>

<xs:simpleType name="fragment-id">
  <xs:restriction base="xs:string">
    <xs:pattern value="[a-zA-Z0-9_\-\.]+"/>
  </xs:restriction>
</xs:simpleType>

Relax Schema

element attachment {
   attribute fragment { text }?,
   uri | group
}

Compatibility

See also

Created on , last edited on