1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
|
<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:annotation>
<xsd:documentation xml:lang="en">
<![CDATA[
This is the XSD schema of a Kopete message in XML form. This is both the
format that the XSL stylesheets will expect, as well as the format that
results from saving the chatwindow contents. This is *not* the same as
the format of the history plugin.
The XML format has one other little quirk - you can pass flags into the
engine as XML processing instructions. For example, if you add this
instruction to your document:
<?Kopete Flag:TransformAllMessages>
... it will instruct the Kopete XSL engine that you want the entire contents
of the chat window to be re-drawn each time a new message is appended. This
is not the normal procedure, and is only required for special situations
(see the Adium style for an example).
TransformAllMessages is the only flag currently defined.
]]>
</xsd:documentation>
</xsd:annotation>
<!-- This is defined if we save a chat with multiple messages -->
<xsd:element name="document">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="message" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<!-- The main message element -->
<xsd:element name="message">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="from" type="metaContact" minOccurs="0" maxOccurs="1"/>
<xsd:element name="to" type="metaContact" minOccurs="0" maxOccurs="1"/>
<xsd:element name="body" type="messageBody" minOccurs="1" maxOccurs="1"/>
</xsd:sequence>
<!-- The time only. eg 12:00 pm -->
<xsd:attribute name="time" type="xsd:string" use="required"/>
<!-- Full timestamp. eg Tue Feb 8 19:04:49 AST 2005 -->
<xsd:attribute name="timestamp" type="xsd:string" use="required"/>
<!-- Formatted timestamp. eg 12:00:57 pm -->
<xsd:attribute name="formattedTimestamp" type="xsd:string" use="required"/>
<!-- Message subject. Used by Jabber Email. -->
<xsd:attribute name="subject" type="xsd:string" use="required"/>
<!-- Message direction (Inbound, Outbound, Internal).
This is deprecated. Use @type and @route -->
<xsd:attribute name="direction" type="direction" use="required"/>
<!-- Message route (inbound, outbound, internal).-->
<xsd:attribute name="route" type="route" use="required"/>
<!-- Message type (normal, action).-->
<xsd:attribute name="type" type="type" use="required"/>
<!-- Message importance.-->
<xsd:attribute name="importance" type="importance" use="required"/>
<!-- This is the main contact Id - the other person in the
converation besides you. If it is a group chat, it is the first
person who was being spoken to, or the group chat name. -->
<xsd:attribute name="mainContactId" type="xsd:string" use="optional"/>
</xsd:complexType>
</xsd:element>
<!-- Enumeration for message direction
(this is deprecated - use the route/type) -->
<xsd:simpleType name="direction">
<xsd:restriction base="xsd:integer">
<xsd:enumeration value="0"/> <!-- Inbound -->
<xsd:enumeration value="1"/> <!-- Outbound -->
<xsd:enumeration value="2"/> <!-- Internal -->
<xsd:enumeration value="3"/> <!-- Action -->
</xsd:restriction>
</xsd:simpleType>
<!-- Enumeration for message route -->
<xsd:simpleType name="route">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="inbound"/>
<xsd:enumeration value="outbound"/>
<xsd:enumeration value="internal"/>
</xsd:restriction>
</xsd:simpleType>
<!-- Enumeration for message type -->
<xsd:simpleType name="type">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="normal"/>
<xsd:enumeration value="action"/>
</xsd:restriction>
</xsd:simpleType>
<!-- Enumeration for message importance -->
<xsd:simpleType name="importance">
<xsd:restriction base="xsd:integer">
<xsd:enumeration value="0"/> <!-- Low -->
<xsd:enumeration value="1"/> <!-- Normal -->
<xsd:enumeration value="2"/> <!-- Highlight -->
</xsd:restriction>
</xsd:simpleType>
<!-- Enumeration for bidi direction -->
<xsd:simpleType name="bidiDirection">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="ltr"/>
<xsd:enumeration value="rtl"/>
</xsd:restriction>
</xsd:simpleType>
<!-- Element for display names -->
<xsd:complexType name="displayName">
<!-- The direction of the name, for Bidi suport. -->
<xsd:attribute name="dir" type="bidiDirection"/>
<!-- The actual name text -->
<xsd:attribute name="text" type="xsd:string"/>
</xsd:complexType>
<!-- The contact element -->
<xsd:complexType name="metaContact">
<xsd:sequence>
<xsd:element name="contact">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="contactDisplayName" type="displayName" minOccurs="1" maxOccurs="1"/>
<xsd:element name="metaContactDisplayName" type="displayName" minOccurs="1" maxOccurs="1"/>
</xsd:sequence>
<!-- The contact's id -->
<xsd:attribute name="contactId" type="xsd:string" use="required"/>
<!-- The contact's custom color -->
<xsd:attribute name="color" type="xsd:string" use="required"/>
<!-- The contact's photo. This file name only remains valid
while the message is in transit -->
<xsd:attribute name="userPhoto" type="xsd:string" use="optional"/>
<!-- The contact's protocol icon -->
<xsd:attribute name="protocolIcon" type="xsd:string" use="required"/>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<!-- The message body element -->
<xsd:complexType name="messageBody">
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<!-- The foreground color of the message -->
<xsd:attribute name="color" type="xsd:string" use="optional"/>
<!-- The background color of the message -->
<xsd:attribute name="bgcolor" type="xsd:string" use="optional"/>
<!-- The font of the message. This is a CSS string
describing the font-family, font-size, text-decoration,
and font-weight -->
<xsd:attribute name="font" type="xsd:string" use="optional"/>
<!-- The direction of the message, for Bidi suport. -->
<xsd:attribute name="dir" type="bidiDirection" use="required"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
</xsd:schema>
|