mirror of
https://github.com/moparisthebest/xeps
synced 2024-11-25 02:32:18 -05:00
0.3
git-svn-id: file:///home/ksmith/gitmigration/svn/xmpp/trunk@1649 4b5297f7-1745-476d-ba37-a9c6900126ab
This commit is contained in:
parent
83f72eabfc
commit
bfd0204c0d
163
xep-0171.xml
163
xep-0171.xml
@ -10,7 +10,7 @@
|
|||||||
<abstract>This document defines an XMPP protocol extension for providing language translation facilities over XMPP. It supports human, machine, client-based, and server-based translations.</abstract>
|
<abstract>This document defines an XMPP protocol extension for providing language translation facilities over XMPP. It supports human, machine, client-based, and server-based translations.</abstract>
|
||||||
&LEGALNOTICE;
|
&LEGALNOTICE;
|
||||||
<number>0171</number>
|
<number>0171</number>
|
||||||
<status>Deferred</status>
|
<status>Experimental</status>
|
||||||
<type>Standards Track</type>
|
<type>Standards Track</type>
|
||||||
<sig>Standards</sig>
|
<sig>Standards</sig>
|
||||||
<approver>Council</approver>
|
<approver>Council</approver>
|
||||||
@ -30,18 +30,24 @@
|
|||||||
<author>
|
<author>
|
||||||
<firstname>Daniel</firstname>
|
<firstname>Daniel</firstname>
|
||||||
<surname>LaPrade</surname>
|
<surname>LaPrade</surname>
|
||||||
<email>daniel.laprade@je.jfcom.mil</email>
|
<email>dlaprade@echostorm.net</email>
|
||||||
</author>
|
</author>
|
||||||
<author>
|
<author>
|
||||||
<firstname>Keith</firstname>
|
<firstname>Keith</firstname>
|
||||||
<surname>Lirette</surname>
|
<surname>Lirette</surname>
|
||||||
<email>keith.lirette@je.jfcom.mil</email>
|
<email>keith.lirette@gd-ais.com</email>
|
||||||
</author>
|
</author>
|
||||||
<author>
|
<author>
|
||||||
<firstname>Brian</firstname>
|
<firstname>Brian</firstname>
|
||||||
<surname>Raymond</surname>
|
<surname>Raymond</surname>
|
||||||
<email>brian.raymond@je.jfcom.mil</email>
|
<email>braymond@echostorm.net</email>
|
||||||
</author>
|
</author>
|
||||||
|
<revision>
|
||||||
|
<version>0.3</version>
|
||||||
|
<date>2008-02-01</date>
|
||||||
|
<initials>kl/bf</initials>
|
||||||
|
<remark>Modified semantics to use IQ stanzas for communication with servers; changed dst_lang to destination_lang and src_lang to source_lang.</remark>
|
||||||
|
</revision>
|
||||||
<revision>
|
<revision>
|
||||||
<version>0.2</version>
|
<version>0.2</version>
|
||||||
<date>2006-04-24</date>
|
<date>2006-04-24</date>
|
||||||
@ -137,7 +143,7 @@
|
|||||||
</ol>
|
</ol>
|
||||||
<section3 topic='Direct Translation' anchor='message-direct'>
|
<section3 topic='Direct Translation' anchor='message-direct'>
|
||||||
<example caption='Entity sends a message translated from English to French'><![CDATA[
|
<example caption='Entity sends a message translated from English to French'><![CDATA[
|
||||||
<message from='bard@shakespeare.lit/globe' to='playwright@marlowe.lit/theatre'>
|
<message xml:lang='en' from='bard@shakespeare.lit/globe' to='playwright@marlowe.lit/theatre'>
|
||||||
<subject xml:lang='en'>Hello</subject>
|
<subject xml:lang='en'>Hello</subject>
|
||||||
<subject xml:lang='fr'>Bonjour</subject>
|
<subject xml:lang='fr'>Bonjour</subject>
|
||||||
<body xml:lang='en'>How are you?</body>
|
<body xml:lang='en'>How are you?</body>
|
||||||
@ -151,7 +157,7 @@
|
|||||||
<section3 topic='Translation With Pivot' anchor='message-pivot'>
|
<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>
|
<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[
|
<example caption='Entity sends a message translated from French to Russian via English using human translators'><![CDATA[
|
||||||
<message from='bard@shakespeare.lit/globe' to='playwright@marlowe.lit/theatre'>
|
<message xml:lang='fr' from='bard@shakespeare.lit/globe' to='playwright@marlowe.lit/theatre'>
|
||||||
<subject xml:lang='fr'>Bonjour</subject>
|
<subject xml:lang='fr'>Bonjour</subject>
|
||||||
<subject xml:lang='en'>Hello</subject>
|
<subject xml:lang='en'>Hello</subject>
|
||||||
<subject xml:lang='ru'>x443;лте</subject>
|
<subject xml:lang='ru'>x443;лте</subject>
|
||||||
@ -169,7 +175,7 @@
|
|||||||
<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>
|
<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[
|
<example caption='Entity sends a message translated from French to Russian via English using a machine translation engine.'><![CDATA[
|
||||||
|
|
||||||
<message from='bard@shakespeare.lit/globe' to='playwright@marlowe.lit/theatre'>
|
<message xml:lang='fr' from='bard@shakespeare.lit/globe' to='playwright@marlowe.lit/theatre'>
|
||||||
<subject xml:lang='fr'>Bonjour</subject>
|
<subject xml:lang='fr'>Bonjour</subject>
|
||||||
<subject xml:lang='en'>Hello</subject>
|
<subject xml:lang='en'>Hello</subject>
|
||||||
<subject xml:lang='ru'>x443;лте</subject>
|
<subject xml:lang='ru'>x443;лте</subject>
|
||||||
@ -233,19 +239,19 @@
|
|||||||
<example caption='Service replies with language details'><![CDATA[
|
<example caption='Service replies with language details'><![CDATA[
|
||||||
<iq type='result' to='bard@shakespeare.lit/globe' from=' translation.shakespeare.lit'>
|
<iq type='result' to='bard@shakespeare.lit/globe' from=' translation.shakespeare.lit'>
|
||||||
<query xmlns=' http://jabber.org/protocol/langtrans#items'>
|
<query xmlns=' http://jabber.org/protocol/langtrans#items'>
|
||||||
<item src_lang='en' jid='translation.shakespeare.lit' dst_lang='fr'
|
<item source_lang='en' jid='translation.shakespeare.lit' destination_lang='fr'
|
||||||
engine='SYSTRANS 2005 Release 2' pivotable='true'/>
|
engine='SYSTRANS 2005 Release 2' pivotable='true'/>
|
||||||
<item src_lang='en' jid='translation.shakespeare.lit' dst_lang='ko'
|
<item source_lang='en' jid='translation.shakespeare.lit' destination_lang='ko'
|
||||||
engine='SYSTRANS 2005 Release 2' pivotable='true'/>
|
engine='SYSTRANS 2005 Release 2' pivotable='true'/>
|
||||||
<item src_lang='en' jid='translation.shakespeare.lit' dst_lang='ru'
|
<item source_lang='en' jid='translation.shakespeare.lit' destination_lang='ru'
|
||||||
engine='SYSTRANS 2005 Release 2' pivotable='true'/>
|
engine='SYSTRANS 2005 Release 2' pivotable='true'/>
|
||||||
<item src_lang='en' jid='translation.shakespeare.lit' dst_lang='ru'
|
<item source_lang='en' jid='translation.shakespeare.lit' destination_lang='ru'
|
||||||
engine='SYSTRANS 2005 Release 2' pivotable='true' dictionary='medical'/>
|
engine='SYSTRANS 2005 Release 2' pivotable='true' dictionary='medical'/>
|
||||||
<item src_lang='fr' jid='translation.shakespeare.lit' dst_lang='en'
|
<item source_lang='fr' jid='translation.shakespeare.lit' destination_lang='en'
|
||||||
engine='SYSTRANS 2005 Release 2' pivotable='true' dictionary='standard'/>
|
engine='SYSTRANS 2005 Release 2' pivotable='true' dictionary='standard'/>
|
||||||
<item src_lang='ru' jid='translation.shakespeare.lit' dst_lang='en'
|
<item source_lang='ru' jid='translation.shakespeare.lit' destination_lang='en'
|
||||||
engine='SYSTRANS 2005 Release 2' pivotable='true' dictionary='Medical 1.0'/>
|
engine='SYSTRANS 2005 Release 2' pivotable='true' dictionary='Medical 1.0'/>
|
||||||
<item src_lang='ko' jid='translation.shakespeare.lit' dst_lang='en'
|
<item source_lang='ko' jid='translation.shakespeare.lit' destination_lang='en'
|
||||||
engine='SYSTRANS 2005 Release 2' pivotable='true'/>
|
engine='SYSTRANS 2005 Release 2' pivotable='true'/>
|
||||||
</query>
|
</query>
|
||||||
</iq>
|
</iq>
|
||||||
@ -254,98 +260,86 @@
|
|||||||
</section2>
|
</section2>
|
||||||
<section2 topic='Requesting a Translation from a Service' anchor='request'>
|
<section2 topic='Requesting a Translation from a Service' anchor='request'>
|
||||||
<section3 topic='Requesting a Basic Translation' anchor='request-basic'>
|
<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 'derived_from' attribute in the <translation/> element indicates a request for a translation. The request SHOULD include an XMPP &THREAD; element for tracking purposes.</p>
|
<p>To request service from a translation provider you can send a message to a provider requesting translations. The lack of a 'derived_from' attribute in the <translation/> element indicates a request for a translation.</p>
|
||||||
<example caption='Entity requests a translation from English to French'><![CDATA[
|
<example caption='Entity requests a translation from English to French'><![CDATA[
|
||||||
<message from='bard@shakespeare.lit/globe' to='translation.shakespeare.lit'>
|
<iq xmlns="jabber:client" from="bard@shakespeare.lt/globe" id="translationReq_2" to="translation.shakespeare.lit" type="get">
|
||||||
<thread>5f3ea6f710337db2388e965e837fcc96334361e4</thread>
|
<x xmlns="http://jabber.org/protocol/langtrans">
|
||||||
<subject xml:lang='en'>Hello</subject>
|
<source xml:lang="en">How are you?</source>
|
||||||
<body xml:lang='en'>How are you?</body>
|
<translation destination_lang="fr"/>
|
||||||
<x xmlns='http://jabber.org/protocol/langtrans'>
|
|
||||||
<translation destination='fr'/>
|
|
||||||
</x>
|
</x>
|
||||||
</message>
|
</iq>
|
||||||
]]></example>
|
]]></example>
|
||||||
<p>If the translation request included a Thread ID, the translation provider MUST echo that thread in its response so that the requesting entity can keep associate the response with the request.</p>
|
|
||||||
<example caption='Translation is returned from translation provider'><![CDATA[
|
<example caption='Translation is returned from translation provider'><![CDATA[
|
||||||
<message from='translation.shakespeare.lit' to='bard@shakespeare.lit/globe'>
|
<iq type="result" id="translationReq_2" from="translation.shakespeare.lit" to="bard@shakespeare.lt/globe">
|
||||||
<thread>5f3ea6f710337db2388e965e837fcc96334361e4</thread>
|
<x xmlns="http://jabber.org/protocol/langtrans">
|
||||||
<subject xml:lang='fr'>Bonjour</subject>
|
<source xml:lang="en">hello, how are you?</source>
|
||||||
<subject xml:lang='en'>Hello</subject>
|
<translation destination_lang="fr" derived_from="en" engine="default">comment allez-vous?</translation>
|
||||||
<body xml:lang='fr'>comment allez-vous?</body>
|
|
||||||
<body xml:lang='en'>How are you?</body>
|
|
||||||
<x xmlns='http://jabber.org/protocol/langtrans'>
|
|
||||||
<translation destination='fr' derived_from='en'/>
|
|
||||||
</x>
|
</x>
|
||||||
</message>
|
</iq>
|
||||||
]]></example>
|
]]></example>
|
||||||
</section3>
|
</section3>
|
||||||
<section3 topic='Requesting a Translation With Multiple Destination Languages' anchor='request-multiple'>
|
<section3 topic='Requesting a Translation With Multiple Destination Languages' anchor='request-multiple'>
|
||||||
<example caption='bard requests a translation from English to French and Russian'><![CDATA[
|
<example caption='bard requests a translation from English to Italian and German'><![CDATA[
|
||||||
<message from='bard@shakespeare.lit/globe' to='translation.shakespeare.lit'>
|
<iq xmlns="jabber:client" from="bard@shakespeare.lt/globe" id="translationReq_4" to="translation.shakespeare.lit" type="get">
|
||||||
<thread>5f3ea6f710337db2388e965e837fcc96334361e4</thread>
|
<x xmlns="http://jabber.org/protocol/langtrans">
|
||||||
<subject xml:lang='en'>Hello</subject>
|
<source xml:lang="en">How are you?</source>
|
||||||
<body xml:lang='en'>How are you?</body>
|
<translation destination_lang="it"/>
|
||||||
<x xmlns='http://jabber.org/protocol/langtrans'>
|
<translation destination_lang="de"/>
|
||||||
<translation destination='fr'/>
|
|
||||||
<translation destination='ru'/>
|
|
||||||
</x>
|
</x>
|
||||||
</message>
|
</iq>
|
||||||
]]></example>
|
]]></example>
|
||||||
<example caption='Translation is returned from translation provider'><![CDATA[
|
<example caption='Translation is returned from translation provider'><![CDATA[
|
||||||
<message from='translation.shakespeare.lit' to='bard@shakespeare.lit/globe'>
|
<iq type="result" id="translationReq_4" from="translation.shakespeare.lit" to="bard@shakespeare.lt/globe">
|
||||||
<thread>5f3ea6f710337db2388e965e837fcc96334361e4</thread>
|
<x xmlns="http://jabber.org/protocol/langtrans">
|
||||||
<subject xml:lang='en'>Hello</subject>
|
<source xml:lang="en">How are you?</source>
|
||||||
<subject xml:lang='fr'>Bonjour</subject>
|
<translation destination_lang="it" derived_from="en" engine="default">Come siete?</translation>
|
||||||
<subject xml:lang='ru'>x443;лте</subject>
|
<translation destination_lang="de" derived_from="en" engine="default">Wie geht es Ihnen?</translation>
|
||||||
<body xml:lang='fr'>comment allez-vous?</body>
|
|
||||||
<body xml:lang='en'>How are you?</body>
|
|
||||||
<body xml:lang='ru'>Как вы?</body>
|
|
||||||
<x xmlns='http://jabber.org/protocol/langtrans'>
|
|
||||||
<translation destination='fr' derived_from='en'/>
|
|
||||||
<translation destination='ru' derived_from='en'/>
|
|
||||||
</x>
|
</x>
|
||||||
</message>
|
</iq>
|
||||||
]]></example>
|
]]></example>
|
||||||
</section3>
|
</section3>
|
||||||
<section3 topic='Requesting a Translation With a Specific Dictionary' anchor='request-dictionary'>
|
<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>
|
<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[
|
<example caption='Requests a translation from English to French using the 'medical' dictionary'><![CDATA[
|
||||||
<message from='bard@shakespeare.lit/globe' to='translation.shakespeare.lit'>
|
<iq xmlns="jabber:client" from="bard@shakespeare.lt/globe" id="translationReq_6" to="translation.shakespeare.lit" type="get">
|
||||||
<thread>5f3ea6f710337db2388e965e837fcc96334361e4</thread>
|
<x xmlns="http://jabber.org/protocol/langtrans">
|
||||||
<subject xml:lang='en'>Hello</subject>
|
<source xml:lang="en">How are you?</source>
|
||||||
<body xml:lang='en'>How are you?</body>
|
<translation destination_lang="fr" dictionary="medical"/>
|
||||||
<x xmlns='http://jabber.org/protocol/langtrans'>
|
|
||||||
<translation destination='fr' dictionary='medical'/>
|
|
||||||
</x>
|
</x>
|
||||||
</message>
|
</iq>
|
||||||
]]></example>
|
]]></example>
|
||||||
<example caption='Translation provider returns translation with dictionary details'><![CDATA[
|
<example caption='Translation provider returns translation with dictionary details'><![CDATA[
|
||||||
<message from='translation.shakespeare.lit' to='bard@shakespeare.lit/globe'>
|
<iq type="result" id="translationReq_6" from="translation.shakespeare.lit" to="bard@shakespeare.lt/globe">
|
||||||
<thread>5f3ea6f710337db2388e965e837fcc96334361e4</thread>
|
<x xmlns="http://jabber.org/protocol/langtrans">
|
||||||
<subject xml:lang='fr'>Bonjour</subject>
|
<source xml:lang="en">hello, how are you?</source>
|
||||||
<subject xml:lang='en'>Hello</subject>
|
<translation destination_lang="fr" derived_from="en" dictionary="medical" engine="default">comment allez-vous?</translation>
|
||||||
<body xml:lang='fr'>comment allez-vous?</body>
|
|
||||||
<body xml:lang='en'>How are you?</body>
|
|
||||||
<x xmlns='http://jabber.org/protocol/langtrans'>
|
|
||||||
<translation destination='fr' derived_from='en' dictionary='medical'/>
|
|
||||||
</x>
|
</x>
|
||||||
</message>
|
</iq>
|
||||||
]]></example>
|
]]></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>
|
<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[
|
<example caption='Translation could not be completed'><![CDATA[
|
||||||
<message from='translation.shakespeare.lit' to='bard@shakespeare.lit/globe' type='error'>
|
<iq type="error" id="translationReq_7" from="translation.shakespeare.lit" to="bard@shakespeare.lt/globe">
|
||||||
<error code='404' type='cancel'>
|
<x xmlns="http://jabber.org/protocol/langtrans">
|
||||||
<item-not-found xmlns='urn:ietf:xml:params:ns:xmpp-stanzas'/>
|
<source xml:lang="en">How are you?</source>
|
||||||
|
<translation destination_lang="dy"/>
|
||||||
|
</x>
|
||||||
|
<error code="400" type="modify">
|
||||||
|
<bad-request xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
|
||||||
</error>
|
</error>
|
||||||
</message>
|
</iq>
|
||||||
]]></example>
|
]]></example>
|
||||||
<p>If privacy or security considerations make returning an <item-not-found/> error not feasible it SHOULD return a <service-unavailable/> error.</p>
|
<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[
|
<example caption='Service unavailable'><![CDATA[
|
||||||
<message from='translation.shakespeare.lit' to='bard@shakespeare.lit/globe' type='error'>
|
<iq type="error" id="translationReq_7" from="translation.shakespeare.lit" to="bard@shakespeare.lt/globe">
|
||||||
<error code='503' type='cancel'>
|
<x xmlns="http://jabber.org/protocol/langtrans">
|
||||||
|
<source xml:lang="en">How are you?</source>
|
||||||
|
<translation destination_lang="dy"/>
|
||||||
|
</x>
|
||||||
|
<error code='503' type='cancel'>
|
||||||
<service-unavailable xmlns='urn:ietf:xml:params:ns:xmpp-stanzas'/>
|
<service-unavailable xmlns='urn:ietf:xml:params:ns:xmpp-stanzas'/>
|
||||||
</error>
|
</error>
|
||||||
</message>
|
</iq>
|
||||||
]]></example>
|
]]></example>
|
||||||
</section3>
|
</section3>
|
||||||
</section2>
|
</section2>
|
||||||
@ -391,12 +385,23 @@
|
|||||||
|
|
||||||
<xs:element name='x'>
|
<xs:element name='x'>
|
||||||
<xs:complexType>
|
<xs:complexType>
|
||||||
|
<xs:element ref='source' use='required'/>
|
||||||
<xs:sequence>
|
<xs:sequence>
|
||||||
<xs:element ref='translation'/>
|
<xs:element ref='translation' use='required' minOccurs='1'/>
|
||||||
</xs:sequence>
|
</xs:sequence>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
</xs:element>
|
</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:element name='translation'>
|
||||||
<xs:complexType>
|
<xs:complexType>
|
||||||
<xs:simpleContent>
|
<xs:simpleContent>
|
||||||
@ -443,12 +448,12 @@
|
|||||||
<xs:simpleContent>
|
<xs:simpleContent>
|
||||||
<xs:extension base='empty'>
|
<xs:extension base='empty'>
|
||||||
<xs:attribute name='dictionary' type='xs:string'/>
|
<xs:attribute name='dictionary' type='xs:string'/>
|
||||||
<xs:attribute name='dst_lang' type='xs:language'/>
|
<xs:attribute name='destination_lang' type='xs:language'/>
|
||||||
<xs:attribute name='engine' type='xs:string' use='optional'/>
|
<xs:attribute name='engine' type='xs:string' use='optional'/>
|
||||||
<xs:attribute name='jid' type='xs:string' use='required'/>
|
<xs:attribute name='jid' type='xs:string' use='required'/>
|
||||||
<xs:attribute name='name' type='xs:string' use='optional'/>
|
<xs:attribute name='name' type='xs:string' use='optional'/>
|
||||||
<xs:attribute name='pivotable' type='xs:boolean' use='optional' default='false'/>
|
<xs:attribute name='pivotable' type='xs:boolean' use='optional' default='false'/>
|
||||||
<xs:attribute name='src_lang' type='xs:language' use='required'/>
|
<xs:attribute name='source_lang' type='xs:language' use='required'/>
|
||||||
</xs:extension>
|
</xs:extension>
|
||||||
</xs:simpleContent>
|
</xs:simpleContent>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
|
Loading…
Reference in New Issue
Block a user