-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathxep-0171.xml
515 lines (503 loc) · 27.2 KB
/
xep-0171.xml
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
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE xep SYSTEM 'xep.dtd' [
<!ENTITY % ents SYSTEM 'xep.ent'>
%ents;
]>
<?xml-stylesheet type='text/xsl' href='xep.xsl'?>
<xep>
<header>
<title>Language Translation</title>
<abstract>This specification defines an XMPP protocol extension for providing language translation facilities over XMPP. It supports human, machine, client-based, and server-based translations.</abstract>
&LEGALNOTICE;
<number>0171</number>
<status>Draft</status>
<type>Standards Track</type>
<sig>Standards</sig>
<approver>Council</approver>
<dependencies>
<spec>XMPP Core</spec>
<spec>XMPP IM</spec>
<spec>XEP-0030</spec>
</dependencies>
<supersedes/>
<supersededby/>
<shortname>langtrans</shortname>
<schemaloc>
<ns>langtrans</ns>
<url>http://www.xmpp.org/schemas/langtrans.xsd</url>
</schemaloc>
<schemaloc>
<ns>langtrans:items</ns>
<url>http://www.xmpp.org/schemas/langtrans-items.xsd</url>
</schemaloc>
<author>
<firstname>Boyd</firstname>
<surname>Fletcher</surname>
<email>boyd.fletcher@us.army.mil</email>
</author>
<author>
<firstname>Daniel</firstname>
<surname>LaPrade</surname>
<email>dlaprade@echostorm.net</email>
</author>
<author>
<firstname>Keith</firstname>
<surname>Lirette</surname>
<email>keith.lirette@tridsys.com</email>
</author>
<author>
<firstname>Brian</firstname>
<surname>Raymond</surname>
<email>braymond@echostorm.net</email>
</author>
<revision>
<version>1.1.1</version>
<date>2015-10-15</date>
<initials>XEP Editor (mam)</initials>
<remark><p>Corrected XML schema to note a number of constructs are optional not required (Christian Schudt).</p></remark>
</revision>
<revision>
<version>1.1</version>
<date>2011-06-15</date>
<initials>psa</initials>
<remark><p>With author approval, the XMPP Registrar changed the items namespace from urn:xmpp:langtrans#items to urn:xmpp:langtrans:items because # is not recommended in URN syntax.</p></remark>
</revision>
<revision>
<version>1.0</version>
<date>2008-05-09</date>
<initials>psa</initials>
<remark><p>Per a vote of the XMPP Council, advanced status to Draft.</p></remark>
</revision>
<revision>
<version>0.3</version>
<date>2008-02-01</date>
<initials>kl/bf</initials>
<remark><p>Modified semantics to use IQ stanzas for communication with servers; changed dst_lang to destination_lang and src_lang to source_lang; changed destination to destination_lang and derived_from to source_lang.</p></remark>
</revision>
<revision>
<version>0.2</version>
<date>2006-04-24</date>
<initials>psa</initials>
<remark><p>Added text about use of Thread IDs.</p></remark>
</revision>
<revision>
<version>0.1</version>
<date>2006-01-24</date>
<initials>psa</initials>
<remark><p>Initial version.</p></remark>
</revision>
<revision>
<version>0.0.4</version>
<date>2006-01-17</date>
<initials>psa</initials>
<remark><p>Converted to XML format, cleaned up text, modified examples, changed pivotable and reviewed attributes to xs:boolean, corrected schema.</p></remark>
</revision>
<revision>
<version>0.0.3</version>
<date>2006-01-16</date>
<initials>bf</initials>
<remark><p>Changed xml:lang to destination, derived to derived_from; added service discovery identity.</p></remark>
</revision>
<revision>
<version>0.0.2</version>
<date>2005-12-28</date>
<initials>bf</initials>
<remark><p>Miscellaneous edits.</p></remark>
</revision>
<revision>
<version>0.0.1</version>
<date>2005-12-21</date>
<initials>bf</initials>
<remark><p>First draft.</p></remark>
</revision>
</header>
<section1 topic='Introduction' anchor='intro'>
<p>There currently exists no standard for describing language translations over a text chat protocol. While numerous products and services exist to provide translation of text, there exists no standardized protocol extension for requesting a translation and expressing the details of the translation over XMPP (see &xmppcore;). This document describes how to express a translation and its components in an XMPP message as well as a method to request translation.</p>
<p>Direct translation can be realized by either client-side translation before sending or transparent components translating messages on the fly. Discovering XMPP entities capable of translation allows for clients to request translation from them based on their capabilities. The remote XMPP entity could be either an automated translation service or a human providing translation.</p>
</section1>
<section1 topic='Glossary' anchor='glossary'>
<dl>
<di><dt>Original Text</dt><dd>This is the message text that was originally created by the sender. This is the text that is translated.</dd></di>
<di><dt>Translated Text</dt><dd>This is the message text that has been translated by the language translation engines. This also called the destination text. For any given message there can be multiple destination text message bodies.</dd></di>
<di><dt>Pivot Language</dt><dd>Pivoting is the process of using one or more intermediate languages to translate from a given source language to a specific destination language. For example, if you needed to translate from English to Russian but only had translators that went from English to French and French to Russian then you could use French as a pivot language.</dd></di>
<di><dt>Pivot Text</dt><dd>This is the translated text of the original message in a pivot language. For any given destination language, there can be zero or more pivot text bodies. The ordering of pivoting is required to be specified for the destination language.</dd></di>
<di><dt>Language Translation Engine</dt><dd>Since not all language translation engines are the same quality it is important to some classes of users that they know what translation engine was used. It is equally important to also be able to select a specific translation engine for a given language pairing if more than one engine is available.</dd></di>
<di><dt>Language Translation Character Set</dt><dd>Some language translation engines can only translate text between languages if certain character sets (or code pages) are used.</dd></di>
<di><dt>Language Translation Dictionary</dt><dd> In order to enhance the accuracy of translation engines most support the concept of mission specific dictionaries.</dd></di>
</dl>
</section1>
<section1 topic='Requirements' anchor='reqs'>
<p>The protocol defined herein addresses the following requirements:</p>
<ol>
<li><p>Enable an XMPP entity to request a translation from a remote XMPP entity.</p></li>
<li>
<p>Enable an XMPP entity to express the following mandatory elements of a translation for any receiving entities.</p>
<ol style='list-style-type: lower-alpha'>
<li>Identification of Original Text</li>
<li>Identification of Translated Text</li>
<li>Identification of any Pivot Language(s) and Text</li>
<li>Identification of the method and order of translation</li>
</ol>
</li>
<li>
<p>Enable an XMPP entity to express the following optional elements of a translation for any receiving entities.</p>
<ol style='list-style-type: lower-alpha'>
<li>Identification of Language Translation Engines used.</li>
<li>Identification of Location of the translation.</li>
<li>Identification of Sender and Destination language of choice.</li>
<li>Discovery of Server support for translation including which language pair, dictionaries, and engines are available.</li>
<li>Identification of desire to text to be translated or not to be translated.</li>
</ol>
</li>
</ol>
<p>The following methods of translation are supported:</p>
<ol>
<li>Manual or Human</li>
<li>Machine or Automated</li>
<li>Machine with Human Review</li>
</ol>
</section1>
<section1 topic='Use Cases' anchor='usecases'>
<p>The following use cases illustrate simple scenarios for translation of expressions as well as requesting a translation from remote entities.</p>
<section2 topic='Message Delivery' anchor='delivery'>
<p>A message directly translated by the originating XMPP entity or a transparent XMPP entity delivered to a remote entity with only the required elements of source and destination language; this is the simplest case for a translation from one language to another. The source language is known because there is no <translation/> tag describing it. Three translation methods are supported by doing the following:</p>
<ol>
<li>If no 'engine' attribute is present, then manual (or human) translation was performed.</li>
<li>If an 'engine' attribute is present then machine (or automated) translation was performed, where the translation engine is identified by the value of the 'engine' attribute. If the 'engine' attribute is present its value is an empty string, then the name of the translation engine was not available.</li>
<li>If the 'engine' attribute and the 'reviewed' attribute are present, then machine translation was performed but the message text was reviewed and possibly modified by a human.</li>
</ol>
<section3 topic='Direct Translation' anchor='message-direct'>
<example caption='Entity sends a message translated from English to French'><![CDATA[
<message xml:lang='en' from='bard@shakespeare.lit/globe' to='playwright@marlowe.lit/theatre'>
<subject xml:lang='en'>Hello</subject>
<subject xml:lang='fr'>Bonjour</subject>
<body xml:lang='en'>How are you?</body>
<body xml:lang='fr'>comment allez-vous?</body>
<x xmlns='urn:xmpp:langtrans'>
<translation destination_lang='fr' source_lang='en'/>
</x>
</message>
]]></example>
</section3>
<section3 topic='Translation With Pivot' anchor='message-pivot'>
<p>A message translated by the originating XMPP entity or a transparent XMPP entity delivered to a remote entity with the pivot languages used to accomplish the translation. The source language is known because there is no <x/> translation tag describing it. When a translation is done via a pivot language, the pivot languages and their order of use MUST be specified.</p>
<example caption='Entity sends a message translated from French to Russian via English using human translators'><![CDATA[
<message xml:lang='fr' from='bard@shakespeare.lit/globe' to='playwright@marlowe.lit/theatre'>
<subject xml:lang='fr'>Bonjour</subject>
<subject xml:lang='en'>Hello</subject>
<subject xml:lang='ru'>x443;лте</subject>
<body xml:lang='fr'>comment allez-vous?</body>
<body xml:lang='en'>How are you?</body>
<body xml:lang='ru'>Как вы?</body>
<x xmlns='urn:xmpp:langtrans'>
<translation destination_lang='en' source_lang='fr'/>
<translation destination_lang='ru' source_lang='en'/>
</x>
</message>
]]></example>
</section3>
<section3 topic='Translation With Pivot Specifying Details' anchor='message-pivot-details'>
<p>A message translated by the originating XMPP entity or a transparent XMPP entity delivered to a remote entity using pivot languages and machine translation. The source language is known because there is no &X; translation tag describing it.</p>
<example caption='Entity sends a message translated from French to Russian via English using a machine translation engine.'><![CDATA[
<message xml:lang='fr' from='bard@shakespeare.lit/globe' to='playwright@marlowe.lit/theatre'>
<subject xml:lang='fr'>Bonjour</subject>
<subject xml:lang='en'>Hello</subject>
<subject xml:lang='ru'>x443;лте</subject>
<body xml:lang='fr'>comment allez-vous?</body>
<body xml:lang='en'>How are you?</body>
<body xml:lang='ru'>Как вы?</body>
<x xmlns='urn:xmpp:langtrans'>
<translation destination_lang='en' engine='SYSTRANS' source_lang='fr'/>
<translation destination_lang='ru' engine='SYSTRANS' source_lang='en'/>
</x>
</message>
]]></example>
</section3>
</section2>
<section2 topic='Discovering Translation Providers' anchor='disco'>
<section3 topic='Discovering Translation Providers On a Server' anchor='disco-items'>
<p>When connected to a server, a XMPP entity can locate translation providers by asking a server which translation providers are attached to the server; this MUST be done using &xep0030;. The server SHOULD return the availability of of translation providers and language pairings for which the user has rights to use.</p>
<example caption='Entity sends discovery request to server'><![CDATA[
<iq type='get' id='disco1' to='shakespeare.lit'>
<query xmlns='http://jabber.org/protocol/disco#items'/>
</iq>
]]></example>
<example caption='Server returns items, including translation providers'><![CDATA[
<iq type='result' id='disco1' from='shakespeare.lit' to='bard@shakespeare.lit/globe'>
<query xmlns='http://jabber.org/protocol/disco#items'>
...
<item jid='towerofbabel@shakespeare.lit'
name='Tower of Babel Translation Bot'/>
<item jid='translation.shakespeare.lit'
name='Translation Provider Service'/>
...
</query>
</iq>
]]></example>
</section3>
<section3 topic='Discovering Identity of Providers' anchor='disco-identity'>
<p>Service Discovery is used to determine if a JID provides translation services. The JID can also be a bot (e.g., <towerofbabel@shakespeare.lit>) or a server component (e.g., <translation.shakespeare.lit>).</p>
<example caption='Entity queries service regarding identity'><![CDATA[
<iq type='get' to='translation.shakespeare.lit' from='bard@shakespeare.lit/globe'>
<query xmlns='http://jabber.org/protocol/disco#info'/>
</iq>
]]></example>
<example caption='Service reports identity'><![CDATA[
<iq type='result' to='bard@shakespeare.lit/globe' from='translation.shakespeare.lit'>
<query xmlns='http://jabber.org/protocol/disco#info'>
...
<identity category='automation' type='translation'/>
<feature var='urn:xmpp:langtrans'/>
...
</query>
</iq>
]]></example>
</section3>
<section3 topic='Discovering Language Support' anchor='disco-lang'>
<p>The supported languages and other details for the service must be known to use it. It is permissible for a translation service to provide multiple translation engines for the same language pairing -- if this is done, then a separate <item/> tag MUST be used for each pairing. A 'dictionary' attribute MAY be used to specify the dictionary for a specific <item/>. In order to specify more than one dictionary for a given language pairing then a separate <item/> tag MUST be used for each dictionary specification for that language pairing.</p>
<example caption='Entity queries service for further information'><![CDATA[
<iq type='get' to='translation.shakespeare.lit' from='bard@shakespeare.lit/globe'>
<query xmlns='urn:xmpp:langtrans:items'/>
</iq>
]]></example>
<example caption='Service replies with language details'><![CDATA[
<iq type='result' to='bard@shakespeare.lit/globe' from=' translation.shakespeare.lit'>
<query xmlns='urn:xmpp:langtrans:items'>
<item source_lang='en' jid='translation.shakespeare.lit' destination_lang='fr'
engine='SYSTRANS 2005 Release 2' pivotable='true'/>
<item source_lang='en' jid='translation.shakespeare.lit' destination_lang='ko'
engine='SYSTRANS 2005 Release 2' pivotable='true'/>
<item source_lang='en' jid='translation.shakespeare.lit' destination_lang='ru'
engine='SYSTRANS 2005 Release 2' pivotable='true'/>
<item source_lang='en' jid='translation.shakespeare.lit' destination_lang='ru'
engine='SYSTRANS 2005 Release 2' pivotable='true' dictionary='medical'/>
<item source_lang='fr' jid='translation.shakespeare.lit' destination_lang='en'
engine='SYSTRANS 2005 Release 2' pivotable='true' dictionary='standard'/>
<item source_lang='ru' jid='translation.shakespeare.lit' destination_lang='en'
engine='SYSTRANS 2005 Release 2' pivotable='true' dictionary='Medical 1.0'/>
<item source_lang='ko' jid='translation.shakespeare.lit' destination_lang='en'
engine='SYSTRANS 2005 Release 2' pivotable='true'/>
</query>
</iq>
]]></example>
</section3>
</section2>
<section2 topic='Requesting a Translation from a Service' anchor='request'>
<section3 topic='Requesting a Basic Translation' anchor='request-basic'>
<p>To request service from a translation provider you can send a message to a provider requesting translations. The lack of a 'source_lang' attribute in the <translation/> element indicates a request for a translation.</p>
<example caption='Entity requests a translation from English to French'><![CDATA[
<iq from='bard@shakespeare.lt/globe' id='translationReq_2' to='translation.shakespeare.lit' type='get'>
<x xmlns='urn:xmpp:langtrans'>
<source xml:lang='en'>How are you?</source>
<translation destination_lang='fr'/>
</x>
</iq>
]]></example>
<example caption='Translation is returned from translation provider'><![CDATA[
<iq type='result' id='translationReq_2' from='translation.shakespeare.lit' to='bard@shakespeare.lt/globe'>
<x xmlns='urn:xmpp:langtrans'>
<source xml:lang='en'>hello, how are you?</source>
<translation destination_lang='fr' source_lang='en' engine='default'>comment allez-vous?</translation>
</x>
</iq>
]]></example>
</section3>
<section3 topic='Requesting a Translation With Multiple Destination Languages' anchor='request-multiple'>
<example caption='bard requests a translation from English to Italian and German'><![CDATA[
<iq from='bard@shakespeare.lt/globe' id='translationReq_4' to='translation.shakespeare.lit' type='get'>
<x xmlns='urn:xmpp:langtrans'>
<source xml:lang='en'>How are you?</source>
<translation destination_lang='it'/>
<translation destination_lang='de'/>
</x>
</iq>
]]></example>
<example caption='Translation is returned from translation provider'><![CDATA[
<iq type='result' id='translationReq_4' from='translation.shakespeare.lit' to='bard@shakespeare.lt/globe'>
<x xmlns='urn:xmpp:langtrans'>
<source xml:lang='en'>How are you?</source>
<translation destination_lang='it' source_lang='en' engine='default'>Come siete?</translation>
<translation destination_lang='de' source_lang='en' engine='default'>Wie geht es Ihnen?</translation>
</x>
</iq>
]]></example>
</section3>
<section3 topic='Requesting a Translation With a Specific Dictionary' anchor='request-dictionary'>
<p>If a specific dictionary is required you MAY request a dictionary. This SHOULD have been returned when discoing the server although a dictionary MAY be requested which was not. The dictionaries are translation engine specific and are free form text.</p>
<example caption='Requests a translation from English to French using the 'medical' dictionary'><![CDATA[
<iq from='bard@shakespeare.lt/globe' id='translationReq_6' to='translation.shakespeare.lit' type='get'>
<x xmlns='urn:xmpp:langtrans'>
<source xml:lang='en'>How are you?</source>
<translation destination_lang='fr' dictionary='medical'/>
</x>
</iq>
]]></example>
<example caption='Translation provider returns translation with dictionary details'><![CDATA[
<iq type='result' id='translationReq_6' from='translation.shakespeare.lit' to='bard@shakespeare.lt/globe'>
<x xmlns='urn:xmpp:langtrans'>
<source xml:lang='en'>hello, how are you?</source>
<translation
destination_lang='fr'
dictionary='medical'
engine='default'
source_lang='en'>comment allez-vous?</translation>
</x>
</iq>
]]></example>
<p>If the translation service cannot complete the translation it SHOULD return a <item-not-found/> error indicating some part of the translation request was problematic, unless doing so would violate the privacy and security considerations in XMPP Core and XMPP IM, or local security and privacy policies.</p>
<example caption='Translation could not be completed'><![CDATA[
<iq type='error' id='translationReq_7' from='translation.shakespeare.lit' to='bard@shakespeare.lt/globe'>
<x xmlns='urn:xmpp:langtrans'>
<source xml:lang='en'>How are you?</source>
<translation destination_lang='dy'/>
</x>
<error type='modify'>
<bad-request xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
</error>
</iq>
]]></example>
<p>If privacy or security considerations make returning an <item-not-found/> error not feasible it SHOULD return a <service-unavailable/> error.</p>
<example caption='Service unavailable'><![CDATA[
<iq type='error' id='translationReq_7' from='translation.shakespeare.lit' to='bard@shakespeare.lt/globe'>
<x xmlns='urn:xmpp:langtrans'>
<source xml:lang='en'>How are you?</source>
<translation destination_lang='dy'/>
</x>
<error type='cancel'>
<service-unavailable xmlns='urn:ietf:xml:params:ns:xmpp-stanzas'/>
</error>
</iq>
]]></example>
</section3>
</section2>
</section1>
<section1 topic='Implementation Notes' anchor='impl'>
<p>In order to reduce user confusion and misunderstanding of a translated message body, it is RECOMMENDED that implementations of langtran implement the following user interface features.</p>
<ol>
<li>Translated messages should be clearly identified as being a translation.</li>
<li>The display of translated message should clearly show how (automated, manual, automated with human review) a messaged was translated.</li>
<li>The display of a message should clearly show if the translation is the destination, original or pivot language.</li>
<li>If pivoting is used, the destination message text should be marked in such a way as to indicate that it was translated on one or more pivot languages, what those language are, in what order they were used, and the actual pivot language text should be accessible to the user.</li>
<li>It is recommended that only one level of pivoting be used as quality of the destination translation degrades significantly after each pivot.</li>
</ol>
<p>Note: The 'reviewed' and 'pivotable' attributes are of type "boolean" and MUST be handled accordingly. &BOOLEANNOTE;</p>
</section1>
<section1 topic='Internationalization Considerations' anchor='i18n'>
<p>In order to properly process multi-language messages, clients MUST implement support for multiple message bodies differentiated by the 'xml:lang' attribute as described in <cite>RFC 6120</cite>.</p>
</section1>
<section1 topic='Security Considerations' anchor='security'>
<p>Potential attacks may be easier against services that implement translation because of the potential disclosure of information regarding language pairings, engines, and dictionaries used however no specific vulnerabilities are introduced.</p>
<p>This possible weakness can be mitigated by not returning specifics to requesting entities and the responding entity MAY perform authorization checks in order to determine how to respond.</p>
</section1>
<section1 topic='IANA Considerations' anchor='iana'>
<p>This document requires no interaction with &IANA;.</p>
</section1>
<section1 topic='XMPP Registrar Considerations' anchor='registrar'>
<section2 topic='Protocol Namespaces' anchor='registrar-ns'>
<p>The ®ISTRAR; includes 'urn:xmpp:langtrans' and 'urn:xmpp:langtrans:items' within its registry of protocol namespaces (see &NAMESPACES;).</p>
<p class='box'>Note: Before version 1.1 of this specification, the name of the items namespace was urn:xmpp:langtrans#items, however the '#' character is not recommended in URN syntax (see &rfc2141;) so the name was changed to urn:xmpp:langtrans:items.</p>
</section2>
<section2 topic='Service Discovery Identities' anchor='registrar-identity'>
<p>The XMPP Registrar includes type of "translation" in the "automation" category within its registry of service discovery identities (see &DISCOCATEGORIES;).</p>
</section2>
</section1>
<section1 topic='XML Schema' anchor='schema'>
<section2 topic='langtrans' anchor='schema-langtrans'>
<code><![CDATA[
<?xml version='1.0' encoding='UTF-8'?>
<xs:schema
xmlns='urn:xmpp:langtrans'
xmlns:xs='http://www.w3.org/2001/XMLSchema'
targetNamespace='urn:xmpp:langtrans'
elementFormDefault='qualified'>
<xs:annotation>
<xs:documentation>
The protocol documented by this schema is defined in
XEP-0171: http://www.xmpp.org/extensions/xep-0171.html
</xs:documentation>
</xs:annotation>
<xs:element name='x'>
<xs:complexType>
<xs:element ref='source' use='optional'/>
<xs:sequence>
<xs:element ref='translation' use='required' minOccurs='1'/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name='source'>
<xs:complexType>
<xs:simpleContent>
<xs:extension base='xs:string'>
<xs:attribute ref='xml:lang' use='required'/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name='translation'>
<xs:complexType>
<xs:simpleContent>
<xs:extension base='empty'>
<xs:attribute name='charset' type='xs:string' use='optional'/>
<xs:attribute name='source_lang' type='xs:language' use='optional' />
<xs:attribute name='destination_lang' type='xs:language' use='required'/>
<xs:attribute name='dictionary' type='xs:string' use='optional'/>
<xs:attribute name='engine' type='xs:string' use='optional' />
<xs:attribute name='reviewed' type='xs:boolean' use='optional' default='false'/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:simpleType name='empty'>
<xs:restriction base='xs:string'>
<xs:enumeration value=''/>
</xs:restriction>
</xs:simpleType>
</xs:schema>
]]></code>
</section2>
<section2 topic='langtrans:items' anchor='schema-langtrans-items'>
<code><![CDATA[
<?xml version='1.0' encoding='UTF-8'?>
<xs:schema
xmlns='urn:xmpp:langtrans:items'
xmlns:xs='http://www.w3.org/2001/XMLSchema'
targetNamespace='urn:xmpp:langtrans:items'
elementFormDefault='qualified'>
<xs:annotation>
<xs:documentation>
The protocol documented by this schema is defined in
XEP-0171: http://www.xmpp.org/extensions/xep-0171.html
</xs:documentation>
</xs:annotation>
<xs:element name='query'>
<xs:complexType>
<xs:sequence>
<xs:element ref='item' minOccurs='0' maxOccurs='unbounded'/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name='item'>
<xs:complexType>
<xs:simpleContent>
<xs:extension base='empty'>
<xs:attribute name='dictionary' type='xs:string'/>
<xs:attribute name='destination_lang' type='xs:language'/>
<xs:attribute name='engine' type='xs:string' use='optional'/>
<xs:attribute name='jid' type='xs:string' use='required'/>
<xs:attribute name='name' type='xs:string' use='optional'/>
<xs:attribute name='pivotable' type='xs:boolean' use='optional' default='false'/>
<xs:attribute name='source_lang' type='xs:language' use='required'/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:simpleType name='empty'>
<xs:restriction base='xs:string'>
<xs:enumeration value=''/>
</xs:restriction>
</xs:simpleType>
</xs:schema>
]]></code>
</section2>
</section1>
</xep>