[Standards-JIG] Re: XHTML-IM clarification

Peter Saint-Andre stpeter at jabber.org
Tue Sep 14 16:14:07 UTC 2004

In article <20040914063313.GF25704 at dev.xaoza.net>, trejkaz at xaoza.net 

> Section 8.6.1 Recommended Style Properties:
> > The property is unnecessary since it can be emulated via user input or 
> > recommended XHTML
> > stuctural elements (e.g., the "text-transform" property can be emulated by 
> > the user's
> > keystrokes or use of the caps lock key, and the "white-space" property can 
> > be emulated
> > by judicious use of the <br/> element).
> This should say "judicious use of the <br/> element *and non-breaking 
> spaces*"... 

Well, this brings up an interesting issue. The XML rules in XMPP Core 
(Section 11.1) state that internal or external entity references (e.g., 
 ) are disallowed in an XML stream, with the exception of the 
predefined entities from the XML spec (e.g., &). So the "&" 
character in something like   (or  ) will be escaped to 

> the CSS
> "white-space: preserve" would cause horizontal whitespace as well as vertical 
> whitespace
> to be preserved (such as in a <pre/> block.)

Unfortunately, as I discovered recently while making changes to jep.xsl 
and jep.css, the CSS1 spec allows a user agent to disregard the 
"white-space" property, so it's pretty much useless.
> Actually, when it comes to instant messaging, you could say that whitespace 
> preservation
> is a given.  Users generally won't press space 8 times unless they want an 
> indent.
> Whitespace is already preserved for the <body/> of plain text messages in 
> every client
> I've ever used, so why don't we just recommend that user agents preserve 
> whitespace by
> default for XHTML message bodies, and save all those extra <br/> elements 
> which would need
> to be performed otherwise?

I'm not opposed to this but would like to think about it some more.

> I'm also curious as to why we use our own namespace for the <html/> but 
> XHTML's namespace
> for the body.  There don't seem to be any attributes on that <body/>, and our 
> <html/>
> already performs the job of a container, so couldn't the contents go directly 
> inside our
> <html/> element?

This explained in JEP-0071. According to the XMPP specs (Section 
of XMPP-IM), a message stanza may contain more than one <body/> element 
(but only if each one possesses a distinct value of the 'xml:lang' 
attribute). So we need multiple XHTML <body/> elements to mirror the 
XMPP usage.


More information about the Standards mailing list