register-function expression perl-code
EXPERIMENTAL! Register given perl code as a new XPath extension function under a name provided in the first argument (expression). XML::LibXML DOM API may be used in the perl code for object processing. If the name contains a colon, then the first part before the colon must be a registered namespace prefix (see register-namespace) and the function is registered within the corresponding namespace.