[Standards-JIG] JEP-0071: class and rel attributes

Peter Saint-Andre stpeter at jabber.org
Fri Jul 21 20:09:26 UTC 2006

Ian Paterson wrote:
>> I've realized that it would be cool for XHTML-IM [2]
>> to be able to embed microformats
> Please can you explain why.

Why not? In fact it can be done now since 'class' and 'rel' are only
discouranged (not forbidden), but I think there are some interesting
possibilities here since microformats are beginning to take off (e.g.,
Yahoo Local now supports them).

> AFAICT, Microformats don't seem to fit with XHTML-IM's purpose. i.e.
> "lightweight text markup" and "minimal structural elements and
> presentational styles that can easily be rendered". IIRC this list
> agreed that XHTML-IM is targeted towards styling typical short IM messages.

Well it might be nice to send something like this:

  <body><-- http://www.saint-andre.com/</body>
  <html xmlns='http://jabber.org/protocol/xhtml-im'>
    <body xmlns='http://www.w3.org/1999/xhtml'>
        <-- <a href='http://www.saint-andre.com/' rel='me'>

(i.e., here's a URL and it's about me)


  <body>Jer's blog is at http://jeremie.com/blog/</body>
  <html xmlns='http://jabber.org/protocol/xhtml-im'>
    <body xmlns='http://www.w3.org/1999/xhtml'>
        Jer's blog is at
        <a href='http://jeremie.com/blog/' rel='friend met'>

(with the "friend met" being added based on automated processing, e.g.
he is in my roster + address book with that URL connected to the fact
that he's a friend of mine and I've met him in person)

or your calendaring service could send you a reminder for an appointment:

  <body>Don't forget! You have a 2:00 appointment at the Argent
  <html xmlns='http://jabber.org/protocol/xhtml-im'>
    <body xmlns='http://www.w3.org/1999/xhtml'>
        Don't forget! You have an appointment from
        <span class="dtstart">2:00</abbr> to
        <span class="dtend">4:00</abbr>
        at the <span class="location">Argent Hotel</span>

Other potential use cases include:

- Tagging: http://microformats.org/wiki/rel-tag

- Contact info: http://microformats.org/wiki/hcard

- Sharing bookmarks: http://microformats.org/wiki/xfolk

> Many XHTML rendering agents will try to interpret the 'class' attribute
> as a CSS style (even if the XHTML spec technically allows other uses for
> 'class').

So those rendering agents violate the XHTML spec.

> Wasn't there some discussion of the possibility of a second XHTML JEP
> for larger (email-like) messages? Perhaps that is the best home for
> Microformats?

I think not, given that all we're talking about here is the class
attribute and the rel attribute (which are part of modules we already
support). The possible big XHTML JEP was for including markup from other
modules, such as forms (i.e., it would be a different Integration Set).
I don't see that we need or want a separate Integration Set in order to
no longer discourage the use of class and rel. I don't think we'd make
support for class and rel required or even recommended, but optional
seems appropriate if developers want to experiment with microformats
integration. Processing entities that don't understand those attributes
must ignore them anyway -- the W3C says "If a user agent encounters an
attribute it does not recognize, it must ignore the entire attribute
specification (i.e., the attribute and its value)."

Also of interest:


(Nothing about XMPP there!!!)

Another example (not wire protocol, but still intriguing): if I am
registered with a chatroom, it could mark up the chat logs with a
hyperlink to my JID so that people reading the logs could contact me
about what I said:

  <a name='#161211a'>[16:12:11]</a>
  <<a href='xmpp:stpeter at jabber.org?message'>stpeter</a>>
   yes, we seem to be agreed on SVG

(It could even put a subject line in there with a pointer to the full
URL of the comment in the log, but I've left that out for the sake of


Let's integrate with the other exciting stuff happening out there!


Peter Saint-Andre
Jabber Software Foundation

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 7358 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mail.jabber.org/pipermail/standards/attachments/20060721/427cf66b/attachment.bin>

More information about the Standards mailing list