diff -ru libxslt-1.1.15_orig/ChangeLog libxslt-1.1.15/ChangeLog
--- libxslt-1.1.15_orig/ChangeLog	2005-09-05 00:45:11.000000000 +0200
+++ libxslt-1.1.15/ChangeLog	2005-11-27 08:10:47.000000000 +0100
@@ -1,3 +1,8 @@
+Sun Nov 27 08:03:02 CET 2005 Bart Martens <bart.martens@advalvas.be>
+
+	* libxslt/xsltutils.c: enhanced xsltDefaultSortFunction to
+	use the case-order attribute of the sort tag, see bug #310201
+
 Mon Sep  5 00:44:24 CEST 2005 Daniel Veillard <daniel@veillard.com>
 
 	* configure.in NEWS doc/*: preparing release 1.1.15
diff -ru libxslt-1.1.15_orig/libxslt/xsltutils.c libxslt-1.1.15/libxslt/xsltutils.c
--- libxslt-1.1.15_orig/libxslt/xsltutils.c	2005-09-05 00:43:01.000000000 +0200
+++ libxslt-1.1.15/libxslt/xsltutils.c	2005-11-27 08:02:21.000000000 +0100
@@ -1034,8 +1034,14 @@
 			    tst = 1;
 			else tst = -1;
 		    } else {
-			tst = xmlStrcmp(results[j]->stringval,
-				     results[j + incr]->stringval); 
+			tst = xmlStrcasecmp(results[j]->stringval,
+				results[j + incr]->stringval); 
+			if (tst == 0) {
+				tst = xmlStrcmp(results[j]->stringval,
+					results[j + incr]->stringval); 
+				if (comp->lower_first)
+					tst = -tst;
+			}
 		    }
 		    if (descending)
 			tst = -tst;
@@ -1088,8 +1094,14 @@
 				    tst = 1;
 				else tst = -1;
 			    } else {
-				tst = xmlStrcmp(res[j]->stringval,
-					     res[j + incr]->stringval); 
+				tst = xmlStrcasecmp(res[j]->stringval,
+					res[j + incr]->stringval); 
+				if (tst == 0) {
+					tst = xmlStrcmp(res[j]->stringval,
+						res[j + incr]->stringval); 
+					if (comp->lower_first)
+						tst = -tst;
+				}
 			    }
 			    if (desc)
 				tst = -tst;
