wiki:Development/Styles/LogFileFormat

Version 1 (modified by rinoa, 13 years ago) (diff)

adding the LogFileFormat page

TracNav(Development)? This is part of the Development Documentation Project, please help document Colloquy if you know anything that would be relevant here for other users to know about.

The Colloquy Transcript file format

This page documents the XML file format for the Colloquy Transcripts. The XML files with the irc messages Colloquy receives, get fed into your style's XSL stylesheet. If you want to create your own custom XSL stylesheet in your Colloquy style, you should know what input you could expect for the XSL stylesheet. That's what this page is about: how do the transcript files look like?

Hence, a list of the elements in a Transcript file:

envelope

An envelope contains consecutive messages of the same sender.

Content Model

envelope
sender,message+

Attributes

none

Parents

These elements contain envelope: log.


event

An irc event, like joining the chat room or changing the topic.

Content Model

event
message,((old)?,who|(by,topic))

Attributes

id
A unique identification number of the event.
name
The type of event. One of banRemoved, demotedFromFounder, demotedFromHalfOperator, demotedFromOperator, dequieted, devoiced, kicked, memberBanned, memberDemotedFromFounder, memberDemotedFromHalfOperator, memberDemotedFromOperator, memberDequieted, memberDevoiced, memberJoined, memberKicked, memberNewNickname, memberParted, memberPromotedToFounder, memberPromotedToHalfOperator, memberPromotedToOperator, memberQuieted, memberVoiced, modeChange, newNickName, promotedToFounder, promotedToHalfOperator, promotedToOperator, quieted, rejoined, topicChanged, voiced
occurred
The full date and time when the event has happened.

Example

<event id="SAUB4LX7RT" name="memberJoined" occurred="2006-08-02 18:00:57 +0200"><message><span class="member">nonex</span> joined the chat room.</message>

log

The root element of the Transcript file. It contains events and envelopes of messages.

Content Model

log
(envelope|event)+

Attributes

began
The full date and time of the beginning of the transcript.
source
The source of the transcript, including server and channel name or nickname (for a public and private chat, respectively).

Example

<log began="2006-08-02 10:01:25 +0200" source="irc://irc.freenode.net/%23colloquy">
  ...
</log>

message

Contains a text message of a irc user.

Content Model

message
(span|CDATA)*

Attributes

id
A unique identification number of the message. Only needed when the message is the child of an envelope element.
received
The full date and time when the message has been received. Only needed when the message is the child of an envelope element.

Parents

These elements contain message: event, envelope.

Examples

<message><span class="member">nonex</span> joined the chat room.</message>
<message id="IR966FRVQT" received="2006-08-02 13:38:03 +0200"><span class="emoticon smile"><samp>:)</samp></span></message>

sender

Identifies the sender of an envelope of messages. The text content of the element is the nickname of the sender.

Content Model

sender
CDATA

Attributes

class
The status of the sender in the chat room. This could be operator or voice. This attribute is optional.
hostmask
The hostmask of the sender of the message.
identifier
The username of the sender of the message. This attribute is optional.
self
yes if the sender is the user of this Colloquy client. This attribute is optional.

Parents

These elements contain sender: envelope.

Examples

<sender self="yes" hostmask="koan@xxx.xxx.xxx.xxx">koan</sender>
<sender hostmask="nitewalka@xx.yy.com" identifier="nitewalka" class="voice">nitewalka</sender>
<sender hostmask="nonex@xx.yy.net" class="operator">nonex</sender>