If a client implements references, it MUST specify the 'urn:xmpp:reference:0' feature in its service discovery information features as specified in &xep0030; and the Entity Capabilities profile specified in &xep0115;.
-If an entity implements references, it MUST specify the 'urn:xmpp:reference:1' feature in its service discovery information features as specified in &xep0030; and the Entity Capabilities profile specified in &xep0115;.
+ +If the entity is also implementing specific references profiles, it MUST expose the specific feature defined in the related type.
-TODO: Individual discovery of reference types - FDP, Mentions, ...
+ ]]>References are provided in a 'reference' element of a message, with a namespace of 'urn:xmpp:reference:0'. The element MUST contain a 'type' attribute denoting the type of the reference and a 'uri' attribute of the thing that is referenced. It MAY contain 'begin', 'end' and 'anchor' elements.
-The 'begin' and 'end' attributes are indexes denoting the beginning and end of the referenced substring in the message body. The Dijkstra convention of ranges
An 'anchor' attribute is used when the referring message is not the one containing the reference element, and points to the previous message containing the reference (the referring message).
-Note that the URIs of the reference and anchor do not need to refer to the same mechanism as that in which the reference was received. E.g., a service could listen for mentions in a MIX channels of users outside that channel, and send them messages containing a reference to let them know that they've been mentioned.
-Mentions are a reference to a user's bare JID, and have a type of 'mention'.
-References are provided in a 'reference' element of a message, with a namespace of 'urn:xmpp:reference:1'. The element MUST contain a 'type' attribute denoting the type of the reference. Other profile specific attributes MAY be specified. It also MAY contain 'begin', 'end', 'hreflang' and 'anchor' elements.
+ +The character counting is done as specified in &xep0426;. Implementations SHOULD NOT send multiple references with overlapping ranges.
+An 'anchor' attribute is used when the referring message is not the one containing the reference element, and points to the previous message containing the reference (the referring message). Its value is an URI pointing to the reffering message.
+Note that the URIs of the reference and anchor do not need to refer to the same mechanism as that in which the reference was received. E.g., a service could listen for mentions in a MIX channels of users outside that channel, and send them messages containing a reference to let them know that they've been mentioned.
+An implementation MAY use the 'hreflang' attribute to target a message with the corresponding 'xml:lang' attribute, when 'begin' and 'end' attributes are specified.
+Data references are a generic reference without additional information. The URI points to an 'item' that is able to be fetched. This is useful for, for example, fetching an item from pubsub, as in the example below. TODO: check URI syntax for refering to a pubsub item.
+Data references are a generic reference without additional information. The reference element MUST contain a 'uri' attribute that points to an 'item' that is able to be fetched. This is useful for, for example, fetching an item from Pubsub as defined in Publish-Subscribe (XEP-0060) - Pubsub URIs.
Sometimes it's desirable to annotate a reference in a previous message. An example of this might be where a MIX channel asynchronously adds information about references made in previous messages by users. In this case the message MUST NOT contain a body. Here the anchor attribute is used to provide a URI to the previous message. TODO: URI scheme for messages.
+Sometimes it's desirable to annotate a reference in a previous message. An example of this might be where a MIX channel asynchronously adds information about references made in previous messages by users. In this case the message MUST NOT contain a body. Here the anchor attribute is used to provide a URI to the previous message.
Needs a namespace.
When advanced.
+The following schema defines the base reference element.
+
+
+
+
+
+
+ This schema defines the reference element specified in XEP-0372: Reference
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+]]>
+