SEXP R_xsltRegisterExtModule(SEXP r_uri) { const char *url = strdup(CHAR(STRING_ELT(r_uri, 0))); xsltRegisterExtModule((const xmlChar *) url, RXSLT_initializeR, RXSLT_shutdownR); return(R_NilValue); }
/* * call-seq: * register(uri, custom_handler_class) * * Register a class that implements custom XLST transformation functions. */ static VALUE registr(VALUE self, VALUE uri, VALUE obj) { VALUE modules = rb_iv_get(self, "@modules"); if(NIL_P(modules)) rb_raise(rb_eRuntimeError, "wtf! @modules isn't set"); rb_hash_aset(modules, uri, obj); xsltRegisterExtModule((unsigned char *)StringValuePtr(uri), initFunc, shutdownFunc); return self; }
void registerRModule(int fromR) { #ifdef XSLT_DEBUG fprintf(stderr, "Registering R module\n");fflush(stderr); #endif xsltRegisterExtModule((const xmlChar *) R_URI, RXSLT_initializeR, RXSLT_shutdownR); /* This seems to be done twice, here and in RXSLT_initializeR. It is called each time the module is initialized which is each time it is required within the application of a stylesheet. registerBasicFunctions(NULL, R_URI, fromR); */ }
static void registerFooModule(void) { xsltRegisterExtModule(EXT_NS, registerFooExtensions, shutdownFooExtensions); }