An HTML attribute, resolved to its (possibly foreign-content-adjusted)
namespace during tree construction — see plan/03-tree-construction.md’s
Foreign-Content-Dispatch step.
A single node in a Document’s arena: its kind/payload, its source
position (None for the document node itself and for any node a
tree-construction algorithm synthesizes rather than parses — e.g. an
implied <html>/<head>/<body> — Some for everything else), and
its tree-navigation links.
A source position: where a node parsed from the input started.
Matches html-conform::finding::SourceLocation’s field layout exactly
so the eventual integration (Phase 05) needs no conversion.
The kind of a document node and its associated data. Mostly covers
what the HTML5 tokenizer can actually produce a token for (§13.2.5’s
token kinds) — no CData/EntityRef variants, since the HTML5
tokenizer never emits those (character references and CDATA content
both resolve straight to character tokens, see
tokenizer::TokenKind’s doc comment). DocumentFragment
is the one exception: not tokenizer-token-shaped at all, synthesized
directly by tree construction (§13.2.6.1’s “create an element for a
token” step, for template elements specifically).
The driver loop (§13.2 “Parsing HTML documents”, the “tokenization and
tree construction” step): parses input into a Document tree with
per-node source positions, feeding it through the tokenizer and handing
each token to the tree builder, applying the two pieces of feedback
tree construction sends back to the tokenizer — a state switch
(Tokenizer::switch_to, for RCDATA/RAWTEXT/script-data/PLAINTEXT
elements) and the foreign-content flag (Tokenizer::set_in_foreign_content,
consulted only by CDATA-section handling).