MathML

:= { parsed : Parsed }

Strict namespace-aware MathML documents and fragments. XML syntax is the default; fragments start in the MathML namespace. Original bytes and source spans remain available beside the decoded tree.

parse_str : Str, Props -> Try(MathML, [InvalidMarkup(Error)])

Parse a complete document with the requested syntax and checks.

parse_fragment : Str, Props -> Try(Fragment, [InvalidMarkup(Error)])

Parse any number of fragment roots in the format's default namespace.

validate : ValidationProps -> Try(MathML, [InvalidMarkup(Error)])

Check a document for quotation or an explicitly asserted imported file.

from_quote : Str -> Try(MathML, [BadQuotedBytes(Str)])

Convert a checked complete document literal.

parse_segments : List(Str), Props -> Try(Plan, [InvalidMarkup(Error)])

Parse fixed literal segments into an indexed plan without binding values.

Props : Props

Common parsing, validation and resource-limit options.

ValidationProps

:= { source : Str, name : Str ?? "<literal>", options : Props ?? {} }

Source, diagnostic name, and explicit parsing/validation options.

Template

:= { bound : Bound(a) }

A parsed fragment bound to homogeneous downstream values, including signals.

from_quote : Str -> Try(Template(a), [BadQuotedBytes(Str)])

A static fragment can use the same template type.

Fragment

:= { parsed : Parsed }

A fragment retains every authored root and its exact source.

validate : ValidationProps -> Try(Fragment, [InvalidMarkup(Error)])

Check imported fragment text with explicit options and a diagnostic name.

from_quote : Str -> Try(Fragment, [BadQuotedBytes(Str)])

Check a fragment literal with strict defaults.

single_element : Fragment -> Try(Node, [RootCount(U64)])

Require a single element root for downstream row/component templates.