Re: [xslt] Support of lang on xsl:sort
- From: Daniel Veillard <veillard redhat com>
- To: The Gnome XSLT library mailing-list <xslt gnome org>
- Subject: Re: [xslt] Support of lang on xsl:sort
- Date: Mon, 6 Sep 2004 19:03:13 -0400
On Mon, Sep 06, 2004 at 01:01:45PM +0200, Jirka Kosek wrote:
> Hi,
>
> I tried to find some documentation about using different sort orders in
> the libxslt, but I was completely unsuccessful.
>
> Can xsltproc use locale provided by underlying OS when there is language
> specified in lang attribute?
by default no. Depending on the locale is IMHO an abomination, and the
I18N zillion different sort depending on the language is also an
abomination, plus the only current implementation (ICU) is a pig
5 times larger than libxslt/xsltproc itself. Eek, no ...
> It is possible to supply my own collation implementation?
At the libxslt level, yes. See xsltutils.h:
XSLTPUBFUN void XSLTCALL
xsltSetSortFunc (xsltSortFunc handler);
XSLTPUBFUN void XSLTCALL
xsltSetCtxtSortFunc (xsltTransformContextPtr ctxt,
xsltSortFunc handler);
XSLTPUBFUN void XSLTCALL
xsltDefaultSortFunction (xsltTransformContextPtr ctxt,
xmlNodePtr *sorts,
int nbsorts);
and the example code to use it to plug ITU in
examples/xsltICUSort.c
in the source distribution.
Daniel
--
Daniel Veillard | Red Hat Desktop team http://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]