Re: [xslt] extension



> > I suppose that I have to call some function in my main.
>
>   exsltRegisterAll(); probably,

On a related note, I've got a couple of extension function built into an
extension module and they work nicely. (I'd like to say I found the
documentation on how to write them really helpful, since there have been
complaints about the docs lately.)

I've added a call to xsltRegisterExtModule() to a modifed version of
xsltproc (just after the exsltRegisterAll() ) so that I can use them from
there, and again all works nicely.

I was just curious why they don't show up when I use --dumpextensions.

It looks like each LibEXSLT extension is added individually using
xsltRegisterExtModuleFunction() or xsltRegisterExtensionModuleElement()
instead of xsltRegisterExtModule() to do whole modules.

I just wondered if there's a reason for doing that this way instead? From
trawling the mailing lists, I found this:

"You don't need xsltRegisterExtModule() until you need to share data
between several extensions (functions or elements) in the same module
(same namespace URI) or need to do something before or after using an
extension."

So, is the preferred method to register each function/element
individually? I'd thought that registering the whole module was simpler...

Thanks,

Steve



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]