Commit d6dc4cb3 authored by Daniel Veillard's avatar Daniel Veillard
Browse files

implemented E59 spaces in CDATA does not match the nonterminal S Daniel

* valid.c: implemented E59 spaces in CDATA does not match the
  nonterminal S
Daniel
parent 878eab04
Tue Feb 19 15:17:02 CET 2002 Daniel Veillard <daniel@veillard.com>
* valid.c: implemented E59 spaces in CDATA does not match the
nonterminal S
Tue Feb 19 14:44:53 CET 2002 Daniel Veillard <daniel@veillard.com>
* SAX.c parser.c valid.c: more validation test fixups
......
......@@ -3534,7 +3534,8 @@ cont:
return(-2);
} while ((NODE != NULL) &&
((NODE->type != XML_ELEMENT_NODE) &&
(NODE->type != XML_TEXT_NODE)));
(NODE->type != XML_TEXT_NODE) &&
(NODE->type != XML_CDATA_SECTION_NODE)));
ret = 1;
break;
} else {
......@@ -3574,7 +3575,8 @@ cont:
return(-2);
} while ((NODE != NULL) &&
((NODE->type != XML_ELEMENT_NODE) &&
(NODE->type != XML_TEXT_NODE)));
(NODE->type != XML_TEXT_NODE) &&
(NODE->type != XML_CDATA_SECTION_NODE)));
} else {
DEBUG_VALID_MSG("element failed");
ret = 0;
......@@ -3976,10 +3978,11 @@ xmlValidateElementContent(xmlValidCtxtPtr ctxt, xmlNodePtr child,
}
break;
case XML_TEXT_NODE:
case XML_CDATA_SECTION_NODE:
if (xmlIsBlankNode(cur))
break;
/* no break on purpose */
case XML_CDATA_SECTION_NODE:
/* no break on purpose */
case XML_ELEMENT_NODE:
/*
* Allocate a new node and minimally fills in
......@@ -4004,6 +4007,13 @@ xmlValidateElementContent(xmlValidCtxtPtr ctxt, xmlNodePtr child,
last->next = tmp;
last = tmp;
}
if (cur->type == XML_CDATA_SECTION_NODE) {
/*
* E59 spaces in CDATA does not match the
* nonterminal S
*/
tmp->content = xmlStrdup(BAD_CAST "CDATA");
}
break;
default:
break;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment