Action against software patentsGNOME2 LogoW3C logoRed Hat Logo
Made with Libxslt Logo

The XSLT C library for GNOME

Module xsltlocale from libxslt

API Menu
Related links
API Indexes

Interfaces for locale handling. Needed for language dependent sorting.

Table of Contents

#define XSLT_LOCALE_NONE
Typedef void * xsltLocale
Typedef xmlChar xsltLocaleChar
void	xsltFreeLocale			(xsltLocale locale)
int	xsltLocaleStrcmp		(xsltLocale locale, 
const xsltLocaleChar * str1,
const xsltLocaleChar * str2)
xsltLocale	xsltNewLocale		(const xmlChar * languageTag)
xsltLocaleChar *	xsltStrxfrm	(xsltLocale locale, 
const xmlChar * string)

Description

Macro: XSLT_LOCALE_NONE

#define XSLT_LOCALE_NONE

Macro indicating that locale are not supported

Function: xsltFreeLocale

void	xsltFreeLocale			(xsltLocale locale)

Frees a locale created with xsltNewLocale

locale:the locale to free

Function: xsltLocaleStrcmp

int	xsltLocaleStrcmp		(xsltLocale locale, 
const xsltLocaleChar * str1,
const xsltLocaleChar * str2)

Compares two strings transformed with xsltStrxfrm

locale:a locale identifier
str1:a string transformed with xsltStrxfrm
str2:a string transformed with xsltStrxfrm
Returns:a value < 0 if str1 sorts before str2, a value > 0 if str1 sorts after str2, 0 if str1 and str2 are equal wrt sorting

Function: xsltNewLocale

xsltLocale	xsltNewLocale		(const xmlChar * languageTag)

Creates a new locale of an opaque system dependent type based on the language tag.

languageTag:RFC 3066 language tag
Returns:the locale or NULL on error or if no matching locale was found

Function: xsltStrxfrm

xsltLocaleChar *	xsltStrxfrm	(xsltLocale locale, 
const xmlChar * string)

Transforms a string according to locale. The transformed string must then be compared with xsltLocaleStrcmp and freed with xmlFree.

locale:locale created with xsltNewLocale
string:UTF-8 string to transform
Returns:the transformed string or NULL on error

Daniel Veillard