# HG changeset patch
# User Nick Wellnhofer <wellnhofer@aevum.de>
# Date 1661480962 -7200
#      Fri Aug 26 04:29:22 2022 +0200
# Node ID 028c7ae856130e83fc3c4eb87eb8d03fae326bdc
# Parent  1f78cb6ac0475ca532d1db12ed57d1f821c807b8
Don't use deprecated libxml2 macros

diff --git a/libxslt/keys.c b/libxslt/keys.c
--- a/libxslt/keys.c
+++ b/libxslt/keys.c
@@ -310,7 +310,7 @@
     current = end = 0;
     while (match[current] != 0) {
 	start = current;
-	while (IS_BLANK_CH(match[current]))
+	while (xmlIsBlank_ch(match[current]))
 	    current++;
 	end = current;
 	while ((match[end] != 0) && (match[end] != '|')) {
diff --git a/libxslt/numbers.c b/libxslt/numbers.c
--- a/libxslt/numbers.c
+++ b/libxslt/numbers.c
@@ -92,6 +92,12 @@
     return xmlStrncmp(utf1, utf2, len);
 }
 
+static int
+xsltIsLetterDigit(int val) {
+    return xmlIsBaseCharQ(val) || xmlIsIdeographicQ(val) ||
+           xmlIsDigitQ(val);
+}
+
 /***** Stop temp insert *****/
 /************************************************************************
  *									*
@@ -347,8 +353,8 @@
      * Insert initial non-alphanumeric token.
      * There is always such a token in the list, even if NULL
      */
-    while (! (IS_LETTER(val=xmlStringCurrentChar(NULL, format+ix, &len)) ||
-	      IS_DIGIT(val)) ) {
+    while (!xsltIsLetterDigit(val = xmlStringCurrentChar(NULL, format+ix,
+                                                         &len))) {
 	if (format[ix] == 0)		/* if end of format string */
 	    break; /* while */
 	ix += len;
@@ -414,7 +420,7 @@
 	 * to correspond to the Letter and Digit classes from XML (and
 	 * one wonders why XSLT doesn't refer to these instead).
 	 */
-	while (IS_LETTER(val) || IS_DIGIT(val)) {
+	while (xsltIsLetterDigit(val)) {
 	    ix += len;
 	    val = xmlStringCurrentChar(NULL, format+ix, &len);
 	}
@@ -423,7 +429,7 @@
 	 * Insert temporary non-alphanumeric final tooken.
 	 */
 	j = ix;
-	while (! (IS_LETTER(val) || IS_DIGIT(val))) {
+	while (!xsltIsLetterDigit(val)) {
 	    if (val == 0)
 		break; /* while */
 	    ix += len;
diff --git a/libxslt/pattern.c b/libxslt/pattern.c
--- a/libxslt/pattern.c
+++ b/libxslt/pattern.c
@@ -1192,7 +1192,7 @@
 #define CUR_PTR ctxt->cur
 
 #define SKIP_BLANKS							\
-    while (IS_BLANK_CH(CUR)) NEXT
+    while (xmlIsBlank_ch(CUR)) NEXT
 
 #define CURRENT (*ctxt->cur)
 #define NEXT ((*ctxt->cur) ?  ctxt->cur++: ctxt->cur)
@@ -1235,11 +1235,11 @@
         NEXT;
 	cur = q = CUR_PTR;
 	val = xmlStringCurrentChar(NULL, cur, &len);
-	while ((IS_CHAR(val)) && (val != '"')) {
+	while ((xmlIsCharQ(val)) && (val != '"')) {
 	    cur += len;
 	    val = xmlStringCurrentChar(NULL, cur, &len);
 	}
-	if (!IS_CHAR(val)) {
+	if (!xmlIsCharQ(val)) {
 	    ctxt->error = 1;
 	    return(NULL);
 	} else {
@@ -1251,11 +1251,11 @@
         NEXT;
 	cur = q = CUR_PTR;
 	val = xmlStringCurrentChar(NULL, cur, &len);
-	while ((IS_CHAR(val)) && (val != '\'')) {
+	while ((xmlIsCharQ(val)) && (val != '\'')) {
 	    cur += len;
 	    val = xmlStringCurrentChar(NULL, cur, &len);
 	}
-	if (!IS_CHAR(val)) {
+	if (!xmlIsCharQ(val)) {
 	    ctxt->error = 1;
 	    return(NULL);
 	} else {
@@ -1290,14 +1290,15 @@
 
     cur = q = CUR_PTR;
     val = xmlStringCurrentChar(NULL, cur, &len);
-    if (!IS_LETTER(val) && (val != '_'))
+    if (!xmlIsBaseCharQ(val) && !xmlIsIdeographicQ(val) && (val != '_'))
 	return(NULL);
 
-    while ((IS_LETTER(val)) || (IS_DIGIT(val)) ||
+    while (xmlIsBaseCharQ(val) || xmlIsIdeographicQ(val) ||
+           xmlIsDigitQ(val) ||
            (val == '.') || (val == '-') ||
 	   (val == '_') ||
-	   (IS_COMBINING(val)) ||
-	   (IS_EXTENDER(val))) {
+	   xmlIsCombiningQ(val) ||
+	   xmlIsExtenderQ(val)) {
 	cur += len;
 	val = xmlStringCurrentChar(NULL, cur, &len);
     }
@@ -1853,7 +1854,7 @@
     current = end = 0;
     while (pattern[current] != 0) {
 	start = current;
-	while (IS_BLANK_CH(pattern[current]))
+	while (xmlIsBlank_ch(pattern[current]))
 	    current++;
 	end = current;
 	level = 0;
diff --git a/libxslt/transform.c b/libxslt/transform.c
--- a/libxslt/transform.c
+++ b/libxslt/transform.c
@@ -3637,12 +3637,12 @@
 
 	element = elements;
 	while (*element != 0) {
-	    while (IS_BLANK_CH(*element))
+	    while (xmlIsBlank_ch(*element))
 		element++;
 	    if (*element == 0)
 		break;
 	    end = element;
-	    while ((*end != 0) && (!IS_BLANK_CH(*end)))
+	    while ((*end != 0) && (!xmlIsBlank_ch(*end)))
 		end++;
 	    element = xmlStrndup(element, end - element);
 	    if (element) {