| 1 |
<?xml version="1.0" encoding="UTF-8"?> |
| 2 |
<html> |
| 3 |
<head> |
| 4 |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> |
| 5 |
<title>xsltlocale: Locale handling</title> |
| 6 |
<meta name="generator" content="Libxml2 devhelp stylesheet"/> |
| 7 |
<link rel="start" href="index.html" title="libxslt Reference Manual"/> |
| 8 |
<link rel="up" href="general.html" title="API"/> |
| 9 |
<link rel="stylesheet" href="style.css" type="text/css"/> |
| 10 |
<link rel="chapter" href="general.html" title="API"/> |
| 11 |
</head> |
| 12 |
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> |
| 13 |
<table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"> |
| 14 |
<tr valign="middle"> |
| 15 |
<td> |
| 16 |
<a accesskey="p" href="libxslt-xsltexports.html"> |
| 17 |
<img src="left.png" width="24" height="24" border="0" alt="Prev"/> |
| 18 |
</a> |
| 19 |
</td> |
| 20 |
<td> |
| 21 |
<a accesskey="u" href="general.html"> |
| 22 |
<img src="up.png" width="24" height="24" border="0" alt="Up"/> |
| 23 |
</a> |
| 24 |
</td> |
| 25 |
<td> |
| 26 |
<a accesskey="h" href="index.html"> |
| 27 |
<img src="home.png" width="24" height="24" border="0" alt="Home"/> |
| 28 |
</a> |
| 29 |
</td> |
| 30 |
<td> |
| 31 |
<a accesskey="n" href="libxslt-xsltutils.html"> |
| 32 |
<img src="right.png" width="24" height="24" border="0" alt="Next"/> |
| 33 |
</a> |
| 34 |
</td> |
| 35 |
<th width="100%" align="center">libxslt Reference Manual</th> |
| 36 |
</tr> |
| 37 |
</table> |
| 38 |
<h2> |
| 39 |
<span class="refentrytitle">xsltlocale</span> |
| 40 |
</h2> |
| 41 |
<p>xsltlocale - Locale handling</p> |
| 42 |
<p>Interfaces for locale handling. Needed for language dependent sorting. </p> |
| 43 |
<p>Author(s): Nick Wellnhofer </p> |
| 44 |
<div class="refsynopsisdiv"> |
| 45 |
<h2>Synopsis</h2> |
| 46 |
<pre class="synopsis">typedef void * <a href="#xsltLocale">xsltLocale</a>; |
| 47 |
typedef xmlChar <a href="#xsltLocaleChar">xsltLocaleChar</a>; |
| 48 |
void <a href="#xsltFreeLocale">xsltFreeLocale</a> (void * locale); |
| 49 |
void <a href="#xsltFreeLocales">xsltFreeLocales</a> (void); |
| 50 |
int <a href="#xsltLocaleStrcmp">xsltLocaleStrcmp</a> (void * locale, <br/> const xmlChar * str1, <br/> const xmlChar * str2); |
| 51 |
void * <a href="#xsltNewLocale">xsltNewLocale</a> (const xmlChar * languageTag, <br/> int lowerFirst); |
| 52 |
xmlChar * <a href="#xsltStrxfrm">xsltStrxfrm</a> (void * vlocale, <br/> const xmlChar * string); |
| 53 |
</pre> |
| 54 |
</div> |
| 55 |
<div class="refsect1" lang="en"> |
| 56 |
<h2>Description</h2> |
| 57 |
</div> |
| 58 |
<div class="refsect1" lang="en"> |
| 59 |
<h2>Details</h2> |
| 60 |
<div class="refsect2" lang="en"> |
| 61 |
<div class="refsect2" lang="en"><h3><a name="xsltLocale">Typedef </a>xsltLocale</h3><pre class="programlisting">void * xsltLocale; |
| 62 |
</pre><p/> |
| 63 |
</div> |
| 64 |
<hr/> |
| 65 |
<div class="refsect2" lang="en"><h3><a name="xsltLocaleChar">Typedef </a>xsltLocaleChar</h3><pre class="programlisting">xmlChar xsltLocaleChar; |
| 66 |
</pre><p/> |
| 67 |
</div> |
| 68 |
<hr/> |
| 69 |
<div class="refsect2" lang="en"><h3><a name="xsltFreeLocale"/>xsltFreeLocale ()</h3><pre class="programlisting">void xsltFreeLocale (void * locale)<br/> |
| 70 |
</pre><p>Frees a locale created with <a href="libxslt-xsltlocale.html#xsltNewLocale">xsltNewLocale</a></p> |
| 71 |
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>locale</tt></i>:</span></td><td>the locale to free</td></tr></tbody></table></div></div> |
| 72 |
<hr/> |
| 73 |
<div class="refsect2" lang="en"><h3><a name="xsltFreeLocales"/>xsltFreeLocales ()</h3><pre class="programlisting">void xsltFreeLocales (void)<br/> |
| 74 |
</pre><p>Cleanup function for the locale support on shutdown</p> |
| 75 |
</div> |
| 76 |
<hr/> |
| 77 |
<div class="refsect2" lang="en"><h3><a name="xsltLocaleStrcmp"/>xsltLocaleStrcmp ()</h3><pre class="programlisting">int xsltLocaleStrcmp (void * locale, <br/> const xmlChar * str1, <br/> const xmlChar * str2)<br/> |
| 78 |
</pre><p>DEPRECATED: Same as xmlStrcmp. Compares two strings transformed with xsltStrxfrm.</p> |
| 79 |
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>locale</tt></i>:</span></td><td>unused</td></tr><tr><td><span class="term"><i><tt>str1</tt></i>:</span></td><td>a string transformed with <a href="libxslt-xsltlocale.html#xsltStrxfrm">xsltStrxfrm</a></td></tr><tr><td><span class="term"><i><tt>str2</tt></i>:</span></td><td>a string transformed with <a href="libxslt-xsltlocale.html#xsltStrxfrm">xsltStrxfrm</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>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</td></tr></tbody></table></div></div> |
| 80 |
<hr/> |
| 81 |
<div class="refsect2" lang="en"><h3><a name="xsltNewLocale"/>xsltNewLocale ()</h3><pre class="programlisting">void * xsltNewLocale (const xmlChar * languageTag, <br/> int lowerFirst)<br/> |
| 82 |
</pre><p>Creates a new locale of an opaque system dependent type based on the language tag.</p> |
| 83 |
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>languageTag</tt></i>:</span></td><td>RFC 3066 language tag</td></tr><tr><td><span class="term"><i><tt>lowerFirst</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the locale or NULL on error or if no matching locale was found</td></tr></tbody></table></div></div> |
| 84 |
<hr/> |
| 85 |
<div class="refsect2" lang="en"><h3><a name="xsltStrxfrm"/>xsltStrxfrm ()</h3><pre class="programlisting">xmlChar * xsltStrxfrm (void * vlocale, <br/> const xmlChar * string)<br/> |
| 86 |
</pre><p>Transforms a string according to locale. The transformed string must be freed with xmlFree.</p> |
| 87 |
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>vlocale</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>string</tt></i>:</span></td><td>UTF-8 string to transform</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the transformed string or NULL on error</td></tr></tbody></table></div></div> |
| 88 |
<hr/> |
| 89 |
</div> |
| 90 |
</div> |
| 91 |
</body> |
| 92 |
</html> |