pub enum MessagePart {
Text(String),
ValueOf(String),
Name(Option<String>),
}Expand description
One piece of a Check’s message content, in document order.
The ISO Schematron content model for assert/report also allows
name/emph/dir/span markup (and arbitrary foreign-namespace
elements). <value-of select="..."> (Stage 2, see
plan/06-value-of-interpolation.md) and <name path="..."> (issue #4)
are both evaluated — emph/dir/span are purely presentational
(HTML-ish emphasis/direction/span wrappers) with no data-dependent
semantics, so text nested inside those still contributes via Text
(the wrapper tag itself carries no meaning here, same as Stage 1’s
plain-text handling), but their own tags are not otherwise modeled.
Variants§
Text(String)
ValueOf(String)
A <value-of select="..."> — select is the raw, unparsed XPath
expression, evaluated against the firing check’s context node.
Name(Option<String>)
A <name path="..."> (or self-closing <name/>) — resolves to the
expanded name (name() semantics) of the node path selects, or of
the firing check’s own context node when path is absent (None).
path is the raw, unparsed XPath expression, like ValueOf’s
select.