Re: Entering freeze for release of libxml2-2.9.9

Nikolai Weibull via xml <[email protected]> Mon, 24 Dec 2018 12:00:40 +0100
Newsgroups gmane.comp.gnome.lib.xml.general
Message-ID <[email protected]>
Hi!

Stefan Behnel, 2018-12-24 11:43:

> Nick Wellnhofer schrieb am 19.12.18 um 17:02:
>> On 30/11/2018 11:41, Nikolai Weibull via xml wrote:
>>> OK, now I understand why it was working in my copy of the 
>>> repository and
>>> not yours. Something went wrong when you applied the patch, 
>>> Daniel, as a
>>> line was elided. Here’s a fix. We want to include 
>>> XML_RELAXNG_TEXT here
>>> as well, otherwise it won’t work. The second part of the patch 
>>> below was
>>> just to reorder the types to be listed in alphabetical order, 
>>> so you may
>>> certainly skip that.
>> 
>> Stefan, can you confirm that Nikolai's patch fixes the lxml 
>> issue?
>
> Sorry for the silence, I wasn't aware that I had to do 
> something. Problem
> is, the patch that Nikolai sent doesn't apply for me.

> Nikolai, could you create a patch against the latest master that 
> makes
> relaxng.c the way you think it should be? (Or should have been 
> in the first
> place?) Please attach it rather than pasting it into a mail, to 
> make sure
> it passes without whitespace issues.

I just applied the patch (with patch < a.patch) without issue against master.  I’m attaching it as well so that you can try that.


  Nikolai

_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
[email protected]
https://mail.gnome.org/mailman/listinfo/xml
a.patch (text/x-patch, 1 KB)
--- ../libxml2/relaxng.c	2018-11-30 11:28:37.000000000 +0100
+++ relaxng.c	2018-11-30 11:25:54.000000000 +0100
@@ -4023,8 +4023,8 @@
             ((eora == 2) && ((cur->type == XML_RELAXNG_DATATYPE) ||
 	                     (cur->type == XML_RELAXNG_ELEMENT) ||
 			     (cur->type == XML_RELAXNG_LIST) ||
+                             (cur->type == XML_RELAXNG_TEXT) ||
 			     (cur->type == XML_RELAXNG_VALUE)))) {
-
             if (ret == NULL) {
                 max = 10;
                 ret = (xmlRelaxNGDefinePtr *)
@@ -9285,9 +9285,9 @@
                 return (1);
         } else if (((node->type == XML_TEXT_NODE) ||
                     (node->type == XML_CDATA_SECTION_NODE)) &&
-                   ((cur->type == XML_RELAXNG_TEXT) ||
-		    (cur->type == XML_RELAXNG_DATATYPE) ||
+                   ((cur->type == XML_RELAXNG_DATATYPE) ||
 		    (cur->type == XML_RELAXNG_LIST) ||
+                    (cur->type == XML_RELAXNG_TEXT) ||
                     (cur->type == XML_RELAXNG_VALUE))) {
             return (1);
         }