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

Jonas Schäfer jonas at wielicki.name
Tue Aug 31 15:23:18 UTC 2021


Hi JC,

This has somehow slipped past me.

On Freitag, 13. August 2021 14:00:06 CEST JC Brand wrote:
> So, if you have a stanza with for example, both "subject" and "body"
> tags, we can have references for both, and use the "anchor" attribute as
> follows (I hope this comes out formatted properly once sent):
> 
> <message type="headline" from="school at springfield.city">
>      <subject id="subject">Attention Bart Simpson</subject>
>      <body id="body">Please hand in your homework before the end of the
> day</body>
>      <reference anchor="#subject" begin="9" end="21" type="mention"/>
> </message>

What about messages with multiple <body/> elements disambiguated by xml:lang? 
Could some conceivably contain a mention while others don't? Does this require 
replicating the mention element all over? Same question for <subject/>.

Besides that, I don't think that adding an attribute to an element in this way 
is really acceptable.

I would prefer an approach which identifies the XML element without having to 
modify the XML being referenced. 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.

kind regards,
Jonas

   [1]: https://www.w3.org/TR/REC-xml/#id
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.jabber.org/pipermail/standards/attachments/20210831/b2f871c0/attachment.sig>


More information about the Standards mailing list