Re: [xslt] XSL Sort + ICU



On Wed, Nov 27, 2002 at 12:34:11PM -0000, Richard Jinks wrote:
> From: "Daniel Veillard" <veillard@redhat.com>
> >
> >  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:
   http://cvs.gnome.org/bonsai/cvsquery.cgi?module=libxslt&branch=HEAD&branchtype=match&dir=libxslt&file=&filetype=match&who=veillard&whotype=match&sortby=Date&hours=&date=explicit&mindate=11%2F27%2F02+07%3A34&maxdate=11%2F27%2F02+07%3A36&cvsroot=%2Fcvs%2Fgnome

  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.

  okay,

> 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 :-)

   thanks,

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard@redhat.com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



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