1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//! html5 output method.
//!
//! The main entry point is [`Parameters`], which you can pass into various
//! serialization methods to control the output.
//!
//! You can use these parameters to control the HTML5 serialization, which you
//! can obtain using [`Xot::html5`].
use crateXot;
use crateNameId;
use Indentation;
/// Parameters for HTML generation.
///
/// This only supports HTML 5.
///
/// This follows the HTML5 serialization rules described in
/// <https://www.w3.org/TR/xslt-xquery-serialization/>
///
/// In summary:
///
/// - no-namespace and XHTML namespace is serialized as HTML tags
///
/// - Always use explicit close tags such as `</p>`, never use self-closing
/// tags such as `<p/>`.
///
/// - certain HTML tags are unclosed (void names such `br`, `meta`), i.e.
/// `<br>`
///
/// - mathml and svg are serialized with default namespace only, no prefix.
///
/// - certain HTML tags are rendered preformatted (`pre`, `script`)
///
/// - Indentation takes inline elements (phrasing content names such as `a`,
/// `span`, etc) into account.
///
/// - Unknown HTML elements (that have no namespace or in the XHTML namespace) are
/// also treated as inline elements.