diff options
author | Mike Hommey <mh@glandium.org> | 2005-02-05 12:06:19 +0000 |
---|---|---|
committer | Mike Hommey <mh@glandium.org> | 2005-02-05 12:06:19 +0000 |
commit | a7457388701e6ccba9091ba3ec09505dc903b758 (patch) | |
tree | 80a7d0fba3968fee73cc71a62ffe1af039396f29 /relaxng.c | |
parent | f51dd67f3a3f472af0620391eb588eeca4533689 (diff) | |
download | libxml2-a7457388701e6ccba9091ba3ec09505dc903b758.tar.gz |
Load /tmp/tmp.5kkLmZ/libxml2-2.6.17 intoupstream/2.6.17
packages/libxml2/branches/upstream/current.
Diffstat (limited to 'relaxng.c')
-rw-r--r-- | relaxng.c | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -10047,8 +10047,13 @@ xmlRelaxNGValidateState(xmlRelaxNGValidCtxtPtr ctxt, node = xmlRelaxNGSkipIgnored(ctxt, node); errNr = ctxt->errNr; - if ((define->dflags & IS_TRIABLE) - && (define->data != NULL)) { + if ((define->dflags & IS_TRIABLE) && (define->data != NULL) && + (node != NULL)) { + /* + * node == NULL can't be optimized since IS_TRIABLE + * doesn't account for choice which may lead to + * only attributes. + */ xmlHashTablePtr triage = (xmlHashTablePtr) define->data; @@ -10056,10 +10061,6 @@ xmlRelaxNGValidateState(xmlRelaxNGValidCtxtPtr ctxt, * Something we can optimize cleanly there is only one * possble branch out ! */ - if (node == NULL) { - ret = -1; - break; - } if ((node->type == XML_TEXT_NODE) || (node->type == XML_CDATA_SECTION_NODE)) { list = |