On Thu, Feb 14, 2008 at 02:59:19PM +0000, Tony Graham wrote: > xsltRegisterExtFunction [1] and xsltRegisterExtModuleFunction [2] both > register extension functions (and there are similarly two variants for > registering extension elements). > > xsltRegisterExtFunction is used in the example in the libxslt > documentation [3] and xsltRegisterExtModuleFunction is used in the > xsltRegisterTestModule() test function [2] that is part of libxslt's > tests. > > Both variants work. Is there any guidance on which is preferable when?
Well it's very different, xsltRegisterExtModuleFunction is supposed to be called from extension modules and will affect all transformations which may use that module (i think the binding is done using the namespace), that registration will be done at initialization time when the module is defined and usable later when stylesheets using the module are compiled. xsltRegisterExtFunction on the other hand do the binding only in the transformation context given as parameter, this is a runtime extension and affects only the currently running transformation. So different is mostly scope of use, and how the binding is done. Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ [EMAIL PROTECTED] | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/ _______________________________________________ xslt mailing list, project page http://xmlsoft.org/XSLT/ [email protected] http://mail.gnome.org/mailman/listinfo/xslt
