wiki:Development/Styles/LogFileFormat

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:


away-message

An away message of the user of the Colloquy client. The text content of the element describes the away message.

Content Model

away-message ::= CDATA

Parents

These elements contain away-message: event.

Example

<away-message>food</away-message>

ban

A ban set in the chat room. The text content of the element describes the banned hostname.

Content Model

ban ::= CDATA

Parents

These elements contain ban: event.

Example

<ban>BillGates!*@*</ban

by

The active person of an event. The text content of the element is the nickname of the person.

Content Model

by ::= CDATA

Attributes

class
The user mode of the person in the chat room. This could be administrator, founder, half operator, operator, server operator or voice. This attribute is optional.
hostmask
The hostmask of the person.
identifier
The username of the person.
self
yes if the person is the user of this Colloquy client. This attribute is optional.

Parents

These elements contain by: event.

Example

<by identifier="chanserv">ChanServ</by>

envelope

An envelope contains consecutive messages of the same sender.

Content Model

envelope ::= sender,message+

Attributes

ignored
Contains "yes" if you ignored the sender. This attribute is optional.

Parents

These elements contain envelope: log.

Example

<envelope>
  <sender hostmask="nonex@xx.yy.net" class="operator">nonex</sender>
  <message received="2003-10-25 13:28:40 -0400">not a whole lot <span class="emoticon smile"><samp>:)</samp></span></message>
  <message received="2003-10-25 13:28:52 -0400">just surfing the internet.</message>
  <message received="2003-10-25 13:28:54 -0400">seen <a href="http://www.apple.com">http://www.apple.com</a> today?</message>
</envelope>

event

An irc event, like joining the chat room or changing the topic. Consult the list of event types for more detailed information. The message child of the event element describes the event.

Content Model

event ::= message,(((old)?,who,reason)|(by,topic))

The precise content model depends on the type of event.

Attributes

id
A unique identification number of the event.
name
The type of event. One of this list of event types.
occurred
The full date and time when the event has happened.

Parents

These elements contain event: log.

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>
  <who hostmask="nonex@xx.yy.net">nonex</who>
</event>

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 in XHTML format.

Content Model

message ::= (<XHTML element>|CDATA)*

Attributes

action
yes if the message is an action. The attribute is not present if it's a normal message.
highlight
yes if the message contains a highlight word of the user. Otherwise the attribute is not present.
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.
type
notice if the message is a notice. Otherwise, the attribute is not present.

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>

old

Identifies the old nickname of a person before a nickchange. The text content of the element is the old nickname.

Content Model

old ::= CDATA

Parents

These elements contain old: event.

Example

<old>nonex__</old>

reason

The reason of an event. The text content of the element describes the reason (but this could be empty).

Content Model

reason ::= CDATA

Parents

These elements contain reason: event.

Example

<reason>Read error: 104 (Connection reset by peer)</reason>

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

buddy
The sender is a buddy of you and this attribute's value is the unique identifier of the buddy. This attribute is optional.
class
The user mode of the sender in the chat room. This could be administrator, founder, half operator, operator, server 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.
nickname
The nickname of the sender of the message, if it's different from the display name. 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>

topic

The topic of a topicChanged event. The text content of the element describes the topic.

Content Model

topic ::= CDATA

Parents

These elements contain topic: event.

Example

<topic>Colloquy | 7/9 Beta (3315)</topic>

who

Identifies the originator of an event. This is not always the same as the sender of the event. The text content of the element is the nickname of the person.

Content Model

who ::= CDATA

Attributes

hostmask
The hostmask of the person.
class
The status of the person in the chat room. This could be administrator, founder, half operator, operator, server operator or voice. This attribute is optional.
self
yes if the person is the user of this Colloquy client. This attribute is optional.

Parents

These elements contain who: event.

Example

<who hostmask="nonex@xx.yy.net" class="operator">nonex</who>
Last modified 11 years ago Last modified on Aug 21, 2006 11:16:18 AM