Docs Menu
Docs Home
/
MongoDB Meta Documentation
/

XML Role

The docutils restructuredText parser does not support nesting roles or formatting markup. This makes it impossible to, for example, have a monospace-formatted ref link without making a sphinx extension providing each possible permutation of formatting.

The xml role in the xmlrole extension allows you to express formatting using XML. It accepts the following tags:

Tag
Attributes
Description

em

Emphasize the contained text. Typically renders as italics.

mono

Render the contained text in a monospace font.

strong

Render the contained text in a bold font.

ref

target=<ref>

Create a link to the docutils reference indicated by target.

link

target=<url>

Create a link to a URL indicated by target.

For example:

:xml:`<mono><ref target="binary-bson-dumps"></ref></mono>`
:xml:`<strong>See: <link target="https://example.com">An Example Link</link></strong>`

Tip

See also:

xmlrole.py

Back

Suppressing Previous/Next Links