diff options
author | William M. Brack <wbrack@src.gnome.org> | 2004-03-27 17:54:18 +0000 |
---|---|---|
committer | William M. Brack <wbrack@src.gnome.org> | 2004-03-27 17:54:18 +0000 |
commit | 609296259555c3ea1c42292b497e04fad30bbcf6 (patch) | |
tree | 79d5ab21b69e44c5d5ece5cf5b46eea2ee8a1347 /relaxng.c | |
parent | f8e6668041abbc70309e7a86645c19da0bcb1015 (diff) | |
download | libxml2-609296259555c3ea1c42292b497e04fad30bbcf6.tar.gz |
fixed problem with IS_COMPILABLE flag (bug 130216)
* relaxng.c: fixed problem with IS_COMPILABLE flag
(bug 130216)
Diffstat (limited to 'relaxng.c')
-rw-r--r-- | relaxng.c | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -2340,7 +2340,8 @@ xmlRelaxNGAddValidError(xmlRelaxNGValidCtxtPtr ctxt, /* * generate the error directly */ - if (((ctxt->flags & 1) == 0) || (ctxt->flags & 2)) { + if (((ctxt->flags & FLAGS_IGNORABLE) == 0) || + (ctxt->flags & FLAGS_NEGATIVE)) { xmlNodePtr node, seq; /* @@ -2880,9 +2881,15 @@ xmlRelaxNGIsCompileable(xmlRelaxNGDefinePtr def) break; list = list->next; } - if (ret == 0) + /* + * Because the routine is recursive, we must guard against + * discovering both COMPILABLE and NOT_COMPILABLE + */ + if (ret == 0) { + def->dflags &= ~IS_COMPILABLE; def->dflags |= IS_NOT_COMPILABLE; - if (ret == 1) + } + if ((ret == 1) && !(def->dflags &= IS_NOT_COMPILABLE)) def->dflags |= IS_COMPILABLE; #ifdef DEBUG_COMPILE if (ret == 1) { |