%ents; ]>
Message Markup This specification provides an alternative to XHTML-IM with rigid separation of content and markup information, improving the resilience against spoofing and injection attacks. &LEGALNOTICE; 0394 Deferred Standards Track Standards Council markup Konstzntin Kozlov yagiza@yandex.ru yagiza@isgeek.info 0.2.1 2019-01-05 kks Adopt deferred XEP. 0.2.0 2018-12-06 XEP Editor (jsc) Defer due to lack of activity. 0.1.0 2017-11-22 XEP Editor (ssw)

First draft approved by the XMPP Council.

0.0.1 2017-11-07 jwi

First draft.

Currently, &xep0071; or ad-hoc text-based formats are used to provide styling and semantic information in messages sent over the XMPP network.

These approaches have several drawbacks, including but not limited to:

OPTIONAL.

Inline markup is declared with the <span/> element.

There is really no reason to worry. ]]>

The following child elements are defined for <span/>:

  • <emphasis/>: The spanned range is emphasized. Suggested rendering: italics or bold.
  • <code/>: The spanned range is some kind of machine code. Suggested rendering: monospaced.
  • <deleted/>: The spanned range has been deleted. Suggested rendering: striked through.

The start and end attributes define the range at which the span is applied. They are in units of unicode code points in the character data if the body element. The first affected codepoint is the one at start (where the first codepoint of a message has index 0) and the last affected codepoint is the one just before end. The above example could render in HTML as:

There is really no reason to worry.

Code blocks are declared with the <bcode/> element:

Just run this command: $ cowsay XMPP is awesome. ]]>

The start and end attributes work just like for <span/>.

The suggested rendering of code blocks is as block-level elements with monospaced font. The above example could render in HTML as:

Just run this command:

$ cowsay XMPP is awesome.

Itemized lists are declared with the <list/> and <li/> elements:

This XEP supports many things: * inline markup * code blocks * lists * and possibly more!
  • ]]>

    The start and end attributes of <list/> define the scope of the list. The start of the <li/> elements denote the start of a new list item. A list item continues until the end of the list or the start of the next list item. The first <li/> in a <list/> MUST have a start value equal to the start value of the <list/>.

    The above example could render in HTML as:

    This XEP supports many things:

    • * inline markup
    • * code blocks
    • * lists
    • * and possibly more!

    A block quote is declared with a <bquote/> element:

    He said: > Thou shalt not pass! and raised his hand. ]]>

    In addition, &xep0372; or a similar mechanism MAY be used to attribute the origin of the quote. The above example could render in HTML as:

    He said:

    > Thou shalt not pass!

    and raised his hand.

    A nested quotation can be created by adding two <bquote/> elements where the start/end range is nested. If plain text quotation markers are used, the start of the blockquote MUST be placed at the first quotation marker of the outer quote.

    > He said: >> Thou shalt not pass! > and raised his hand. Isn't this from some famous movie? ]]>

    The above example could render in HTML as:

    > He said:
    >> Thou shalt not pass!
    > and raised his hand.

    Isn't this from some famous movie?

    • Spans MUST NOT overlap with each other.
    • Spans MUST NOT overlap with the boundaries of a block-level markup element, but MAY be fully contained within a block-level markup element.
    • Block level markup elements MUST NOT overlap with each others boundaries.
    • There MUST NOT be a <markup/> element in a <message/> without corresponding <body/>. Note that there may be one <markup/> elements with appropriate xml:lang attribute value for each <body/>, if the message contains multiple <body/> elements.
    • The start and end attributes operate on unicode code points in the XML character data of the corresponding <body/> element.
    • Entities MUST silently ignore elements and attributes (arbitrarly deep) in <markup/> which they do not understand; this allows for future extensions of the markup without breaking existing implementations.

    OPTIONAL.

    Entities are encouraged use the semantic information to make the presentation of the textual content more precise, for example by applying spoken emphasis to passages marked with an <emphasis/> <span/>.

    Since a message may have multiple <body/> elements in different languages, there MAY be multiple <markup/> elements, one for each of the <body/> elements. There is no requirement to include a <markup/> element for each language.

    REQUIRED.

    This document requires no interaction with &IANA;.

    This specification defines the following XML namespaces:

    • urn:xmpp:markup:0

    REQUIRED for protocol specifications.

    Thanks to Georg Lukas and Emmanuel Gil Peyrot for feedback on the initial idea of this XEP.