Re: [xslt] XSL Sort + ICU

On Wed, Nov 27, 2002 at 12:34:11PM -0000, Richard Jinks wrote:
> From: "Daniel Veillard" <>
> >
> >  I'm also wondering if we should not provide a way to register a specific
> sort
> > function in a given context, sounds better for multithreaded apps,
> something
> > like xsltSetCtxtSortFunc(xsltTransformContextPtr ctxt, xsltSortFunc
> handler);
> > store it in ctxt, and have the transformation look first for it then
> fallback
> > to the global setting. Sounds relatively trivial,
> >
> I did half consider this approach but decided against it purely because it
> would
> involve changing the xsltTransformContext structure, something that will
> break people's code if it changes.
> If you're OK with this, then I'm happy to make these changes - I'll try and
> get it
> done this afternoon.

  just make sure you add the field at the end of the structure. This breaks
only if people *allocate* the structure themselve which they should not do.
I revamped slightly the API already to make xsltDoSortFunction a real public
function acting as a dispatcher for the globally registred one. See the
patch commited:

  This make things easier because you just have to patch xsltDoSortFunction()
to check for a context specific function,

> >
> >   I should definitely be made availble, xsltproc could even use it, but
> > I don't want libxslt to globally embedd it or depend on it. Is there a
> > known shared library exporting ICU ?
> >   Send the code here, at least it will be archived and indexed :-)
> >
> I'll send it along with the other code changes.


> As a thought - would it be worth doing a similar thing for the number
> formatting
> (xsl:number) at some stage?

  Hum, yes except that the interface is likely to be far more complex,
let's stabilize Sort first and then we will see :-)



Daniel Veillard      | Red Hat Network  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

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