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

Re: [xml] XSLT extension: custom data



On Fri, Oct 24, 2008 at 06:01:01PM +0200, Florent Guiliani wrote:
> Hi all,
> 
> Is there a way to pass custom data when registering a xslt function or extension?
> 
> I'm adding a function that need to retrieve session data to perform.
> 
> From:
> http://xmlsoft.org/XSLT/extensions.html
> I saw that xsltRegisterExtModule only take a xsltExtInitFunction without any
> extra data. xsltRegisterExtFunction doesn't take custom data too.
> 
> Another way would be to put a session data pointer into the xsltTransformContext
> structure. Can we use 'xsltRuntimeExtraPtr extras', 'xmlHashTablePtr extInfos'
> or 'void *contextVariable' for this purpose?

  See
  void            *_private;          /* user defined data */

in the xsltTransformContext structure. This was really defined for this.

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel veillard com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/


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