On 13/08/2021 14.00, JC Brand wrote:> <message type="headline" from="sch...@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?

I am happy to ignore the existence of xml:lang for now, but I think the 'anchor' attribute value should be specified to be either in Clark notation, or, if not, reference first-level stanza child elements by their localname with the same namespace as the stanza. So your example becomes

<message type="headline" from="sch...@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>

and, in case of a theoretical <subject xmlns='foo'> element.

<message type="headline" from="sch...@springfield.city">
    <subject xmlns='foo' id="subject">Attention Bart Simpson</subject>
<body id="body">Please hand in your homework before the end of the day</body>
    <reference anchor="{foo}subject" begin="9" end="21" type="mention"/>
</message>

- Florian

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

_______________________________________________
Standards mailing list
Info: https://mail.jabber.org/mailman/listinfo/standards
Unsubscribe: standards-unsubscr...@xmpp.org
_______________________________________________

Reply via email to