This document shows some examples of a recommended form of character formatting that may be supported in UBIF documents. Only a very limited subset of xhtml inline formatting codes is considered relevant: strong, emphasis, italics, super- and subscript, and the new-line (br) tag. The formatting convention is based on overloading encoded text like <sup>2</sup> with formatting semantics. This is not controlled by the schema in any way. Processors of UBIF documents are recommended to apply the convention and recover the formatting when producing html or other formatted output. The example xslt script delivered with this documents shows an example of how this can be achieved for xhtml documents.

Plain text without formatting or character entities.

Plain text without formatting, but containing character entities "<" & ">".

Testing sub- and superscript: ml H2O / mm2

Multiple emphasis and emphasis

Testing emphasized field (entire text in parent tag is formatted). This is undesirable and not what the formatting convention is intended to support. However, since it is difficult to prohibit such abuse, it should not lead to an error condition.

Testing nesting (different tags): emphasized strong mm2 .

Testing nesting (same tag): emphasized <em> emphasized mm2 </em>. This may fail, but should still produce well-formed xml and valid xhtml (although not equivalent to the intended formatting!).

Other tags: italics,
testing new line (html)
testing new line (xhtml)
testing new line (xhtml plus blank)
End.

Testing an unbalanced starting "strong": <strong>, should be left unchanged.

Testing an unbalanced start/close mismatch error: H<sub>2</sup>O, should be left unchanged.

Contains empty emphasis: this may be automatically removed. If not, then the xml should at least remain well formed!