diff options
author | Mike Hommey <mh@glandium.org> | 2004-05-17 06:56:59 +0000 |
---|---|---|
committer | Mike Hommey <mh@glandium.org> | 2004-05-17 06:56:59 +0000 |
commit | d4e028c96af89ade493b440d4f2de6b684c03a06 (patch) | |
tree | 4b74b3cd4b14524309bc5a3e776d81d4bbc5efe4 /parser.c | |
parent | 81bcf076ea11e114a60e429338a15748066de163 (diff) | |
download | libxml2-upstream/2.6.10.tar.gz |
Load /tmp/tmp.QVLX5b/libxml2-2.6.10 intoupstream/2.6.10
packages/libxml2/branches/upstream/current.
Diffstat (limited to 'parser.c')
-rw-r--r-- | parser.c | 17 |
1 files changed, 13 insertions, 4 deletions
@@ -4794,8 +4794,13 @@ xmlParseElementChildrenContentDecl (xmlParserCtxtPtr ctxt, int inputchk) { } NEXT; if (RAW == '?') { - if (ret != NULL) - ret->ocur = XML_ELEMENT_CONTENT_OPT; + if (ret != NULL) { + if ((ret->ocur == XML_ELEMENT_CONTENT_PLUS) || + (ret->ocur == XML_ELEMENT_CONTENT_MULT)) + ret->ocur = XML_ELEMENT_CONTENT_MULT; + else + ret->ocur = XML_ELEMENT_CONTENT_OPT; + } NEXT; } else if (RAW == '*') { if (ret != NULL) { @@ -4822,7 +4827,11 @@ xmlParseElementChildrenContentDecl (xmlParserCtxtPtr ctxt, int inputchk) { if (ret != NULL) { int found = 0; - ret->ocur = XML_ELEMENT_CONTENT_PLUS; + if ((ret->ocur == XML_ELEMENT_CONTENT_OPT) || + (ret->ocur == XML_ELEMENT_CONTENT_MULT)) + ret->ocur = XML_ELEMENT_CONTENT_MULT; + else + ret->ocur = XML_ELEMENT_CONTENT_PLUS; /* * Some normalization: * (a | b*)+ == (a | b)* @@ -7580,7 +7589,7 @@ xmlParseEndTag2(xmlParserCtxtPtr ctxt, const xmlChar *prefix, } SKIP(2); - if ((tlen > 0) && (memcmp(ctxt->input->cur, ctxt->name, tlen) == 0)) { + if ((tlen > 0) && (strncmp(ctxt->input->cur, ctxt->name, tlen) == 0)) { if (ctxt->input->cur[tlen] == '>') { ctxt->input->cur += tlen + 1; goto done; |