Playing around typing out example hat payloads, I noticed that they feel a lot 
like disco identities.

So for what the hat payload format should be, I'm inclined to use a variation 
of formats 1 and 2, with 
s/name/type/ and s/display/name/:

  <hats xmlns="urn:xmpp:hats:0">
    <hat type="http://example.com/hats#Foo"; name="Displayable name" 
xml:lang="en" />
  </hats>

or even:

  <hats xmlns="urn:xmpp:hats:0">
    <identity type="http://example.com/hats#Foo"; name="Displayable name" 
xml:lang="en" />
  </hats>

I would prefer using name instead of display or displayName since that's the 
pattern we've used
more often in the past for human presentable labels.

Given that hats are sent via presence, I'm not sure how valuable being able to 
discover them via 
disco would be, but the formats like the above map very nicely to disco 
identities.

<query xmlns="http://jabber.org/protocol/disco#info"; 
node="urn:xmpp:hats:something">
  <identity category="hat" type="http://example.com/hats#Foo"; name="Displayable 
name" xml:lang="en" />
</query>


Other notes:

1. Security considerations should include that hats must always be stamped on 
by the MUC, not by the end user.
2. Noting that multiple versions of the same hat may be included with different 
displayable names so 
   long as the xml:lang value differs. This is a very established pattern, but 
none of the examples showcase it,
   so never hurts to be explicit about it.


-- Lance

On Jan 3, 2013, at 2:53 PM, XMPP Extensions Editor <edi...@xmpp.org> wrote:

> Version 0.1 of XEP-0317 (Hats) has been released.
> 
> Abstract: This specification defines a more extensible model for roles and 
> affiliations in Multi-User Chat rooms.
> 
> Changelog: Initial published version approved for publication by the XMPP 
> Council; clarified ad-hoc commands logic and syntax. (psa)
> 
> Diff: N/A
> 
> URL: http://xmpp.org/extensions/xep-0317.html
> 

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to