pub fn xsltTransformError(
ctxt: *mut _xsltTransformContext,
style: *mut _xsltStylesheet,
inst: *mut _xmlNode,
msg: *const c_char,
)Expand description
Report an XSLT error.
Faithful port of upstream xsltutils.c xsltTransformError: the
transform context is moved to the error state, the error context line
is printed (upstream xsltPrintErrorContext), and the message is
emitted verbatim through the registered handler or stderr. Messages
carry their own trailing newline, exactly as upstream’s do — no
newline is added here.
The upstream signature is variadic (const char *msg, ...); the
candidate’s callers format the message before calling (a %s/%d
placeholder is never expanded by this function).
§Parameters
ctxt— The transform context (may be null).style— The stylesheet (may be null).inst— The instruction node that triggered the error (may be null).msg— The message, NUL-terminated, typically ending in\n.
§Safety
msgmust be NULL or a valid NUL-terminated C string; it is read withlibc::strlenand converted to a byte slice, so it must not be dangling.ctxtmust be NULL or a valid_xsltTransformContext; it is dereferenced to readstate,inst,error, anderrctx, and a registerederrorhandler must be a valid extern “C” function pointer callable witherrctxand the formatted message.instmust be NULL or a valid_xmlNode; it is passed toprint_error_context, which dereferences it.styleis only used in NULL comparisons and may be NULL.