[xslt] Patch: rng stream validation (Bug 512454)


I think the problem is that the return value of xmlRegexpIsDeterminist()
is ignored. The patch fixes the test cases mentioned in the report[1],
but I don't entirely understand what the functions do so I'm not sure
whether my patch is correct.

thanks, Noam

[1] https://bugzilla.gnome.org/show_bug.cgi?id=512454

diff --git c/relaxng.c w/relaxng.c
index 6dbc499..99fd8eb 100644
--- c/relaxng.c
+++ w/relaxng.c
@@ -3059,8 +3059,8 @@ xmlRelaxNGCompile(xmlRelaxNGParserCtxtPtr ctxt, xmlRelaxNGDefinePtr def)
                     list = list->next;
                 xmlAutomataSetFinalState(ctxt->am, ctxt->state);
-                def->contModel = xmlAutomataCompile(ctxt->am);
-                xmlRegexpIsDeterminist(def->contModel);
+                if (xmlAutomataIsDeterminist(ctxt->am))
+                    def->contModel = xmlAutomataCompile(ctxt->am);
                 ctxt->state = oldstate;

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]