Patch: rng stream validation (Bug 512454)

Noam Postavsky <[email protected]>
Newsgroups gmane.comp.gnome.lib.xslt
Message-ID <[email protected]>
Hi,

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

_______________________________________________
xslt mailing list, project page http://xmlsoft.org/XSLT/
[email protected]
http://mail.gnome.org/mailman/listinfo/xslt
rng-stream.patch (text/pl, 650 B)
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);
 
                 xmlFreeAutomata(ctxt->am);
                 ctxt->state = oldstate;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.