Removed alt attribute; more clearly specified where to include the data element in message, presence, and IQ stanzas; moved use cases to other specifications; removed service discovery features; modified examples.
Generalized text regarding inclusion of parameters in type attribute per RFC 2045; added max-age attribute, matching semantics from RFC 2965; added section on caching of data; more clearly specified generation of Content-ID.
The following example illustrates the format (line endings are provided for readability only).
When the <data/> element is included in an XMPP &MESSAGE; or &PRESENCE; stanza, it SHOULD be included as a first-level child of the stanza.
+When the <data/> element is included in an XMPP &IQ; stanza for data retrieval, it MUST be included as a first-level child of the stanza.
+When the <data/> element is included in an XMPP &IQ; stanza to refer to the data, it MUST be included as a second-level child of the stanza.
A receiving entity MUST cache based on the JID of the sending entity; this helps to prevent certain data poisoning attacks.
The <data/> element can be used in conjunction with &xep0071; and the cid: URL scheme to point to binary data that is provided in-band within a &MESSAGE; stanza.
-Note: The sender SHOULD NOT include an in-band image unless the intended recipient advertises (via &xep0030; or &xep0115;) support for the "urn:xmpp:tmp:data-element:inband-image" service discovery feature &NSNOTE;.
-Data can be requested and transferred using the XMPP &IQ; stanza type by making reference to the 'cid' of the data to be retrieved. In particular, the requesting entity can request data by sending an IQ-get containing an empty <data/> element with a 'cid' attribute.
+The responding entity then would either return an error (e.g., ¬found; if it does not have data matching the Content-ID) or return the data.
+This specification does not place limits on the entities from which data can be requested. In particular, such an entity need not be the "owner" of the data (e.g., it could be a peer in a chatroom or whiteboarding session, or the chatroom or whiteboarding service itself).
+In addition, bits of data could be hosted by XMPP servers, distributed via &xep0060; nodes, or included in data collections that are available via HTTP (e.g., emoticon sets). Such data could be identified by the value of the 'cid' attribute, but methods for specifying those values are out of scope for this specification.
+As an example, consider the use of the <data/> element in conjunction with &xep0071;. Here the cid: URL scheme points to a data element within a &MESSAGE; stanza.
+