Skip to main content

 Element reference

Service API elements from <alias> to <workflow>



The text content of a comment.

The <content> element is used as a container for textual content of a comment. 

If the content is XML, that is, if its media type is an XML media type , then the contents of the element are XML. In all other cases, the content is considered plain text.

PageSeeder doesn't support binary comments.

Usage context

Permitted contenttext or XML
Permitted parent<comment>


This element has the following attributes.

typexs:stringyesThe media type of the content


This attribute provides the media type of the content.

It follows the following syntax:

top-level type name / [ tree. ] subtype name [ +suffix ]

The media type must not be a binary media type and is not to use the “charset” media type parameters as the content is generally output in utf-8. Most comments in PageSeeder use the text/plain media type. XML comments must use an XML media type in order for the XML content to be returned unescaped.

For example:

  • text/plain
  • application/html+xml
  • application/

When using XML content, it's recommended that apps avoid using the generic application/xml media type and use the +xml suffix instead.


Plain text content

This is the default on PageSeeder.

<content type="text/plain">Hello everyone!

Please mind the new lines as they may be important in plain text!

HTML content

<content type="application/html+xml">
  <div class="help"></div>

XML content

<content type="application/vnd.example.helloworld+xml">
  <greeting>Hello World!</greeting>


XML Schema

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

<xs:complexType name="content" mixed="true">
    <xs:any processContents="skip" minOccurs="0" maxOccurs="unbounded"/>
  <xs:attribute name="type" type="content-type" use="required"/>

<xs:simpleType name="content-type">
  <xs:restriction base="mediatype">
    <xs:maxLength value="100"/>

<xs:simpleType name="mediatype">
  <xs:restriction base="xs:string">
    <!-- This is actually more restrictive than the MIME format -->

Relax Schema

element content {
   attribute type { text { maxLength = "100"}},


No change since initial API release.

Created on , last edited on