XPath and XSLT_Extensions for Amara 2.x are much the same as those for 4Suite.
You add an XPath function by passing it into created context.
You add an XSLT element by passing it to a processor instance.
register_extension_modules register_extension_function register_extension_element
We plan to add an entry points approach to adding extensions.