1
0
mirror of https://github.com/moparisthebest/xeps synced 2024-11-24 10:12:19 -05:00
git-svn-id: file:///home/ksmith/gitmigration/svn/xmpp/trunk@2129 4b5297f7-1745-476d-ba37-a9c6900126ab
This commit is contained in:
Peter Saint-Andre 2008-08-06 16:20:23 +00:00
parent 6386c56c7a
commit c286c81ef9

View File

@ -36,6 +36,12 @@
<url>http://www.xmpp.org/schemas/xhtml-im-model.xsd</url> <url>http://www.xmpp.org/schemas/xhtml-im-model.xsd</url>
</schemaloc> </schemaloc>
&stpeter; &stpeter;
<revision>
<version>1.4pre1</version>
<date>in progress, last updated 2008-08-06</date>
<initials>psa</initials>
<remark><p>Encouraged support for several more structural elements from the text module (blockquote, cite, em, and strong); further clarified security considerations regarding fetching and presentation of images; modified several examples; clarified several points throughout the text.</p></remark>
</revision>
<revision> <revision>
<version>1.3</version> <version>1.3</version>
<date>2007-08-29</date> <date>2007-08-29</date>
@ -176,7 +182,8 @@
</revision> </revision>
</header> </header>
<section1 topic='Introduction' anchor='intro'> <section1 topic='Introduction' anchor='intro'>
<p>This document defines methods for exchanging instant messages that contain lightweight text markup. In the context of this document, "lightweight text markup" is to be understood as a combination of minimal structural elements and presentational styles that can easily be rendered on a wide variety of devices without requiring a full rich-text rendering engine such as a web browser. Examples of lightweight text markup include basic text blocks (e.g., paragraphs), lists, hyperlinks, image references, and font styles (e.g., sizes and colors).</p> <p>This document defines methods for exchanging instant messages that contain lightweight text markup. In the context of this document, "lightweight text markup" is to be understood as a combination of minimal structural elements and presentational styles that can easily be rendered on a wide variety of devices without requiring a full rich-text rendering engine such as a web browser. Examples of lightweight text markup include basic text blocks (e.g., paragraphs and blockquotes), structural elements (e.g., emphasis and strength), lists, hyperlinks, image references, and font styles (e.g., sizes and colors).</p>
<p>Note: This specification essentially defines a recommended set of XHTML elements and attributes for use in instant messaging by applying a series of "filters" to the wealth of XHTML features; however, developers of Jabber/XMPP clients mainly need to pay attention to the <link url='#profile-summary'>Summary of Recommendations</link> rather than the complexities of how the recommendations are derived.</p>
</section1> </section1>
<section1 topic='Choice of Technology' anchor='tech'> <section1 topic='Choice of Technology' anchor='tech'>
<p>In the past, there have existed several incompatible methods within the Jabber community for exchanging instant messages that contain lightweight text markup. The most notable such methods have included derivatives of &w3xhtml; as well as of &rtf;.</p> <p>In the past, there have existed several incompatible methods within the Jabber community for exchanging instant messages that contain lightweight text markup. The most notable such methods have included derivatives of &w3xhtml; as well as of &rtf;.</p>
@ -193,14 +200,14 @@
<p>Therefore, this document defines support for lightweight text markup in the form of an XMPP extension that encapsulates content defined by an XHTML 1.0 Integration Set that we label "XHTML-IM". The remainder of this document discusses lightweight text markup in terms of XHTML 1.0 only and does not further consider RTF or other technologies.</p> <p>Therefore, this document defines support for lightweight text markup in the form of an XMPP extension that encapsulates content defined by an XHTML 1.0 Integration Set that we label "XHTML-IM". The remainder of this document discusses lightweight text markup in terms of XHTML 1.0 only and does not further consider RTF or other technologies.</p>
</section1> </section1>
<section1 topic='Requirements' anchor='reqs'> <section1 topic='Requirements' anchor='reqs'>
<p>HTML was originally designed for authoring and presenting stuctured documents on the World Wide Web, and was subsequently extended to handle more advanced functionality such as image maps and interactive forms. However, the requirements for publishing documents (or developing transactional websites) for presentation by dedicated XHTML clients on traditional computers or small-screen devices are fundamentally different from the requirements for lightweight text markup of instant messages; for this reason, only a reduced set of XHTML features is needed for XHTML-IM. In particular:</p> <p>HTML was originally designed for authoring and presenting stuctured documents on the World Wide Web, and was subsequently extended to handle more advanced functionality such as image maps and interactive forms. However, the requirements for publishing documents (or developing transactional websites) for presentation by dedicated XHTML user agents on traditional computers or small-screen devices are fundamentally different from the requirements for lightweight text markup of instant messages; for this reason, only a reduced set of XHTML features is needed for XHTML-IM. In particular:</p>
<ol> <ol>
<li><p>IM clients are not XHTML clients: their primary purpose is not to read pre-existing XHTML documents, but to read <em>and generate</em> relatively large numbers of fairly small instant messages.</p></li> <li><p>IM clients are not XHTML clients: their primary purpose is not to read pre-existing XHTML documents, but to read <em>and generate</em> relatively large numbers of fairly small instant messages.</p></li>
<li><p>The underlying context for XHTML content in Jabber/XMPP instant messaging is provided not by a full XHTML document, but by an XML stream, and specifically by a message stanza within that stream. Thus the &lt;head/&gt; element and all its children are unnecessary. Only the &lt;body/&gt; element and some of its children are appropriate for use in instant messaging.</p></li> <li><p>The underlying context for XHTML content in Jabber/XMPP instant messaging is provided not by a full XHTML document, but by an XML stream, and specifically by a message stanza within that stream. Thus the &lt;head/&gt; element and all its children are unnecessary. Only the &lt;body/&gt; element and some of its children are appropriate for use in instant messaging.</p></li>
<li><p>The XHTML content that is read by one's IM client is normally generated on the fly by one's conversation partner (or, to be precise, by his or her IM client). Thus there is an inherent limit to the sophistication of the XHTML markup involved. Even in normal XHTML documents, fairly basic structural and rendering elements such as definition lists, abbreviations, addresses, and computer input handling (e.g., &lt;kbd/&gt; and &lt;var/&gt;) are relatively rare. There is little or no foreseeable need for such elements within the context of instant messaging.</p></li> <li><p>The XHTML content that is read by one's IM client is normally generated on the fly by one's conversation partner (or, to be precise, by his or her IM client). Thus there is an inherent limit to the sophistication of the XHTML markup involved. Even in normal XHTML documents, fairly basic structural and rendering elements such as definition lists, abbreviations, addresses, and computer input handling (e.g., &lt;kbd/&gt; and &lt;var/&gt;) are relatively rare. There is little or no foreseeable need for such elements within the context of instant messaging.</p></li>
<li><p>The foregoing is doubly true of more advanced markup such as tables, frames, and forms (however, there exists an XMPP extension that provides an instant messaging equivalent of the latter, as defined in &xep0004;).</p></li> <li><p>The foregoing is doubly true of more advanced markup such as tables, frames, and forms (however, there exists an XMPP extension that provides an instant messaging equivalent of the latter, as defined in &xep0004;).</p></li>
<li><p>Although ad-hoc styles are useful for messaging (by means of the 'style' attribute), full support for &w3css; (defined by the &lt;style/&gt; element or a standalone .css file, and implemented via the 'class' attribute) would be overkill since many CSS1 properties (e.g., box, classification, and text properties) were developed especially for sophisticated page layout.</p></li> <li><p>Although ad-hoc styles are useful for messaging (by means of the 'style' attribute), full support for &w3css; (defined by the &lt;style/&gt; element or a standalone .css file, and implemented via the 'class' attribute) would be overkill since many CSS1 properties (e.g., box, classification, and text properties) were developed especially for sophisticated page layout.</p></li>
<li><p>Background images, audio, animated text, layers, applets, scripts, and other multimedia content types are unnecessary, especially given the existence of XMPP extensions such as &xep0096;.</p></li> <li><p>Background images, audio, animated text, layers, applets, scripts, and other multimedia content types are unnecessary, especially given the existence of XMPP extensions such as &xep0096;, &xep0166;, and &xep0234;.</p></li>
<li><p>Content transformations such as those defined by &w3xslt; must not be necessary in order for an instant messaging application to present lightweight text markup to an end user.</p></li> <li><p>Content transformations such as those defined by &w3xslt; must not be necessary in order for an instant messaging application to present lightweight text markup to an end user.</p></li>
</ol> </ol>
<p>As explained below, some of these requirements are addressed by the definition of the XHTML-IM Integration Set itself, while others are addressed by a recommended "profile" for that Integration Set in the context of instant messaging applications.</p> <p>As explained below, some of these requirements are addressed by the definition of the XHTML-IM Integration Set itself, while others are addressed by a recommended "profile" for that Integration Set in the context of instant messaging applications.</p>
@ -228,9 +235,14 @@
<p>These three aspects are defined in the three document sections that follow.</p> <p>These three aspects are defined in the three document sections that follow.</p>
</section1> </section1>
<section1 topic='Wrapper Element' anchor='wrapper'> <section1 topic='Wrapper Element' anchor='wrapper'>
<p>The root element for including XHTML content within XMPP stanzas is &lt;html/&gt;. This element is qualified by the 'http://jabber.org/protocol/xhtml-im' namespace. From the perspective of XMPP, it functions as an XMPP extension element; from the perspective of XHTML, it functions as a wrapper for XHTML 1.0 content qualified by the 'http://www.w3.org/1999/xhtml' namespace. Such XHTML content MUST be contained in one or more &lt;body/&gt; elements qualified by the 'http://www.w3.org/1999/xhtml' namespace and MUST conform to the XHTML-IM Integration Set defined in the following section. If more than one &lt;body/&gt; element is included in the &lt;html/&gt; wrapper element, each &lt;body/&gt; element MUST possess an 'xml:lang' attribute with a distinct value, where the value of that attribute MUST adhere to the rules defined in &rfc4646;. A formal definition of the &lt;html/&gt; element is provided in the <link url="#schemas-wrapper">XHTML-IM Wrapper Schema</link>.</p> <p>The root element for including XHTML content within XMPP stanzas is &lt;html/&gt;. This element is qualified by the 'http://jabber.org/protocol/xhtml-im' namespace. From the perspective of XMPP, the wrapper element functions as an XMPP extension element; from the perspective of XHTML, it functions as a wrapper for XHTML 1.0 content qualified by the 'http://www.w3.org/1999/xhtml' namespace. Such XHTML content MUST be contained in one or more &lt;body/&gt; elements qualified by the 'http://www.w3.org/1999/xhtml' namespace and MUST conform to the XHTML-IM Integration Set defined in the following section. If more than one &lt;body/&gt; element is included in the &lt;html/&gt; wrapper element, each &lt;body/&gt; element MUST possess an 'xml:lang' attribute with a distinct value, where the value of that attribute MUST adhere to the rules defined in &rfc4646;. A formal definition of the &lt;html/&gt; element is provided in the <link url="#schemas-wrapper">XHTML-IM Wrapper Schema</link>.</p>
<p>Note: The XHTML &lt;body/&gt; element is not to be confused with the XMPP &lt;body/&gt; element, which is a child of a &MESSAGE; stanza and is qualified by the 'jabber:client' or 'jabber:server' namespace as described in &xmppim;. The &lt;html/&gt; wrapper element is intended for inclusion only as a direct child element of the XMPP &MESSAGE; stanza and only in order to specify a marked-up version of the message &BODY; element or elements, but MAY be included elsewhere in accordance with the "extended namespace" rules defined in the <cite>XMPP IM</cite> specification.</p> <p>The XHTML &lt;body/&gt; element is not to be confused with the XMPP &lt;body/&gt; element, which is a child of a &MESSAGE; stanza and is qualified by the 'jabber:client' or 'jabber:server' namespace as described in &xmppim;. The &lt;html/&gt; wrapper element is intended for inclusion only as a direct child element of the XMPP &MESSAGE; stanza and only in order to specify a marked-up version of the message &BODY; element or elements, but MAY be included elsewhere in accordance with the "extended namespace" rules defined in the <cite>XMPP IM</cite> specification.</p>
<p>Until and unless (1) additional integration sets are defined and (2) mechanisms are specified for discovering or negotiating which integration sets are supported, the XHTML markup contained within the &lt;html/&gt; wrapper element MUST NOT include elements and attributes that are not part of the XHTML-IM Integration Set defined in the following section, and any such elements and attributes MUST 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> <p>Until and unless (1) additional integration sets are defined and (2) mechanisms are specified for discovering or negotiating which integration sets are supported, the XHTML markup contained within the &lt;html/&gt; wrapper element:</p>
<ol>
<li>MUST NOT include elements and attributes that are not part of the XHTML-IM Integration Set defined in Section 6 of this document; any such elements and attributes MUST be ignored if received.</li>
<li>SHOULD NOT include elements and attributes that are not part of the recommended profile of the XHTML-IM Integration Set defined in Section 7 of this document; any such elements and attributes SHOULD be ignored if received.</li>
</ol>
<p>Note: In the foregoing restrictions, 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>
</section1> </section1>
<section1 topic='XHTML-IM Integration Set' anchor='def'> <section1 topic='XHTML-IM Integration Set' anchor='def'>
<p>This section defines an XHTML 1.0 Integration Set for use in the context of instant messaging. Given its intended usage, we label it "XHTML-IM".</p> <p>This section defines an XHTML 1.0 Integration Set for use in the context of instant messaging. Given its intended usage, we label it "XHTML-IM".</p>
@ -321,28 +333,32 @@
<section1 topic='Recommended Profile' anchor='profile'> <section1 topic='Recommended Profile' anchor='profile'>
<p>Even within the restricted set of modules specified as defining the XHTML-IM Integration Set (see preceding section), some elements and attributes are inappropriate or unnecessary for the purpose of instant messaging; although such elements and attributes MAY be included in accordance with the XHTML-IM Integration Set, further recommended restrictions regarding which elements and attributes to include in XHTML content are specified below.</p> <p>Even within the restricted set of modules specified as defining the XHTML-IM Integration Set (see preceding section), some elements and attributes are inappropriate or unnecessary for the purpose of instant messaging; although such elements and attributes MAY be included in accordance with the XHTML-IM Integration Set, further recommended restrictions regarding which elements and attributes to include in XHTML content are specified below.</p>
<section2 topic='Structure Module Profile' anchor='profile-structure'> <section2 topic='Structure Module Profile' anchor='profile-structure'>
<p>The intent of the protocol defined herein is to support lightweight text markup of XMPP message bodies only. Therefore the &lt;head/&gt;, &lt;html/&gt;, and &lt;title/&gt; elements are NOT RECOMMENDED to 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). However, the &lt;body/&gt; element is REQUIRED, since it is the root element for all XHTML content.</p> <p>The intent of the protocol defined herein is to support lightweight text markup of XMPP message bodies only. Therefore the &lt;head/&gt;, &lt;html/&gt;, and &lt;title/&gt; elements 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). However, the &lt;body/&gt; element is REQUIRED, since it is the root element for all XHTML-IM content.</p>
</section2> </section2>
<section2 topic='Text Module Profile' anchor='profile-text'> <section2 topic='Text Module Profile' anchor='profile-text'>
<p>Not all of the Text Module elements are appropriate in the context of instant messaging, since the XHTML content that one views is generated by one's conversation partner in what is often a rapid-fire conversation thread. Only the following elements are RECOMMENDED in XHTML-IM:</p> <p>Not all of the Text Module elements are appropriate in the context of instant messaging, since the XHTML content that one views is generated by one's conversation partner in what is often a rapid-fire conversation thread. Only the following elements are RECOMMENDED in XHTML-IM:</p>
<ul> <ul>
<li>&lt;blockquote/&gt;</li>
<li>&lt;br/&gt;</li> <li>&lt;br/&gt;</li>
<li>&lt;cite/&gt;</li>
<li>&lt;em/&gt;</li>
<li>&lt;p/&gt;</li> <li>&lt;p/&gt;</li>
<li>&lt;span/&gt;</li> <li>&lt;span/&gt;</li>
<li>&lt;strong/&gt;</li>
</ul> </ul>
<p>The other Text Module elements SHOULD NOT be generated by a compliant implementation, and MAY 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> <p>The other Text Module elements MAY be generated by a compliant implementation but MAY 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>
<section2 topic='Hypertext Module Profile' anchor='profile-hypertext'> <section2 topic='Hypertext Module Profile' anchor='profile-hypertext'>
<p>The only recommended attributes of the &lt;a/&gt; element are specified in the <link url="#profile-attributes">Recommended Attributes</link> section of this document.</p> <p>The only recommended attributes of the &lt;a/&gt; element are specified in the <link url="#profile-attributes">Recommended Attributes</link> section of this document.</p>
</section2> </section2>
<section2 topic='List Module Profile' anchor='profile-list'> <section2 topic='List Module Profile' anchor='profile-list'>
<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 MAY 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> <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>
<section2 topic='Image Module Profile' anchor='profile-image'> <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.</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. 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>
</section2> </section2>
<section2 topic='Style Attribute Module Profile' anchor='profile-style'> <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) may 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> <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>
<p>A full list of recommended style properties is provided below.</p> <p>A full list of recommended style properties is provided below.</p>
<section3 topic='Recommended Style Properties' anchor='profile-style-properties'> <section3 topic='Recommended Style Properties' anchor='profile-style-properties'>
<p><cite>CSS1</cite> defines 42 "atomic" style properties (which are categorized into font, color and background, text, box, and classification properties) as well as 11 "shorthand" properties ("font", "background", "margin", "padding", "border-width", "border-top", "border-right", "border-bottom", "border-left", "border", and "list-style"). Many of these properties are not appropriate for use in text-based instant messaging, for one or more of the following reasons:</p> <p><cite>CSS1</cite> defines 42 "atomic" style properties (which are categorized into font, color and background, text, box, and classification properties) as well as 11 "shorthand" properties ("font", "background", "margin", "padding", "border-width", "border-top", "border-right", "border-bottom", "border-left", "border", and "list-style"). Many of these properties are not appropriate for use in text-based instant messaging, for one or more of the following reasons:</p>
@ -398,7 +414,7 @@
<tr> <tr>
<td>xml:lang</td> <td>xml:lang</td>
<td>NOT RECOMMENDED</td> <td>NOT RECOMMENDED</td>
<td>Differentiation of language identification should occur at the level of the &lt;body/&gt; element only.</td> <td>Differentiation of language identification SHOULD occur at the level of the &lt;body/&gt; element only.</td>
</tr> </tr>
</table> </table>
</section3> </section3>
@ -446,6 +462,11 @@
<td>type</td> <td>type</td>
<td>RECOMMENDED</td> <td>RECOMMENDED</td>
</tr> </tr>
<tr>
<td>&lt;cite/&gt;</td>
<td>uri</td>
<td>NOT RECOMMENDED</td>
</tr>
<tr> <tr>
<td>&lt;img/&gt;</td> <td>&lt;img/&gt;</td>
<td>alt</td> <td>alt</td>
@ -488,6 +509,10 @@
<td>&lt;a/&gt;</td> <td>&lt;a/&gt;</td>
<td>href, style, type</td> <td>href, style, type</td>
</tr> </tr>
<tr>
<td>&lt;blockquote/&gt;</td>
<td>style</td>
</tr>
<tr> <tr>
<td>&lt;body/&gt;</td> <td>&lt;body/&gt;</td>
<td>style, xml:lang <note>When contained within the &lt;html xmlns='http://jabber.org/protocol/xhtml-im'&gt; element, a &lt;body/&gt; element is qualified by the 'http://www.w3.org/1999/xhtml' namespace; naturally, this is a namespace declaration rather than an attribute per se, and therefore is not mentioned in the attribute enumeration.</note></td> <td>style, xml:lang <note>When contained within the &lt;html xmlns='http://jabber.org/protocol/xhtml-im'&gt; element, a &lt;body/&gt; element is qualified by the 'http://www.w3.org/1999/xhtml' namespace; naturally, this is a namespace declaration rather than an attribute per se, and therefore is not mentioned in the attribute enumeration.</note></td>
@ -496,6 +521,14 @@
<td>&lt;br/&gt;</td> <td>&lt;br/&gt;</td>
<td>-none-</td> <td>-none-</td>
</tr> </tr>
<tr>
<td>&lt;cite/&gt;</td>
<td>style</td>
</tr>
<tr>
<td>&lt;em/&gt;</td>
<td>-none-</td>
</tr>
<tr> <tr>
<td>&lt;img/&gt;</td> <td>&lt;img/&gt;</td>
<td>alt, height, src, style, width</td> <td>alt, height, src, style, width</td>
@ -516,6 +549,10 @@
<td>&lt;span/&gt;</td> <td>&lt;span/&gt;</td>
<td>style</td> <td>style</td>
</tr> </tr>
<tr>
<td>&lt;strong/&gt;</td>
<td>-none-</td>
</tr>
<tr> <tr>
<td>&lt;ul/&gt;</td> <td>&lt;ul/&gt;</td>
<td>style</td> <td>style</td>
@ -541,16 +578,15 @@
</section1> </section1>
<section1 topic='Examples' anchor='examples'> <section1 topic='Examples' anchor='examples'>
<p>The following examples provide an insight into the inclusion of XHTML content in XMPP &MESSAGE; stanzas but are by no means exhaustive or definitive.</p> <p>The following examples provide an insight into the inclusion of XHTML content in XMPP &MESSAGE; stanzas but are by no means exhaustive or definitive.</p>
<p>(Note: The examples may not render correctly in all web browsers, since not all web browsers comply fully with the XHTML 1.0 and CSS1 standards. Markup in the examples may include line breaks for readability. Example renderings are shown with a colored background to set them off from the rest of the text.)</p> <p>(Note: The examples might not render correctly in all web browsers, since not all web browsers comply fully with the XHTML 1.0 and CSS1 standards. Markup in the examples may include line breaks for readability. Example renderings are shown with a colored background to set them off from the rest of the text.)</p>
<example caption='Bold, italic, font colors'><![CDATA[ <example caption='Emphasis, font colors, strength'><![CDATA[
<message> <message>
<body>OMG, I&apos;m green with envy!</body> <body>OMG, I&apos;m green with envy!</body>
<html xmlns='http://jabber.org/protocol/xhtml-im'> <html xmlns='http://jabber.org/protocol/xhtml-im'>
<body xmlns='http://www.w3.org/1999/xhtml'> <body xmlns='http://www.w3.org/1999/xhtml'>
<p style='font-size:large'> <p style='font-size:large'>
<span style='font-style: italic'>OMG</span>, <em>OMG</em>, I&apos;m <span style='color:green'>green</span>
I&apos;m <span style='color:green'>green</span> with <strong>envy</strong>!
with <span style='font-weight: bold'>envy</span>!
</p> </p>
</body> </body>
</html> </html>
@ -558,9 +594,9 @@
]]></example> ]]></example>
<p>This could be rendered as follows:</p> <p>This could be rendered as follows:</p>
<div class='example'> <div class='example'>
<p style='font-size: large'><span style='font-style: italic'>OMG</span>, I&apos;m <span style='color:green'>green</span> with <span style='font-weight: bold'>envy</span>!</p> <p style='font-size: large'><em>OMG</em>, I&apos;m <span style='color:green'>green</span> with <strong>envy</strong>!</p>
</div> </div>
<example caption='Indentation'><![CDATA[ <example caption='Blockquote, cite'><![CDATA[
<message> <message>
<body>As Emerson said in his essay Self-Reliance: <body>As Emerson said in his essay Self-Reliance:
@ -568,20 +604,20 @@
</body> </body>
<html xmlns='http://jabber.org/protocol/xhtml-im'> <html xmlns='http://jabber.org/protocol/xhtml-im'>
<body xmlns='http://www.w3.org/1999/xhtml'> <body xmlns='http://www.w3.org/1999/xhtml'>
<p>As Emerson said in his essay <span style='font-style: italic'>Self-Reliance</span>:</p> <p>As Emerson said in his essay <cite>Self-Reliance</cite>:</p>
<p style='margin-left: 5%'> <blockquote>
&quot;A foolish consistency is the hobgoblin of little minds.&quot; &quot;A foolish consistency is the hobgoblin of little minds.&quot;
</p> </blockquote>
</body> </body>
</html> </html>
</message> </message>
]]></example> ]]></example>
<p>This could be rendered as follows:</p> <p>This could be rendered as follows:</p>
<div class='example'> <div class='example'>
<p>As Emerson said in his essay <span style='font-style: italic'>Self-Reliance</span>:</p> <p>As Emerson said in his essay <cite>Self-Reliance</cite>:</p>
<p style='margin-left: 5%'> <blockquote>
&quot;A foolish consistency is the hobgoblin of little minds.&quot; &quot;A foolish consistency is the hobgoblin of little minds.&quot;
</p> </blockquote>
</div> </div>
<example caption='An image and a hyperlink'><![CDATA[ <example caption='An image and a hyperlink'><![CDATA[
<message> <message>
@ -666,7 +702,7 @@ That seems fine to me.
<html xmlns='http://jabber.org/protocol/xhtml-im'> <html xmlns='http://jabber.org/protocol/xhtml-im'>
<body xmlns='http://www.w3.org/1999/xhtml'> <body xmlns='http://www.w3.org/1999/xhtml'>
<p>You wrote:</p> <p>You wrote:</p>
<div style='margin-left: 5%'> <blockquote>
<p>I think we have consensus on the following:</p> <p>I think we have consensus on the following:</p>
<ol> <ol>
<li>Remove &lt;div/&gt;</li> <li>Remove &lt;div/&gt;</li>
@ -674,7 +710,7 @@ That seems fine to me.
<li>Don't preserve whitespace</li> <li>Don't preserve whitespace</li>
</ol> </ol>
<p>Yes, no, maybe?</p> <p>Yes, no, maybe?</p>
</div> </blockquote>
<p>That seems fine to me.</p> <p>That seems fine to me.</p>
</body> </body>
</html> </html>
@ -700,10 +736,10 @@ That seems fine to me.
<body xml:lang='de-DE'>ausgezeichnet!</body> <body xml:lang='de-DE'>ausgezeichnet!</body>
<html xmlns='http://jabber.org/protocol/xhtml-im'> <html xmlns='http://jabber.org/protocol/xhtml-im'>
<body xml:lang='en-US' xmlns='http://www.w3.org/1999/xhtml'> <body xml:lang='en-US' xmlns='http://www.w3.org/1999/xhtml'>
<p style='font-weight: bold'>awesome!</p> <p><strong>awesome!</strong></p>
</body> </body>
<body xml:lang='de-DE' xmlns='http://www.w3.org/1999/xhtml'> <body xml:lang='de-DE' xmlns='http://www.w3.org/1999/xhtml'>
<p style='font-weight: bold'>ausgezeichnet!</p> <p><strong>ausgezeichnet!</strong></p>
</body> </body>
</html> </html>
</message> </message>
@ -766,9 +802,9 @@ That seems fine to me.
id='disco1'> id='disco1'>
<query xmlns='http://jabber.org/protocol/disco#info'/> <query xmlns='http://jabber.org/protocol/disco#info'/>
</iq> </iq>
]]></example> ]]></example>
<p>If the queried entity supports XHTML-IM, it MUST return a &lt;feature/&gt; element with a 'var' attribute set to a value of "http://jabber.org/protocol/xhtml-im" in the IQ result.</p> <p>If the queried entity supports XHTML-IM, it MUST return a &lt;feature/&gt; element with a 'var' attribute set to a value of "http://jabber.org/protocol/xhtml-im" in the IQ result.</p>
<example caption='Contact Returns Disco Info Results'><![CDATA[ <example caption='Contact Returns Disco Info Results'><![CDATA[
<iq type='result' <iq type='result'
from='romeo@shakespeare.lit/orchard' from='romeo@shakespeare.lit/orchard'
to='juliet@shakespeare.lit/balcony' to='juliet@shakespeare.lit/balcony'
@ -779,7 +815,8 @@ That seems fine to me.
... ...
</query> </query>
</iq> </iq>
]]></example> ]]></example>
<p>Naturally, support can also be discovered via the dynamic, presence-based profile of service discovery defined in &xep0115;.</p>
</section2> </section2>
<section2 topic='Implicit Discovery' anchor='discovery-implicit'> <section2 topic='Implicit Discovery' anchor='discovery-implicit'>
<p>A Jabber user's client MAY send XML &MESSAGE; stanzas containing XHTML-IM extensions without first discovering if the conversation partner's client supports XHTML-IM. If the user's client sends a message that includes XHTML-IM markup and the conversation partner's client replies to that message but does not include XHTML-IM markup, the user's client SHOULD NOT continue sending XHTML-IM markup.</p> <p>A Jabber user's client MAY send XML &MESSAGE; stanzas containing XHTML-IM extensions without first discovering if the conversation partner's client supports XHTML-IM. If the user's client sends a message that includes XHTML-IM markup and the conversation partner's client replies to that message but does not include XHTML-IM markup, the user's client SHOULD NOT continue sending XHTML-IM markup.</p>
@ -790,8 +827,9 @@ That seems fine to me.
<p>The exclusion of scripts, applets, binary objects, and other potentially executable code from XHTML-IM reduces the risk of exposure to harmful or malicious objects caused by inclusion of XHTML content. To further reduce the risk of such exposure, an implementation MAY choose to:</p> <p>The exclusion of scripts, applets, binary objects, and other potentially executable code from XHTML-IM reduces the risk of exposure to harmful or malicious objects caused by inclusion of XHTML content. To further reduce the risk of such exposure, an implementation MAY choose to:</p>
<ul> <ul>
<li>Not make hyperlinks clickable</li> <li>Not make hyperlinks clickable</li>
<li>Not fetch images but instead show only the 'alt' text.</li> <li>Not fetch or present images but instead show only the 'alt' text.</li>
</ul> </ul>
<p>In addition, an implementation MUST make it possible for a user to completely disable the fetching and presentation of images (rather than leave it up to the implementation).</p>
</section2> </section2>
<section2 topic='Phishing' anchor='security-phishing'> <section2 topic='Phishing' anchor='security-phishing'>
<p>To reduce the risk of phishing attacks <note>Phishing has been defined as "a broadly launched social engineering attack in which an electronic identity is misrepresented in an attempt to trick individuals into revealing personal credentials that can be used fraudulently against them" (see <link url='http://fstc.org/projects/counter-phishing-phase-1/'>Financial Services Technology Consortium Counter-Phishing Initiative: Phase I</link>).</note>, an implementation MAY choose to:</p> <p>To reduce the risk of phishing attacks <note>Phishing has been defined as "a broadly launched social engineering attack in which an electronic identity is misrepresented in an attempt to trick individuals into revealing personal credentials that can be used fraudulently against them" (see <link url='http://fstc.org/projects/counter-phishing-phase-1/'>Financial Services Technology Consortium Counter-Phishing Initiative: Phase I</link>).</note>, an implementation MAY choose to:</p>
@ -818,7 +856,7 @@ That seems fine to me.
<p>The fields of this FPI are as follows:</p> <p>The fields of this FPI are as follows:</p>
<ol> <ol>
<li>The leading field is "-", which indicates that this is a privately-defined resource.</li> <li>The leading field is "-", which indicates that this is a privately-defined resource.</li>
<li>The second field is "JSF" (an abbreviation for Jabber Software Foundation, the former name for the XMPP Standards Foundation), which identifies the organization that maintains the named item.</li> <li>The second field is "JSF" (an abbreviation for Jabber Software Foundation, the former name for the &XSF;), which identifies the organization that maintains the named item.</li>
<li>The third field contains two constructs: <li>The third field contains two constructs:
<ol> <ol>
<li>The public text class is "DTD", which adheres to ISO 8879 Clause 10.2.2.1.</li> <li>The public text class is "DTD", which adheres to ISO 8879 Clause 10.2.2.1.</li>
@ -850,7 +888,7 @@ That seems fine to me.
<p>For information regarding XHTML modularization in XML schema for the XHTML 1.0 Integration Set defined in this specification, refer to the <link url="#schemas-driver">Schema Driver</link> section of this document.</p> <p>For information regarding XHTML modularization in XML schema for the XHTML 1.0 Integration Set defined in this specification, refer to the <link url="#schemas-driver">Schema Driver</link> section of this document.</p>
</section2> </section2>
<section2 topic='W3C Review' anchor='w3c-review'> <section2 topic='W3C Review' anchor='w3c-review'>
<p>The XHTML 1.0 Integration Set defined herein has been reviewed informally by an editor of the XHTML Modularization in XML Schema specification but has not undergone formal review by the W3C; before this specification proceeds to a status of Final within the XMPP Standards Foundation's standards process, it should undergo a formal review through communication with the Hypertext Coordination Group within the W3C.</p> <p>The XHTML 1.0 Integration Set defined herein has been reviewed informally by an editor of the <cite>XHTML Modularization in XML Schema</cite> specification but has not undergone formal review by the W3C. Before the XHTML-IM specification proceeds to a status of Final within the standards process of the XMPP Standards Foundation, the &COUNCIL; is encouraged to pursue a formal review through communication with the Hypertext Coordination Group within the W3C.</p>
</section2> </section2>
<section2 topic='XHTML Versioning' anchor='w3c-versions'> <section2 topic='XHTML Versioning' anchor='w3c-versions'>
<p>The W3C is actively working on &w3xhtml2; and may produce additional versions of XHTML in the future. This specification addresses XHTML 1.0 only, but it may be superseded or supplemented in the future by a XMPP Extension Protocol specification that defines methods for encapsulating XHTML 2.0 content in XMPP.</p> <p>The W3C is actively working on &w3xhtml2; and may produce additional versions of XHTML in the future. This specification addresses XHTML 1.0 only, but it may be superseded or supplemented in the future by a XMPP Extension Protocol specification that defines methods for encapsulating XHTML 2.0 content in XMPP.</p>
@ -1206,6 +1244,6 @@ That seems fine to me.
</section2> </section2>
</section1> </section1>
<section1 topic='Acknowledgements' anchor='ack'> <section1 topic='Acknowledgements' anchor='ack'>
<p>This specification formalizes and extends earlier work by Jeremie Miller and Julian Missig on XHTML formatting of Jabber messages. Many thanks to Shane McCarron for his assistance regarding XHTML modularization and conformance issues. Thanks also to contributors on the Standards list for their feedback and suggestions.</p> <p>This specification formalizes and extends earlier work by Jeremie Miller and Julian Missig on XHTML formatting of Jabber messages. Many thanks to Shane McCarron for his assistance regarding XHTML modularization and conformance issues. Thanks also to contributors on the discussion list of the XSF's &SSIG; for their feedback and suggestions.</p>
</section1> </section1>
</xep> </xep>