Skip to main content

rebuild_text_subtree

Function rebuild_text_subtree 

Source
pub fn rebuild_text_subtree(
    node: &Node,
    convert_spaces: bool,
) -> Option<NodeData>
Expand description

Rebuild a libxml2 subtree into owned NodeData, dropping internal _*, xml:id, and fragid attributes. Shared between convert_xm_text_content (Perl convertXMTextContent, Post.pm L456-489) and pmml_text_aux for cases where Perl calls cloneNode($node, 'nest') (MathML.pm L1073) — i.e. when an unhandled element like ltx:ref appears inside a text-mode fragment and must survive into the output so the XSLT can transform it (e.g. ltx:ref<a>).