本文转自http://wiki.jabbercn.org/index.php?title=RFC3921
关于本文的说明
版权声明
摘要
<stream:streamxmlns='jabber:client'xmlns:stream='http://etherx.jabber.org/streams'id='c2s_345'from='example.com'version='1.0'><stream:features><bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'/><session xmlns='urn:ietf:params:xml:ns:xmpp-session'/></stream:features>
<iq to='example.com'type='set'id='sess_1'><session xmlns='urn:ietf:params:xml:ns:xmpp-session'/></iq>
<iq from='example.com'type='result'id='sess_1'/>
<iq from='example.com' type='error' id='sess_1'><session xmlns='urn:ietf:params:xml:ns:xmpp-session'/><error type='wait'><internal-server-errorxmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/></error></iq>
<iq from='example.com' type='error' id='sess_1'><session xmlns='urn:ietf:params:xml:ns:xmpp-session'/><error type='auth'><forbiddenxmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/></error></iq>
<stream:error><conflict xmlns='urn:ietf:params:xml:ns:xmpp-streams'/></stream:error></stream:stream>
<iq from='example.com' type='error' id='sess_1'><session xmlns='urn:ietf:params:xml:ns:xmpp-session'/><error type='cancel'><conflict xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/></error></iq>
<messageto='[email protected]'from='[email protected]/balcony'type='chat'xml:lang='en'><body>Wherefore art thou, Romeo?</body></message>
<messageto='[email protected]'from='[email protected]/balcony'type='chat'xml:lang='en'><body>Wherefore art thou, Romeo?</body><body xml:lang='cz'>PročeŽ jsi ty, Romeo?</body></message>
<messageto='[email protected]'from='[email protected]/balcony'type='chat'xml:lang='en'><subject>I implore you!</subject><subjectxml:lang='cz'>Úpěnlivě prosim!</subject><body>Wherefore art thou, Romeo?</body><body xml:lang='cz'>PročeŽ jsi ty, Romeo?</body></message>
<messageto='[email protected]/orchard'from='[email protected]/balcony'type='chat'xml:lang='en'><body>Art thou not Romeo, and a Montague?</body><thread>e0ffe42b28561960c6b12b944a092794b9683a38</thread></message><messageto='[email protected]/balcony'from='[email protected]/orchard'type='chat'xml:lang='en'><body>Neither, fair saint, if either thee dislike.</body><thread>e0ffe42b28561960c6b12b944a092794b9683a38</thread></message><messageto='[email protected]/orchard'from='[email protected]/balcony'type='chat'xml:lang='en'><body>How cam'st thou hither, tell me, and wherefore?</body><thread>e0ffe42b28561960c6b12b944a092794b9683a38</thread></message>
<presence> <show>dnd</show> </presence>
<presence xml:lang='en'><show>dnd</show><status>Wooing Juliet</status><status xml:lang='cz'>Ja dvořím Juliet</status></presence>
<presence xml:lang='en'><show>dnd</show><status>Wooing Juliet</status><status xml:lang='cz'>Ja dvořím Juliet</status><priority>1</priority></presence>
<presence/>
<presencetype='probe'from='[email protected]/orchard'to='[email protected]'/><presencetype='probe'from='[email protected]/orchard'to='[email protected]'/>
<presencefrom='[email protected]/orchard'to='[email protected]'/><presencefrom='[email protected]/orchard'to='[email protected]'/>
<presencefrom='[email protected]/balcony'to='[email protected]/orchard'xml:lang='en'><show>away</show><status>be right back</status><priority>0</priority></presence><presencefrom='[email protected]/chamber'to='[email protected]/orchard'><priority>1</priority></presence><presencefrom='[email protected]/pda'to='[email protected]/orchard'xml:lang='en'><show>dnd</show><status>gallivanting</status></presence>
<presencefrom='[email protected]/orchard'to='[email protected]/chamber'/><presencefrom='[email protected]/orchard'to='[email protected]/balcony'/><presencetype='error'from='[email protected]'to='[email protected]/orchard'><error type='cancel'><gone xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/></error></presence>
<presencefrom='[email protected]/orchard'to='[email protected]'xml:lang='en'><show>dnd</show><status>courting Juliet</status><priority>0</priority></presence>
<presence xml:lang='en'><show>away</show><status>I shall return!</status><priority>1</priority></presence>
<presencefrom='[email protected]/orchard'to='[email protected]'xml:lang='en'><show>away</show><status>I shall return!</status><priority>1</priority></presence>
[to "balcony" resource...] <presencefrom='[email protected]/orchard'to='[email protected]'xml:lang='en'><show>away</show><status>I shall return!</status><priority>1</priority></presence> [to "chamber" resource...] <presencefrom='[email protected]/orchard'to='[email protected]'xml:lang='en'><show>away</show><status>I shall return!</status><priority>1</priority></presence>
<presence from='[email protected]/balcony' type='unavailable'/>
<presencetype='unavailable'from='[email protected]/balcony'to='[email protected]/orchard'/>
<presence from='[email protected]/orchard'type='unavailable'xml:lang='en'><status>gone home</status></presence>
<presencetype='unavailable'from='[email protected]/orchard'to='[email protected]'xml:lang='en'><status>gone home</status></presence><presencefrom='[email protected]/orchard'to='[email protected]'xml:lang='en'><status>gone home</status></presence>
<presence to='[email protected]' type='subscribe'/>
<presence to='[email protected]' type='subscribed'/>
<presence to='[email protected]' type='unsubscribed'/>
<presence to='[email protected]' type='unsubscribed'/>
<presence to='[email protected]' type='unsubscribe'/>
<iq from='[email protected]/balcony' type='get' id='roster_1'><query xmlns='jabber:iq:roster'/></iq>
<iq to='[email protected]/balcony' type='result' id='roster_1'><query xmlns='jabber:iq:roster'><item jid='[email protected]'name='Romeo'subscription='both'><group>Friends</group></item><item jid='[email protected]'name='Mercutio'subscription='from'><group>Friends</group></item><item jid='[email protected]'name='Benvolio'subscription='both'><group>Friends</group></item></query></iq>
<iq from='[email protected]/balcony' type='set' id='roster_2'><query xmlns='jabber:iq:roster'><item jid='[email protected]'name='Nurse'><group>Servants</group></item></query></iq>
<iq to='[email protected]/balcony'type='set'id='a78b4q6ha463'><query xmlns='jabber:iq:roster'><item jid='[email protected]'name='Nurse'subscription='none'><group>Servants</group></item></query></iq><iq to='[email protected]/chamber'type='set'id='a78b4q6ha464'><query xmlns='jabber:iq:roster'><item jid='[email protected]'name='Nurse'subscription='none'><group>Servants</group></item></query></iq><iq to='[email protected]/balcony' type='result' id='roster_2'/>
<iq from='[email protected]/balcony'to='example.com'type='result'id='a78b4q6ha463'/><iq from='[email protected]/chamber'to='example.com'type='result'id='a78b4q6ha464'/>
<iq from='[email protected]/chamber' type='set' id='roster_3'><query xmlns='jabber:iq:roster'><item jid='[email protected]'name='Romeo'subscription='both'><group>Friends</group><group>Lovers</group></item></query></iq>
<iq from='[email protected]/balcony' type='set' id='roster_4'><query xmlns='jabber:iq:roster'><item jid='[email protected]' subscription='remove'/></query></iq>
<iq type='set' id='set1'><query xmlns='jabber:iq:roster'><itemjid='[email protected]'name='MyContact'><group>MyBuddies</group></item></query></iq>
<iq type='set'><query xmlns='jabber:iq:roster'><itemjid='[email protected]'subscription='none'name='MyContact'><group>MyBuddies</group></item></query></iq><iq type='result' id='set1'/>
<presence to='[email protected]' type='subscribe'/>
<iq type='set'><query xmlns='jabber:iq:roster'><itemjid='[email protected]'subscription='none'ask='subscribe'name='MyContact'><group>MyBuddies</group></item></query></iq>
<presencefrom='[email protected]'to='[email protected]'type='subscribe'/>
<iq type='set' id='set2'><query xmlns='jabber:iq:roster'><itemjid='[email protected]'name='SomeUser'><group>SomeGroup</group></item></query></iq><presence to='[email protected]' type='subscribed'/>
<iq type='set' to='[email protected]/resource'><query xmlns='jabber:iq:roster'><itemjid='[email protected]'subscription='from'name='SomeUser'><group>SomeGroup</group></item></query></iq><iq type='result' to='[email protected]/resource' id='set2'/><presencefrom='[email protected]'to='[email protected]'type='subscribed'/><presencefrom='[email protected]/resource'to='[email protected]'/>
<presenceto='[email protected]'from='[email protected]'type='subscribed'/><iq type='set'><query xmlns='jabber:iq:roster'><itemjid='[email protected]'subscription='to'name='MyContact'><group>MyBuddies</group></item></query></iq><presencefrom='[email protected]/resource'to='[email protected]/resource'/>
要么发送一个"subscribe"类型的出席信息节给联系人证实它, 要么发送一个"unsubscribe"类型的出席信息节给联系人否认它;这个步骤不一定影响订阅状态(见 订阅状态Subscription States(第九章)的细节), 但是会让用户用户的服务器知道它必须(MUST)不再发送订阅状态改变通知给用户(见第九章第四节).
<presence to='[email protected]' type='unsubscribed'/>
<presencefrom='[email protected]'to='[email protected]'type='unsubscribed'/>
<presencefrom='[email protected]'to='[email protected]'type='unsubscribed'/><iq type='set'><query xmlns='jabber:iq:roster'><itemjid='[email protected]'subscription='none'name='MyContact'><group>MyBuddies</group></item></query></iq>
<presence to='[email protected]' type='subscribe'/>
<iq type='set'><query xmlns='jabber:iq:roster'><itemjid='[email protected]'subscription='from'ask='subscribe'name='SomeUser'><group>SomeGroup</group></item></query></iq><presencefrom='[email protected]'to='[email protected]'type='subscribe'/>
<presence to='[email protected]' type='subscribed'/>
<iq type='set'><query xmlns='jabber:iq:roster'><itemjid='[email protected]'subscription='both'name='MyContact'><group>MyBuddies</group></item></query></iq><presencefrom='[email protected]'to='[email protected]'type='subscribed'/><presencefrom='[email protected]/resource'to='[email protected]'/>
<presencefrom='[email protected]'to='[email protected]'type='subscribed'/><iq type='set'><query xmlns='jabber:iq:roster'><itemjid='[email protected]'subscription='both'name='SomeUser'><group>SomeGroup</group></item></query></iq><presencefrom='[email protected]/resource'to='[email protected]/resource'/>
<presence to='[email protected]' type='unsubscribed'/>
<presencefrom='[email protected]'to='[email protected]'type='unsubscribed'/>
<presencefrom='[email protected]'to='[email protected]'type='unsubscribed'/><iq type='set'><query xmlns='jabber:iq:roster'><itemjid='[email protected]'subscription='from'name='SomeUser'><group>SomeGroup</group></item></query></iq>
<presence to='[email protected]' type='unsubscribe'/>
<iq type='set'><query xmlns='jabber:iq:roster'><itemjid='[email protected]'subscription='none'name='MyContact'><group>MyBuddies</group></item></query></iq><presencefrom='[email protected]'to='[email protected]'type='unsubscribe'/>
<iq type='set'><query xmlns='jabber:iq:roster'><itemjid='[email protected]'subscription='none'name='SomeUser'><group>SomeGroup</group></item></query></iq><presencefrom='[email protected]'to='[email protected]'type='unsubscribe'/>
<presencefrom='[email protected]'to='[email protected]'type='unsubscribed'/><presencefrom='[email protected]/resource'to='[email protected]'type='unavailable'/>
<presencefrom='[email protected]'to='[email protected]'type='unsubscribed'/><presencefrom='[email protected]/resource'to='[email protected]'type='unavailable'/>
<presence to='[email protected]' type='unsubscribe'/>
<iq type='set'><query xmlns='jabber:iq:roster'><itemjid='[email protected]'subscription='from'name='MyContact'><group>MyBuddies</group></item></query></iq><presencefrom='[email protected]'to='[email protected]'type='unsubscribe'/>
<iq type='set'><query xmlns='jabber:iq:roster'><itemjid='[email protected]'subscription='to'name='SomeUser'><group>SomeGroup</group></item></query></iq><presencefrom='[email protected]'to='[email protected]'type='unsubscribe'/>
<presencefrom='[email protected]'to='[email protected]'type='unsubscribed'/><presencefrom='[email protected]/resource'to='[email protected]'type='unavailable'/>
<presencefrom='[email protected]'to='[email protected]'type='unsubscribed'/><presencefrom='[email protected]/resource'to='[email protected]'type='unavailable'/>
<presence to='[email protected]' type='unsubscribed'/>
<iq type='set'><query xmlns='jabber:iq:roster'><itemjid='[email protected]'subscription='none'name='SomeUser'><group>SomeGroup</group></item></query></iq><presencefrom='[email protected]'to='[email protected]'type='unsubscribed'/><presencefrom='[email protected]/resource'to='[email protected]'type='unavailable'/>
<iq type='set'><query xmlns='jabber:iq:roster'><itemjid='[email protected]'subscription='none'name='MyContact'><group>MyBuddies</group></item></query></iq><presencefrom='[email protected]'to='[email protected]'type='unsubscribed'/><presencefrom='[email protected]/resource'to='[email protected]'type='unavailable'/>
<presence to='[email protected]' type='unsubscribed'/>
<iq type='set'><query xmlns='jabber:iq:roster'><itemjid='[email protected]'subscription='to'name='SomeUser'><group>SomeGroup</group></item></query></iq><presencefrom='[email protected]'to='[email protected]'type='unsubscribed'/><presencefrom='[email protected]/resource'to='[email protected]'type='unavailable'/>
<iq type='set'><query xmlns='jabber:iq:roster'><itemjid='[email protected]'subscription='from'name='MyContact'><group>MyBuddies</group></item></query></iq><presencefrom='[email protected]'to='[email protected]'type='unsubscribed'/><presencefrom='[email protected]/resource'to='[email protected]'type='unavailable'/>
<iq type='set' id='remove1'><query xmlns='jabber:iq:roster'><itemjid='[email protected]'subscription='remove'/></query></iq>
<presencefrom='[email protected]'to='[email protected]'type='unsubscribe'/><presencefrom='[email protected]'to='[email protected]'type='unsubscribed'/><iq type='set'><query xmlns='jabber:iq:roster'><itemjid='[email protected]'subscription='remove'/></query></iq><iq type='result' id='remove1'/><presencefrom='[email protected]/resource'to='[email protected]'type='unavailable'/>
<iq type='set'><query xmlns='jabber:iq:roster'><itemjid='[email protected]'subscription='to'name='SomeUser'><group>SomeGroup</group></item></query></iq><presencefrom='[email protected]'to='[email protected]'type='unsubscribe'/>
<iq type='set'><query xmlns='jabber:iq:roster'><itemjid='[email protected]'subscription='none'name='SomeUser'><group>SomeGroup</group></item></query></iq><presencefrom='[email protected]'to='[email protected]'type='unsubscribed'/>
<presencefrom='[email protected]/resource'to='[email protected]'type='unavailable'/>
当前状态 | 路由? | 新状态 |
---|---|---|
"None" | 否 | 状态不变 |
"None + Pending Out" | 否 | 状态不变 |
"None + Pending In" | 是 | "From" |
"None + Pending Out/In" | 是 | "From + Pending Out" |
"To" | 否 | 状态不变 |
"To + Pending In" | 是 | "Both" |
"From" | 否 | 状态不变 |
"From + Pending Out" | 否 | 状态不变 |
"Both" | 否 | 状态不变 |
当前状态 | 路由? | 新状态 |
---|---|---|
"None" | 否 | 状态不变 |
"None + Pending Out" | 否 | 状态不变 |
"None + Pending In" | 是 | "None" |
"None + Pending Out/In" | 是 | "None + Pending Out" |
"To" | 否 | 状态不变 |
"To + Pending In" | 是 | "To" |
"From" | 是 | "None" |
"From + Pending Out" | 是 | "None + Pending Out" |
"Both" | 是 | "To" |
当前状态 | 递送? | 新状态 |
---|---|---|
"None" | 是 | "None + Pending In" |
"None + Pending Out" | 是 | "None + Pending Out/In" |
"None + Pending In" | 否 | 状态不变 |
"None + Pending Out/In" | 否 | 状态不变 |
"To" | 是 | "To + Pending In" |
"To + Pending In" | 否 | 状态不变 |
"From" | 否 * | 状态不变 |
"From + Pending Out" | 否 * | 状态不变 |
"Both" | 否 * | 状态不变 |
当前状态 | 递送? | 新状态 |
---|---|---|
"None" | 否 | 状态不变 |
"None + Pending Out" | 否 | 状态不变 |
"None + Pending In" | 是 * | "None" |
"None + Pending Out/In" | 是 * | "None + Pending Out" |
"To" | 否 | 状态不变 |
"To + Pending In" | 是 * | "To" |
"From" | 是 * | "None" |
"From + Pending Out" | 是 * | "None + Pending Out |
"Both" | 是 * | "To" |
当前状态 | 递送? | 新状态 |
---|---|---|
"None" | 否 | 状态不变 |
"None + Pending Out" | 是 | "To" |
"None + Pending In" | 否 | 状态不变 |
"None + Pending Out/In" | 是 | "To + Pending In" |
"To" | 否 | 状态不变 |
"To + Pending In" | 否 | 状态不变 |
"From" | 否 | 状态不变 |
"From + Pending Out" | 是 | "Both" |
"Both" | 否 | 状态不变 |
当前状态 | 递送? | 新状态 |
---|---|---|
"None" | 否 | 状态不变 |
"None + Pending Out" | 是 | "None" |
"None + Pending In" | 否 | 状态不变 |
"None + Pending Out/In" | 是 | "None + Pending In" |
"To" | 是 | "None" |
"To + Pending In" | 是 | "None + Pending In" |
"From" | 否 | 状态不变 |
"From + Pending Out" | 是 | "From" |
"Both" | 是 | "From" |
节类型 | 接受 | 禁止 |
---|---|---|
subscribe | subscribed | unsubscribed |
subscribed | subscribe | unsubscribe |
unsubscribe | unsubscribed | subscribed |
unsubscribed | unsubscribe | subscribe |
<iq><query xmlns='jabber:iq:privacy'><list name='foo'><itemtype='[jid|group|subscription]'value='bar'action='[allow|deny]'order='unsignedInt'> [<message/>] [<presence-in/>] [<presence-out/>] [<iq/>] </item></list></query></iq>
<iq from='[email protected]/orchard' type='get' id='getlist1'><query xmlns='jabber:iq:privacy'/></iq>
<iq type='result' id='getlist1' to='[email protected]/orchard'><query xmlns='jabber:iq:privacy'><active name='private'/><default name='public'/><list name='public'/><list name='private'/><list name='special'/></query></iq>
<iq from='[email protected]/orchard' type='get' id='getlist2'><query xmlns='jabber:iq:privacy'><list name='public'/></query></iq>
<iq type='result' id='getlist2' to='[email protected]/orchard'><query xmlns='jabber:iq:privacy'><list name='public'><item type='jid'value='[email protected]'action='deny'order='1'/><item action='allow' order='2'/></list></query></iq>
<iq from='[email protected]/orchard' type='get' id='getlist3'><query xmlns='jabber:iq:privacy'><list name='private'/></query></iq>
<iq type='result' id='getlist3' to='[email protected]/orchard'><query xmlns='jabber:iq:privacy'><list name='private'><item type='subscription'value='both'action='allow'order='10'/><item action='deny' order='15'/></list></query></iq>
<iq from='[email protected]/orchard' type='get' id='getlist4'><query xmlns='jabber:iq:privacy'><list name='special'/></query></iq>
<iq type='result' id='getlist4' to='[email protected]/orchard'><query xmlns='jabber:iq:privacy'><list name='special'><item type='jid'value='[email protected]'action='allow'order='6'/><item type='jid'value='[email protected]'action='allow'order='7'/><item type='jid'value='[email protected]'action='allow'order='42'/><item action='deny' order='666'/></list></query></iq>
<iq to='[email protected]/orchard' type='error' id='getlist5'><query xmlns='jabber:iq:privacy'><list name='The Empty Set'/></query><error type='cancel'><item-not-foundxmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/></error></iq>
<iq to='[email protected]/orchard' type='error' id='getlist6'><query xmlns='jabber:iq:privacy'><list name='public'/><list name='private'/><list name='special'/></query><error type='modify'><bad-requestxmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/></error></iq>
<iq from='[email protected]/orchard' type='set' id='active1'><query xmlns='jabber:iq:privacy'><active name='special'/></query></iq>
<iq type='result' id='active1' to='[email protected]/orchard'/>
<iq to='[email protected]/orchard' type='error' id='active2'><query xmlns='jabber:iq:privacy'><active name='The Empty Set'/></query><error type='cancel'><item-not-foundxmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/></error></iq>
<iq from='[email protected]/orchard' type='set' id='active3'><query xmlns='jabber:iq:privacy'><active/></query></iq>
<iq type='result' id='active3' to='[email protected]/orchard'/>
<iq from='[email protected]/orchard' type='set' id='default1'><query xmlns='jabber:iq:privacy'><default name='special'/></query></iq>
<iq type='result' id='default1' to='[email protected]/orchard'/>
<iq to='[email protected]/orchard' type='error' id='default1'><query xmlns='jabber:iq:privacy'><default name='special'/></query><error type='cancel'><conflictxmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/></error></iq>
<iq to='[email protected]/orchard' type='error' id='default1'><query xmlns='jabber:iq:privacy'><default name='The Empty Set'/></query><error type='cancel'><item-not-foundxmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/></error></iq>
<iq from='[email protected]/orchard' type='set' id='default2'><query xmlns='jabber:iq:privacy'><default/></query></iq>
<iq type='result' id='default2' to='[email protected]/orchard'/>
<iq to='[email protected]/orchard' type='error' id='default3'><query xmlns='jabber:iq:privacy'><default/></query><error type='cancel'><conflictxmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/></error></iq>
<iq from='[email protected]/orchard' type='set' id='edit1'><query xmlns='jabber:iq:privacy'><list name='public'><item type='jid'value='[email protected]'action='deny'order='3'/><item type='jid'value='[email protected]'action='deny'order='5'/><item action='allow' order='68'/></list></query></iq>
<iq type='result' id='edit1' to='[email protected]/orchard'/>
<iq to='[email protected]/orchard' type='set' id='push1'><query xmlns='jabber:iq:privacy'><list name='public'/></query></iq><iq to='[email protected]/home' type='set' id='push2'><query xmlns='jabber:iq:privacy'><list name='public'/></query></iq>
<iq from='[email protected]/orchard'type='result'id='push1'/><iq from='[email protected]/home'type='result'id='push2'/>
<iq from='[email protected]/orchard' type='set' id='remove1'><query xmlns='jabber:iq:privacy'><list name='private'/></query></iq>
<iq type='result' id='remove1' to='[email protected]/orchard'/>
<iq from='[email protected]/orchard' type='set' id='msg1'><query xmlns='jabber:iq:privacy'><list name='message-jid-example'><item type='jid'value='[email protected]'action='deny'order='3'><message/></item></list></query></iq>
<iq from='[email protected]/orchard' type='set' id='msg2'><query xmlns='jabber:iq:privacy'><list name='message-group-example'><item type='group'value='Enemies'action='deny'order='4'><message/></item></list></query></iq>
<iq from='[email protected]/orchard' type='set' id='msg3'><query xmlns='jabber:iq:privacy'><list name='message-sub-example'><item type='subscription'value='none'action='deny'order='5'><message/></item></list></query></iq>
<iq from='[email protected]/orchard' type='set' id='msg4'><query xmlns='jabber:iq:privacy'><list name='message-global-example'><item action='deny' order='6'><message/></item></list></query></iq>
<iq from='[email protected]/orchard' type='set' id='presin1'><query xmlns='jabber:iq:privacy'><list name='presin-jid-example'><item type='jid'value='[email protected]'action='deny'order='7'><presence-in/></item></list></query></iq>
<iq from='[email protected]/orchard' type='set' id='presin2'><query xmlns='jabber:iq:privacy'><list name='presin-group-example'><item type='group'value='Enemies'action='deny'order='8'><presence-in/></item></list></query></iq>
<iq from='[email protected]/orchard' type='set' id='presin3'><query xmlns='jabber:iq:privacy'><list name='presin-sub-example'><item type='subscription'value='to'action='deny'order='9'><presence-in/></item></list></query></iq>
<iq from='[email protected]/orchard' type='set' id='presin4'><query xmlns='jabber:iq:privacy'><list name='presin-global-example'><item action='deny' order='11'><presence-in/></item></list></query></iq>
<iq from='[email protected]/orchard' type='set' id='presout1'><query xmlns='jabber:iq:privacy'><list name='presout-jid-example'><item type='jid'value='[email protected]'action='deny'order='13'><presence-out/></item></list></query></iq>
<iq from='[email protected]/orchard' type='set' id='presout2'><query xmlns='jabber:iq:privacy'><list name='presout-group-example'><item type='group'value='Enemies'action='deny'order='15'><presence-out/></item></list></query></iq>
<iq from='[email protected]/orchard' type='set' id='presout3'><query xmlns='jabber:iq:privacy'><list name='presout-sub-example'><item type='subscription'value='from'action='deny'order='17'><presence-out/></item></list></query></iq>
<iq from='[email protected]/orchard' type='set' id='presout4'><query xmlns='jabber:iq:privacy'><list name='presout-global-example'><item action='deny' order='23'><presence-out/></item></list></query></iq>
<iq from='[email protected]/orchard' type='set' id='iq1'><query xmlns='jabber:iq:privacy'><list name='iq-jid-example'><item type='jid'value='[email protected]'action='deny'order='29'><iq/></item></list></query></iq>
<iq from='[email protected]/orchard' type='set' id='iq2'><query xmlns='jabber:iq:privacy'><list name='iq-group-example'><item type='group'value='Enemies'action='deny'order='31'><iq/></item></list></query></iq>
<iq from='[email protected]/orchard' type='set' id='iq3'><query xmlns='jabber:iq:privacy'><list name='iq-sub-example'><item type='subscription'value='none'action='deny'order='17'><iq/></item></list></query></iq>
<iq from='[email protected]/orchard' type='set' id='iq4'><query xmlns='jabber:iq:privacy'><list name='iq-global-example'><item action='deny' order='1'><iq/></item></list></query></iq>
<iq from='[email protected]/orchard' type='set' id='all1'><query xmlns='jabber:iq:privacy'><list name='all-jid-example'><item type='jid'value='[email protected]'action='deny'order='23'/></list></query></iq>
<iq from='[email protected]/orchard' type='set' id='all2'><query xmlns='jabber:iq:privacy'><list name='all-group-example'><item type='group'value='Enemies'action='deny'order='13'/></list></query></iq>
<iq from='[email protected]/orchard' type='set' id='all3'><query xmlns='jabber:iq:privacy'><list name='all-sub-example'><item type='subscription'value='none'action='deny'order='11'/></list></query></iq>
<iq from='[email protected]/orchard' type='set' id='all4'><query xmlns='jabber:iq:privacy'><list name='all-global-example'><item action='deny' order='7'/></list></query></iq>
<iq type='get'to='[email protected]'from='[email protected]/pda'id='probing1'><query xmlns='jabber:iq:version'/></iq>
<iq type='error'from='[email protected]'to='[email protected]/pda'id='probing1'><query xmlns='jabber:iq:version'/><error type='cancel'><service-unavailablexmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/></error></iq>
<iq type='set' id='heuristic1'><query xmlns='jabber:iq:privacy'><list name='heuristic-example'><item type='subscription'value='none'action='deny'order='437'/></list></query></iq>
译者注: [JSF]已改名为[XSF],[JEP-0054]已改名为[XEP-0054]
<?xml version='1.0' encoding='UTF-8'?> <xs:schemaxmlns:xs='http://www.w3.org/2001/XMLSchema'targetNamespace='jabber:client'xmlns='jabber:client'elementFormDefault='qualified'> <xs:import namespace='urn:ietf:params:xml:ns:xmpp-stanzas'/> <xs:element name='message'><xs:complexType><xs:sequence><xs:choice minOccurs='0' maxOccurs='unbounded'><xs:element ref='subject'/><xs:element ref='body'/><xs:element ref='thread'/></xs:choice><xs:anynamespace='##other'minOccurs='0'maxOccurs='unbounded'/><xs:element ref='error'minOccurs='0'/></xs:sequence><xs:attribute name='from'type='xs:string'use='optional'/><xs:attribute name='id'type='xs:NMTOKEN'use='optional'/><xs:attribute name='to'type='xs:string'use='optional'/><xs:attribute name='type' use='optional' default='normal'><xs:simpleType><xs:restriction base='xs:NCName'><xs:enumeration value='chat'/><xs:enumeration value='error'/><xs:enumeration value='groupchat'/><xs:enumeration value='headline'/><xs:enumeration value='normal'/></xs:restriction></xs:simpleType></xs:attribute><xs:attribute ref='xml:lang' use='optional'/></xs:complexType></xs:element> <xs:element name='body'><xs:complexType><xs:simpleContent><xs:extension base='xs:string'><xs:attribute ref='xml:lang' use='optional'/></xs:extension></xs:simpleContent></xs:complexType></xs:element> <xs:element name='subject'><xs:complexType><xs:simpleContent><xs:extension base='xs:string'><xs:attribute ref='xml:lang' use='optional'/></xs:extension></xs:simpleContent></xs:complexType></xs:element> <xs:element name='thread' type='xs:NMTOKEN'/> <xs:element name='presence'><xs:complexType><xs:sequence><xs:choice minOccurs='0' maxOccurs='unbounded'><xs:element ref='show'/><xs:element ref='status'/><xs:element ref='priority'/></xs:choice><xs:anynamespace='##other'minOccurs='0'maxOccurs='unbounded'/><xs:element ref='error'minOccurs='0'/></xs:sequence><xs:attribute name='from'type='xs:string'use='optional'/><xs:attribute name='id'type='xs:NMTOKEN'use='optional'/><xs:attribute name='to'type='xs:string'use='optional'/><xs:attribute name='type' use='optional'><xs:simpleType><xs:restriction base='xs:NCName'><xs:enumeration value='error'/><xs:enumeration value='probe'/><xs:enumeration value='subscribe'/><xs:enumeration value='subscribed'/><xs:enumeration value='unavailable'/><xs:enumeration value='unsubscribe'/><xs:enumeration value='unsubscribed'/></xs:restriction></xs:simpleType></xs:attribute><xs:attribute ref='xml:lang' use='optional'/></xs:complexType></xs:element> <xs:element name='show'><xs:simpleType><xs:restriction base='xs:NCName'><xs:enumeration value='away'/><xs:enumeration value='chat'/><xs:enumeration value='dnd'/><xs:enumeration value='xa'/></xs:restriction></xs:simpleType></xs:element> <xs:element name='status'><xs:complexType><xs:simpleContent><xs:extension base='xs:string'><xs:attribute ref='xml:lang' use='optional'/></xs:extension></xs:simpleContent></xs:complexType></xs:element> <xs:element name='priority' type='xs:byte'/> <xs:element name='iq'><xs:complexType><xs:sequence><xs:anynamespace='##other'minOccurs='0'/><xs:element ref='error'minOccurs='0'/></xs:sequence><xs:attribute name='from'type='xs:string'use='optional'/><xs:attribute name='id'type='xs:NMTOKEN'use='required'/><xs:attribute name='to'type='xs:string'use='optional'/><xs:attribute name='type' use='required'><xs:simpleType><xs:restriction base='xs:NCName'><xs:enumeration value='error'/><xs:enumeration value='get'/><xs:enumeration value='result'/><xs:enumeration value='set'/></xs:restriction></xs:simpleType></xs:attribute><xs:attribute ref='xml:lang' use='optional'/></xs:complexType></xs:element> <xs:element name='error'><xs:complexType><xs:sequencexmlns:err='urn:ietf:params:xml:ns:xmpp-stanzas'><xs:groupref='err:stanzaErrorGroup'/><xs:element ref='err:text'minOccurs='0'/></xs:sequence><xs:attribute name='code' type='xs:byte' use='optional'/><xs:attribute name='type' use='required'><xs:simpleType><xs:restriction base='xs:NCName'><xs:enumeration value='auth'/><xs:enumeration value='cancel'/><xs:enumeration value='continue'/><xs:enumeration value='modify'/><xs:enumeration value='wait'/></xs:restriction></xs:simpleType></xs:attribute></xs:complexType></xs:element> </xs:schema>
<?xml version='1.0' encoding='UTF-8'?> <xs:schemaxmlns:xs='http://www.w3.org/2001/XMLSchema'targetNamespace='jabber:server'xmlns='jabber:server'elementFormDefault='qualified'> <xs:import namespace='urn:ietf:params:xml:ns:xmpp-stanzas'/> <xs:element name='message'><xs:complexType><xs:sequence><xs:choice minOccurs='0' maxOccurs='unbounded'><xs:element ref='subject'/><xs:element ref='body'/><xs:element ref='thread'/></xs:choice><xs:anynamespace='##other'minOccurs='0'maxOccurs='unbounded'/><xs:element ref='error'minOccurs='0'/></xs:sequence><xs:attribute name='from'type='xs:string'use='required'/><xs:attribute name='id'type='xs:NMTOKEN'use='optional'/><xs:attribute name='to'type='xs:string'use='required'/><xs:attribute name='type' use='optional' default='normal'><xs:simpleType><xs:restriction base='xs:NCName'><xs:enumeration value='chat'/><xs:enumeration value='error'/><xs:enumeration value='groupchat'/><xs:enumeration value='headline'/><xs:enumeration value='normal'/></xs:restriction></xs:simpleType></xs:attribute><xs:attribute ref='xml:lang' use='optional'/></xs:complexType></xs:element> <xs:element name='body'><xs:complexType><xs:simpleContent><xs:extension base='xs:string'><xs:attribute ref='xml:lang' use='optional'/></xs:extension></xs:simpleContent></xs:complexType></xs:element> <xs:element name='subject'><xs:complexType><xs:simpleContent><xs:extension base='xs:string'><xs:attribute ref='xml:lang' use='optional'/></xs:extension></xs:simpleContent></xs:complexType></xs:element> <xs:element name='thread' type='xs:NMTOKEN'/> <xs:element name='presence'><xs:complexType><xs:sequence><xs:choice minOccurs='0' maxOccurs='unbounded'><xs:element ref='show'/><xs:element ref='status'/><xs:element ref='priority'/></xs:choice><xs:anynamespace='##other'minOccurs='0'maxOccurs='unbounded'/><xs:element ref='error'minOccurs='0'/></xs:sequence><xs:attribute name='from'type='xs:string'use='required'/><xs:attribute name='id'type='xs:NMTOKEN'use='optional'/><xs:attribute name='to'type='xs:string'use='required'/><xs:attribute name='type' use='optional'><xs:simpleType><xs:restriction base='xs:NCName'><xs:enumeration value='error'/><xs:enumeration value='probe'/><xs:enumeration value='subscribe'/><xs:enumeration value='subscribed'/><xs:enumeration value='unavailable'/><xs:enumeration value='unsubscribe'/><xs:enumeration value='unsubscribed'/></xs:restriction></xs:simpleType></xs:attribute><xs:attribute ref='xml:lang' use='optional'/></xs:complexType></xs:element> <xs:element name='show'><xs:simpleType><xs:restriction base='xs:NCName'><xs:enumeration value='away'/><xs:enumeration value='chat'/><xs:enumeration value='dnd'/><xs:enumeration value='xa'/></xs:restriction></xs:simpleType></xs:element> <xs:element name='status'><xs:complexType><xs:simpleContent><xs:extension base='xs:string'><xs:attribute ref='xml:lang' use='optional'/></xs:extension></xs:simpleContent></xs:complexType></xs:element> <xs:element name='priority' type='xs:byte'/> <xs:element name='iq'><xs:complexType><xs:sequence><xs:anynamespace='##other'minOccurs='0'/><xs:element ref='error'minOccurs='0'/></xs:sequence><xs:attribute name='from'type='xs:string'use='required'/><xs:attribute name='id'type='xs:NMTOKEN'use='required'/><xs:attribute name='to'type='xs:string'use='required'/><xs:attribute name='type' use='required'><xs:simpleType><xs:restriction base='xs:NCName'><xs:enumeration value='error'/><xs:enumeration value='get'/><xs:enumeration value='result'/><xs:enumeration value='set'/></xs:restriction></xs:simpleType></xs:attribute><xs:attribute ref='xml:lang' use='optional'/></xs:complexType></xs:element> <xs:element name='error'><xs:complexType><xs:sequencexmlns:err='urn:ietf:params:xml:ns:xmpp-stanzas'><xs:groupref='err:stanzaErrorGroup'/><xs:element ref='err:text'minOccurs='0'/></xs:sequence><xs:attribute name='code' type='xs:byte' use='optional'/><xs:attribute name='type' use='required'><xs:simpleType><xs:restriction base='xs:NCName'><xs:enumeration value='auth'/><xs:enumeration value='cancel'/><xs:enumeration value='continue'/><xs:enumeration value='modify'/><xs:enumeration value='wait'/></xs:restriction></xs:simpleType></xs:attribute></xs:complexType></xs:element> </xs:schema>
<?xml version='1.0' encoding='UTF-8'?> <xs:schemaxmlns:xs='http://www.w3.org/2001/XMLSchema'targetNamespace='urn:ietf:params:xml:ns:xmpp-session'xmlns='urn:ietf:params:xml:ns:xmpp-session'elementFormDefault='qualified'> <xs:element name='session' type='empty'/> <xs:simpleType name='empty'><xs:restriction base='xs:string'><xs:enumeration value=''/></xs:restriction></xs:simpleType> </xs:schema>
<?xml version='1.0' encoding='UTF-8'?> <xs:schemaxmlns:xs='http://www.w3.org/2001/XMLSchema'targetNamespace='jabber:iq:privacy'xmlns='jabber:iq:privacy'elementFormDefault='qualified'> <xs:element name='query'><xs:complexType><xs:sequence><xs:element ref='active'minOccurs='0'/><xs:element ref='default'minOccurs='0'/><xs:element ref='list'minOccurs='0'maxOccurs='unbounded'/></xs:sequence></xs:complexType></xs:element> <xs:element name='active'><xs:complexType><xs:simpleContent><xs:extension base='xs:NMTOKEN'><xs:attribute name='name'type='xs:string'use='optional'/></xs:extension></xs:simpleContent></xs:complexType></xs:element> <xs:element name='default'><xs:complexType><xs:simpleContent><xs:extension base='xs:NMTOKEN'><xs:attribute name='name'type='xs:string'use='optional'/></xs:extension></xs:simpleContent></xs:complexType></xs:element> <xs:element name='list'><xs:complexType><xs:sequence><xs:element ref='item'minOccurs='0'maxOccurs='unbounded'/></xs:sequence><xs:attribute name='name'type='xs:string'use='required'/></xs:complexType></xs:element> <xs:element name='item'><xs:complexType><xs:sequence><xs:element name='iq'minOccurs='0'type='empty'/><xs:element name='message'minOccurs='0'type='empty'/><xs:element name='presence-in'minOccurs='0'type='empty'/><xs:element name='presence-out'minOccurs='0'type='empty'/></xs:sequence><xs:attribute name='action' use='required'><xs:simpleType><xs:restriction base='xs:NCName'><xs:enumeration value='allow'/><xs:enumeration value='deny'/></xs:restriction></xs:simpleType></xs:attribute><xs:attribute name='order'type='xs:unsignedInt'use='required'/><xs:attribute name='type' use='optional'><xs:simpleType><xs:restriction base='xs:NCName'><xs:enumeration value='group'/><xs:enumeration value='jid'/><xs:enumeration value='subscription'/></xs:restriction></xs:simpleType></xs:attribute><xs:attribute name='value'type='xs:string'use='optional'/></xs:complexType></xs:element> <xs:simpleType name='empty'><xs:restriction base='xs:string'><xs:enumeration value=''/></xs:restriction></xs:simpleType> </xs:schema>
<?xml version='1.0' encoding='UTF-8'?> <xs:schemaxmlns:xs='http://www.w3.org/2001/XMLSchema'targetNamespace='jabber:iq:roster'xmlns='jabber:iq:roster'elementFormDefault='qualified'> <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:sequence><xs:element ref='group'minOccurs='0'maxOccurs='unbounded'/></xs:sequence><xs:attribute name='ask' use='optional'><xs:simpleType><xs:restriction base='xs:NCName'><xs:enumeration value='subscribe'/></xs:restriction></xs:simpleType></xs:attribute><xs:attribute name='jid' type='xs:string' use='required'/><xs:attribute name='name' type='xs:string' use='optional'/><xs:attribute name='subscription' use='optional'><xs:simpleType><xs:restriction base='xs:NCName'><xs:enumeration value='both'/><xs:enumeration value='from'/><xs:enumeration value='none'/><xs:enumeration value='remove'/><xs:enumeration value='to'/></xs:restriction></xs:simpleType></xs:attribute></xs:complexType></xs:element> <xs:element name='group' type='xs:string'/> </xs:schema>