[libxml2] 558452 RNG compilation of optional multiple child



commit fd78077281da3a3f51e1dc4de7113acfcb3c017c
Author: Daniel Veillard <veillard redhat com>
Date:   Wed Aug 26 18:35:29 2009 +0200

    558452 RNG compilation of optional multiple child
    
    * relaxng.c: don't assume there is a single define under a optional

 relaxng.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/relaxng.c b/relaxng.c
index e4ccb12..a0ddcc6 100644
--- a/relaxng.c
+++ b/relaxng.c
@@ -3100,7 +3100,11 @@ xmlRelaxNGCompile(xmlRelaxNGParserCtxtPtr ctxt, xmlRelaxNGDefinePtr def)
         case XML_RELAXNG_OPTIONAL:{
                 xmlAutomataStatePtr oldstate = ctxt->state;
 
-                xmlRelaxNGCompile(ctxt, def->content);
+                list = def->content;
+                while (list != NULL) {
+                    xmlRelaxNGCompile(ctxt, list);
+                    list = list->next;
+                }
                 xmlAutomataNewEpsilon(ctxt->am, oldstate, ctxt->state);
                 break;
             }



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