<content>
Summary
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 will be XML. In all other cases, the content will be considered plain text.
Note
PageSeeder does not support binary comments.
Usage context
Permitted content | text or XML |
---|---|
Permitted parent | <comment> |
Attributes
This element has the following attributes.
Name | Type | Required | Description |
---|---|---|---|
type | xs:string | yes | The media type of the content |
@type
This attribute provides the media type of the content.
It follows the syntax below:
top-level type name / [ tree. ] subtype name [ +suffix ]
The media type must not be a binary media type and should not use the "charset" media type parameters as the content will generally be output in utf-8. Most comments in PageSeeder used the "plain/text"
media type. XML Comments must use an XML media type in order for the XML content to be returned unescaped.
e.g.
text/plain
application/html+xml
application/
vnd
.example.movie+xml
When using XML content, application should avoid using the generic application/xml media type should use the "+xml"
suffix
Examples
Plain text content
<content type="plain/text">Hello everyone! Please mind the new lines as they may be important in plain text! </content>
HTML content
<content type="application/html+xml"> <div class="help"></div> </content>
XML content
<content type="application/vnd.example.helloworld+xml"> <greeting>Hello World!</greeting> </content>
Schema
XML Schema
<xs:element name="content" type="content"/> <xs:complexType name="content" mixed="true"> <xs:sequence> <xs:any processContents="skip" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> <xs:attribute name="type" type="content-type" use="required"/> </xs:complexType> <xs:simpleType name="content-type"> <xs:restriction base="mediatype"> <xs:maxLength value="100"/> </xs:restriction> </xs:simpleType> <xs:simpleType name="mediatype"> <xs:restriction base="xs:string"> <!-- This is actually more restrictive than the MIME format --> <xs:pattern value="[a-zA-Z0-9_]+/[-._a-zA-Z0-9]+(\+[-._a-zA-Z0-9]+)?"/> </xs:restriction> </xs:simpleType>
Relax Schema
element content { attribute type { text { maxLength = "100"}}, any }
Compatibility
See also
Created on , last edited on