The answer is - it depends on the particular XSL processor.
The XSLT1 recommendation supports function and element
extensions but not all processors implement extensions
and even fewer allow the user to roll their own.
One processor that allows extensions written in C is libxslt
(
www.libxslt.org)