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

JC Brand lists at opkode.com
Fri Sep 10 06:31:41 UTC 2021

On 09.09.21 19:15, Kevin Smith wrote:
>> On 9 Sep 2021, at 18:06, Florian Schmaus <flo at geekplace.eu> wrote:
>> On 13/08/2021 14.00, JC Brand wrote:> <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>
>> Why is there a number sign ('#') before the element name? What if there is another first-level stanza child element with a local name 'subject' but a different namespace?
> It’s not the element name, it’s just (possibly unfortunately) the same in that example. It’s the id.

Yes, it's not the element name, it's a URI fragment pointing to the 
element id.

Due to my poor choice of ID, people got confused. So here's a new example:

<message type="headline" from="school at springfield.city">
     <subject id="12345">Attention Bart Simpson</subject>
     <body id="6789">Please hand in your homework before the end of the day</body>
     <reference anchor="#12345" begin="9" end="21" type="mention"/>

More information about the Standards mailing list