mirror of
https://github.com/moparisthebest/xeps
synced 2024-11-22 01:02:17 -05:00
PubSub Server Info: refactored data format
Following discussion with Flow, MattJ and Jonas`, the data format was modified to: - group connections under a remote domain - use attributes instead of elements where appropriate
This commit is contained in:
parent
da26a65685
commit
7f522c35fa
@ -68,36 +68,36 @@
|
|||||||
</iq>]]></example>
|
</iq>]]></example>
|
||||||
</section1>
|
</section1>
|
||||||
<section1 topic="Data Format" anchor="impl">
|
<section1 topic="Data Format" anchor="impl">
|
||||||
<p>The data format uses an element named 'serverinfo' in the namespace 'urn:xmpp:serverinfo:0'. In its minimal form, it only defines the XMPP domain name in a child-element named 'domain'.</p>
|
<p>The data format uses an element named 'serverinfo' in the namespace 'urn:xmpp:serverinfo:0'. In its minimal form, it defines each XMPP domain name served by the local server in an attribute named 'name'.</p>
|
||||||
<example caption="Minimal Data Format"><![CDATA[
|
<example caption="Minimal Data Format"><![CDATA[
|
||||||
<serverinfo xmlns='urn:xmpp:serverinfo:0'>
|
<serverinfo xmlns='urn:xmpp:serverinfo:0'>
|
||||||
<domain>shakespeare.lit</domain>
|
<domain name='shakespeare.lit'/>
|
||||||
</serverinfo>]]></example>
|
</serverinfo>]]></example>
|
||||||
<p>The optional 'federation' child element is used to denote remote XMPP domains with which the local domain is federating. Each actual (eg TCP) connection to a federated domain is added as a 'connection' child-element to the 'federation' element, that has an optional 'type' attribute, defining the directionality of the connection (one of 'incoming', 'outgoing' and 'bidi'). The domain name of the remote XMPP domain is added in a 'domain' child element.</p>
|
<p>The optional 'federation' child element is used to denote remote XMPP domains with which the local domain is federating. Each of them are represented by an element named 'remote-domain'. The domain name of the peer in an attribute named 'name'. Optionally, each actual (e.g. TCP) connection from the local server to the peer is added as a 'connection' child-element to the 'remote-domain' element, that has an optional 'type' attribute, defining the directionality of the connection (one of 'incoming', 'outgoing' and 'bidi').</p>
|
||||||
<example caption="Data Format with Federated Domains"><![CDATA[
|
<example caption="Data Format with Federated Domains"><![CDATA[
|
||||||
<serverinfo xmlns="urn:xmpp:serverinfo:0">
|
<serverinfo xmlns="urn:xmpp:serverinfo:0">
|
||||||
<domain>shakespeare.lit</domain>
|
<domain name="shakespeare.lit">
|
||||||
<federation>
|
<federation>
|
||||||
<connection type="incoming">
|
<remote-domain name='denmark.li'>
|
||||||
<domain>denmark.lit</domain>
|
<connection type="incoming"/>
|
||||||
</connection>
|
<connection type="outgoing"/>
|
||||||
<connection type="bidi">
|
</remote-domain>
|
||||||
<domain>montague.net</domain>
|
<remote-domain name='montague.net'>
|
||||||
</connection>
|
<connection type="bidi"/>
|
||||||
<connection type="outgoing">
|
</remote-domain>
|
||||||
<domain>capulet.com</domain>
|
|
||||||
</connection>
|
|
||||||
</federation>
|
</federation>
|
||||||
|
</domain>
|
||||||
</serverinfo>]]></example>
|
</serverinfo>]]></example>
|
||||||
<p>Additional data MAY be included in child-elements of the 'server-info' element. Such data MUST be namespaced appropriately. The example below uses the 'query' element defined in &xep0092; to include information about the software application associated with the local domain.</p>
|
<p>Additional data MAY be included as child-elements of the 'server-info' element or any of the 'domain' elements. Such data MUST be namespaced appropriately. The example below uses the 'query' element defined in &xep0092; to include information about the software application associated with the local server.</p>
|
||||||
<example caption="Data Format with Software Version"><![CDATA[
|
<example caption="Data Format with Software Version"><![CDATA[
|
||||||
<serverinfo xmlns="urn:xmpp:serverinfo:0">
|
<serverinfo xmlns="urn:xmpp:serverinfo:0">
|
||||||
<domain>shakespeare.lit</domain>
|
<domain name="shakespeare.lit">
|
||||||
<federation>
|
<federation>
|
||||||
<connection type="incoming">
|
<remote-domain name='montague.net'>
|
||||||
<domain>denmark.lit</domain>
|
<connection type="bidi"/>
|
||||||
</connection>
|
</remote-domain>
|
||||||
</federation>
|
</federation>
|
||||||
|
</domain>
|
||||||
<query xmlns='jabber:iq:version'>
|
<query xmlns='jabber:iq:version'>
|
||||||
<name>Openfire</name>
|
<name>Openfire</name>
|
||||||
<version>4.8.0</version>
|
<version>4.8.0</version>
|
||||||
@ -116,18 +116,17 @@
|
|||||||
<publish node='serverinfo'>
|
<publish node='serverinfo'>
|
||||||
<item id='current'>
|
<item id='current'>
|
||||||
<serverinfo xmlns="urn:xmpp:serverinfo:0">
|
<serverinfo xmlns="urn:xmpp:serverinfo:0">
|
||||||
<domain>shakespeare.lit</domain>
|
<domain name="shakespeare.lit">
|
||||||
<federation>
|
<federation>
|
||||||
<connection type="incoming">
|
<remote-domain name='denmark.li'>
|
||||||
<domain>denmark.lit</domain>
|
<connection type="incoming"/>
|
||||||
</connection>
|
<connection type="outgoing"/>
|
||||||
<connection type="bidi">
|
</remote-domain>
|
||||||
<domain>montague.net</domain>
|
<remote-domain name='montague.net'>
|
||||||
</connection>
|
<connection type="bidi"/>
|
||||||
<connection type="outgoing">
|
</remote-domain>
|
||||||
<domain>capulet.com</domain>
|
|
||||||
</connection>
|
|
||||||
</federation>
|
</federation>
|
||||||
|
</domain>
|
||||||
</serverinfo>
|
</serverinfo>
|
||||||
</item>
|
</item>
|
||||||
</publish>
|
</publish>
|
||||||
@ -166,6 +165,8 @@
|
|||||||
</xs:documentation>
|
</xs:documentation>
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
|
|
||||||
|
<xs:element name="serverinfo" type="urn:serverinfoType" xmlns:urn="urn:xmpp:serverinfo:0"/>
|
||||||
|
|
||||||
<xs:simpleType name="directionType" final="restriction" >
|
<xs:simpleType name="directionType" final="restriction" >
|
||||||
<xs:restriction base="xs:string">
|
<xs:restriction base="xs:string">
|
||||||
<xs:enumeration value="incoming" />
|
<xs:enumeration value="incoming" />
|
||||||
@ -174,33 +175,45 @@
|
|||||||
</xs:restriction>
|
</xs:restriction>
|
||||||
</xs:simpleType>
|
</xs:simpleType>
|
||||||
|
|
||||||
<xs:element name="serverinfo">
|
<xs:complexType name="connectionType">
|
||||||
<xs:complexType>
|
<xs:simpleContent>
|
||||||
<xs:sequence>
|
<xs:extension base="xs:string">
|
||||||
<xs:element type="xs:string" name="domain"/>
|
|
||||||
<xs:element name="federation" use="optional">
|
|
||||||
<xs:complexType>
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element name="connection" maxOccurs="unbounded" minOccurs="0">
|
|
||||||
<xs:complexType>
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element type="xs:string" name="domain"/>
|
|
||||||
</xs:sequence>
|
|
||||||
<xs:attribute type="directionType" name="type" use="optional"/>
|
<xs:attribute type="directionType" name="type" use="optional"/>
|
||||||
|
</xs:extension>
|
||||||
|
</xs:simpleContent>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
</xs:element>
|
|
||||||
|
<xs:complexType name="remote-domainType">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element type="urn:connectionType" name="connection" maxOccurs="unbounded" minOccurs="0" xmlns:urn="urn:xmpp:serverinfo:0"/>
|
||||||
|
</xs:sequence>
|
||||||
|
<xs:attribute type="xs:string" name="name" use="optional"/>
|
||||||
|
</xs:complexType>
|
||||||
|
|
||||||
|
<xs:complexType name="federationType">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element type="urn:remote-domainType" name="remote-domain" maxOccurs="unbounded" minOccurs="0" xmlns:urn="urn:xmpp:serverinfo:0"/>
|
||||||
</xs:sequence>
|
</xs:sequence>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
</xs:element>
|
|
||||||
|
<xs:complexType name="domainType">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element type="urn:federationType" name="federation" xmlns:urn="urn:xmpp:serverinfo:0"/>
|
||||||
|
</xs:sequence>
|
||||||
|
<xs:attribute type="xs:string" name="name"/>
|
||||||
|
</xs:complexType>
|
||||||
|
|
||||||
|
<xs:complexType name="serverinfoType">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element type="urn:domainType" name="domain" xmlns:urn="urn:xmpp:serverinfo:0"/>
|
||||||
</xs:sequence>
|
</xs:sequence>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
</xs:element>
|
|
||||||
|
|
||||||
</xs:schema>
|
</xs:schema>
|
||||||
]]></code>
|
]]></code>
|
||||||
</section1>
|
</section1>
|
||||||
<section1 topic='Acknowledgements' anchor='acknowledgements'>
|
<section1 topic='Acknowledgements' anchor='acknowledgements'>
|
||||||
<p>Inspiration was taken from the (now defunct) 'server info' crawler by Thomas Leister. Many thanks to Dave Cridland, as well as 'zoidberg' from the Ignite Realtime community for helping to test the initial implementation of a graphing implementation based on this XEP.</p>
|
<p>Inspiration was taken from the (now defunct) 'server info' crawler by Thomas Leister. Many thanks to Dave Cridland, as well as 'zoidberg' and 'chewie' from the Ignite Realtime community for helping to test the initial implementation of a graphing implementation based on this XEP and to Florian Schmaus, Matthew Wild and Jonas Schäfer for their feedback on the earliest drafts of this document.</p>
|
||||||
</section1>
|
</section1>
|
||||||
|
|
||||||
</xep>
|
</xep>
|
||||||
|
Loading…
Reference in New Issue
Block a user