This commit is contained in:
Peter Saint-Andre 2012-11-28 09:24:10 -07:00
parent 0b1b8f6ae5
commit 847dde986e
1 changed files with 11 additions and 3 deletions

View File

@ -36,6 +36,12 @@
<url>http://www.xmpp.org/schemas/xhtml-im-model.xsd</url>
</schemaloc>
&stpeter;
<revision>
<version>1.5</version>
<date>2012-11-28</date>
<initials>psa</initials>
<remark><p>Addressed feedback received during Call for Experience: (1) generalized business rule about not adding XHTML rendering in the receiving client, (2) modified business rule about structure vs. style to recommend structural elements.</p></remark>
</revision>
<revision>
<version>1.4</version>
<date>2008-09-03</date>
@ -355,7 +361,9 @@
<p>Because it is unlikely that an instant messaging user would generate a definition list, only ordered and unordered lists are RECOMMENDED. Definition lists SHOULD NOT be generated by a compliant implementation, and SHOULD be ignored if received (where the meaning of "ignore" is defined by the conformance requirements of <cite>Modularization of XHTML</cite>, as summarized in the <link url="#w3c-conformance">User Agent Conformance</link> section of this document).</p>
</section2>
<section2 topic='Image Module Profile' anchor='profile-image'>
<p>The only recommended attributes of the &lt;img/&gt; element are specified in the <link url="#profile-attributes">Recommended Attributes</link> section of this document. In addition, for security reasons or because of display constraints, a compliant client MAY choose to display 'alt' text only, not the image itself (for details, see the <link url='#security-code'>Malicious Objects</link> section of this document).</p>
<p>The only recommended attributes of the &lt;img/&gt; element are specified in the <link url="#profile-attributes">Recommended Attributes</link> section of this document.</p>
<p>The XHTML specification allows a "data:" URL &rfc2397; as the value of the 'src' attribute. This is NOT RECOMMENDED for use in XHTML-IM, because it can significantly increase the size of the message stanza and XMPP is not optimized for large stanzas. If the image data is small (less than 8 kilobytes), clients MAY use &xep0231; in coordination with XHTML-IM; if the image data is large, the value of the 'src' SHOULD be a pointer to an externally available file for the image (or the sender SHOULD use a dedicated file transfer method such as &xep0047; or &xep0065;).</p>
<p>For security reasons or because of display constraints, a compliant client MAY choose to display 'alt' text only, not the image itself (for details, see the <link url='#security-code'>Malicious Objects</link> section of this document).</p>
</section2>
<section2 topic='Style Attribute Module Profile' anchor='profile-style'>
<p>This module MUST be supported in XHTML-IM if possible; although clients written for certain platforms (e.g., console clients, mobile phones, and handheld computers) or for certain classes of users (e.g., text-to-speech clients) might not be able to support all of the recommended styles directly, they SHOULD attempt to emulate or translate the defined style properties into text or other presentation styles that are appropriate for the platform or user base in question.</p>
@ -570,10 +578,10 @@
<li><p><cite>XMPP Core</cite> specifies that an XMPP &MESSAGE; MAY contain more than one &lt;body/&gt; child as long as each &lt;body/&gt; possesses an 'xml:lang' attribute with a distinct value. In order to ensure correct internationalization, if an XMPP &MESSAGE; stanza contains more than one &lt;body/&gt; child and is also sent as XHTML-IM, the &lt;html/&gt; element SHOULD also contain more than one &lt;body/&gt; child, with one such element for each &lt;body/&gt; child of the &MESSAGE; stanza (distinguished by an appropriate 'xml:lang' attribute).</p></li>
<li><p>Section 11.1 of <cite>XMPP Core</cite> stipulates that character entities other than the five general entities defined in Section 4.6 of the XML specification (i.e., &amp;lt;, &amp;gt;, &amp;amp;, &amp;apos;, and &amp;quot;) MUST NOT be sent over an XML stream. Therefore implementations of XHTML-IM MUST NOT include predefined XHTML 1.0 entities such as &amp;nbsp; -- instead, implementations MUST use the equivalent character references as specified in Section 4.1 of the XML specification (even in non-obvious places such as URIs that are included in the 'href' attribute).</p></li>
<li><p>For elements and attributes qualified by the 'http://www.w3.org/1999/xhtml' namespace, user agent conformance is guided by the requirements defined in <cite>Modularization of XHTML</cite>; for details, refer to the <link url="#w3c-conformance">User Agent Conformance</link> section of this document.</p></li>
<li><p>The use of structural elements is NOT RECOMMENDED where presentational styles are desired, which is why very few structural elements are specified herein. Implementations SHOULD use appropriate 'style' attributes (e.g., &lt;span style='font-weight: bold'&gt;this is bold&lt;/span&gt; and &lt;p style='margin-left: 5%'&gt;this is indented&lt;/p&gt;) rather than XHTML structural elements (e.g., &lt;strong/&gt; and &lt;blockquote/&gt;) wherever possible.</p></li>
<li><p>Where strictly presentational style are desired (e.g., colored text), it might be necessary to use 'style' attributes (e.g., &lt;span style='font-color: green'&gt;this is green&lt;/span&gt;). However, where possible it is instead RECOMMENDED to use appropriate structural elements (e.g., &lt;strong/&gt; and &lt;blockquote/&gt; instead of, say, style='font-weight: bold' or style='margin-left: 5%').</p></li>
<li><p>Nesting of block structural elements (&lt;p/&gt;) and list elements (&lt;dl/&gt;, &lt;ol/&gt;, &lt;ul/&gt;) is NOT RECOMMENDED, except within &lt;div/&gt; elements.</p></li>
<li><p>It is RECOMMENDED for implementations to replace line breaks with the &lt;br/&gt; element and to replace significant whitepace with the appropriate number of non-breaking spaces (via the NO-BREAK SPACE character or its equivalent), where "significant whitespace" means whitespace that makes some material difference (e.g., one or more spaces at the beginning of a line or more than one space anywhere else within a line), not "normal" whitespace separating words or punctuation.</p></li>
<li><p>When rendering XHTML-IM content, a user agent SHOULD NOT render as a hyperlink text that is not structured via the &lt;a/&gt; element from the Hypertext Module; therefore if the sender wishes text to be linked, the sending user agent MUST represent the text using the &lt;a/&gt; element and appropriate attributes.</p></li>
<li><p>When rendering XHTML-IM content, a receiving user agent MUST NOT render as XHTML any text that was not structured by the sending user agent using XHTML elements and attributes; if the sender wishes text to be structured (e.g., for certain words to be emphasized or for URIs to be linked), the sending user agent MUST represent the text using the appropriate XHTML elements and attributes.</p></li>
</ol>
</section1>
<section1 topic='Examples' anchor='examples'>