[Standards] XEP-0372 references pointing to different elements in same stanza

JC Brand lists at opkode.com
Wed Sep 1 09:17:08 UTC 2021

On 31.08.21 17:23, Jonas Schäfer wrote:
> Libraries which currently represent body as a
> (mappnig of language tags to) string(s) would now need extra magic in order to
> be able to set ID attributes on those. This feels like a quite major change,
> and not just to References, but to literally everything else.

Do you know of any such libraries in existence?

XEPs are expected to maintain backwards compatibility (i.e. not break 
old clients), but forwards compatibility (providing their features to 
old clients) is not required.
My proposal won't break such a library, it just won't have my proposed 
disambiguation feature for XEP-0372.


I did some digging, and XEP-0274 "Design Considerations for Digital 
Signatures" uses the same mechanism that I'm proposing.
See here: https://xmpp.org/extensions/xep-0274.html#manifest

An "id" attribute is put on the  <body/> and the <reference/> element 
has a URI attribute that points to it.

XEP-0290 does something similar. A prefixed namespace attribute is put 
on the <body/> (e.g. <body xmlns:d="urn:xmpp:dsig:0" d:id="xxxx-2">) and 
then used in the <reference/>.

So I'm not the first person to think of using references in this way.

Funnily enough, in both cases they're using the URI attribute, which to 
my understanding of XEP-0372 is wrong. The "anchor" is used to identify 
the referenced element, and the "URI" is what the referenced text is 
pointing to.

- JC

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.jabber.org/pipermail/standards/attachments/20210901/fa9c6804/attachment.html>

More information about the Standards mailing list