Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(149)

Side by Side Diff: third_party/libxml/src/valid.c

Issue 2797923004: Improve XML serialization, URI parsing, and XPath node set processing. (Closed)
Patch Set: Rebase. Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/libxml/src/uri.c ('k') | third_party/libxml/src/xpath.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * valid.c : part of the code use to do the DTD handling and the validity 2 * valid.c : part of the code use to do the DTD handling and the validity
3 * checking 3 * checking
4 * 4 *
5 * See Copyright for the status of this software. 5 * See Copyright for the status of this software.
6 * 6 *
7 * daniel@veillard.com 7 * daniel@veillard.com
8 */ 8 */
9 9
10 #define IN_LIBXML 10 #define IN_LIBXML
(...skipping 1154 matching lines...) Expand 10 before | Expand all | Expand 10 after
1165 xmlBufferWriteChar(buf, "#PCDATA"); 1165 xmlBufferWriteChar(buf, "#PCDATA");
1166 break; 1166 break;
1167 case XML_ELEMENT_CONTENT_ELEMENT: 1167 case XML_ELEMENT_CONTENT_ELEMENT:
1168 if (content->prefix != NULL) { 1168 if (content->prefix != NULL) {
1169 xmlBufferWriteCHAR(buf, content->prefix); 1169 xmlBufferWriteCHAR(buf, content->prefix);
1170 xmlBufferWriteChar(buf, ":"); 1170 xmlBufferWriteChar(buf, ":");
1171 } 1171 }
1172 xmlBufferWriteCHAR(buf, content->name); 1172 xmlBufferWriteCHAR(buf, content->name);
1173 break; 1173 break;
1174 case XML_ELEMENT_CONTENT_SEQ: 1174 case XML_ELEMENT_CONTENT_SEQ:
1175 if (content->c1 == NULL) return;
1175 if ((content->c1->type == XML_ELEMENT_CONTENT_OR) || 1176 if ((content->c1->type == XML_ELEMENT_CONTENT_OR) ||
1176 (content->c1->type == XML_ELEMENT_CONTENT_SEQ)) 1177 (content->c1->type == XML_ELEMENT_CONTENT_SEQ))
1177 xmlDumpElementContent(buf, content->c1, 1); 1178 xmlDumpElementContent(buf, content->c1, 1);
1178 else 1179 else
1179 xmlDumpElementContent(buf, content->c1, 0); 1180 xmlDumpElementContent(buf, content->c1, 0);
1180 xmlBufferWriteChar(buf, " , "); 1181 xmlBufferWriteChar(buf, " , ");
1182 if (content->c2 == NULL) return;
1181 if ((content->c2->type == XML_ELEMENT_CONTENT_OR) || 1183 if ((content->c2->type == XML_ELEMENT_CONTENT_OR) ||
1182 ((content->c2->type == XML_ELEMENT_CONTENT_SEQ) && 1184 ((content->c2->type == XML_ELEMENT_CONTENT_SEQ) &&
1183 (content->c2->ocur != XML_ELEMENT_CONTENT_ONCE))) 1185 (content->c2->ocur != XML_ELEMENT_CONTENT_ONCE)))
1184 xmlDumpElementContent(buf, content->c2, 1); 1186 xmlDumpElementContent(buf, content->c2, 1);
1185 else 1187 else
1186 xmlDumpElementContent(buf, content->c2, 0); 1188 xmlDumpElementContent(buf, content->c2, 0);
1187 break; 1189 break;
1188 case XML_ELEMENT_CONTENT_OR: 1190 case XML_ELEMENT_CONTENT_OR:
1191 if (content->c1 == NULL) return;
1189 if ((content->c1->type == XML_ELEMENT_CONTENT_OR) || 1192 if ((content->c1->type == XML_ELEMENT_CONTENT_OR) ||
1190 (content->c1->type == XML_ELEMENT_CONTENT_SEQ)) 1193 (content->c1->type == XML_ELEMENT_CONTENT_SEQ))
1191 xmlDumpElementContent(buf, content->c1, 1); 1194 xmlDumpElementContent(buf, content->c1, 1);
1192 else 1195 else
1193 xmlDumpElementContent(buf, content->c1, 0); 1196 xmlDumpElementContent(buf, content->c1, 0);
1194 xmlBufferWriteChar(buf, " | "); 1197 xmlBufferWriteChar(buf, " | ");
1198 if (content->c2 == NULL) return;
1195 if ((content->c2->type == XML_ELEMENT_CONTENT_SEQ) || 1199 if ((content->c2->type == XML_ELEMENT_CONTENT_SEQ) ||
1196 ((content->c2->type == XML_ELEMENT_CONTENT_OR) && 1200 ((content->c2->type == XML_ELEMENT_CONTENT_OR) &&
1197 (content->c2->ocur != XML_ELEMENT_CONTENT_ONCE))) 1201 (content->c2->ocur != XML_ELEMENT_CONTENT_ONCE)))
1198 xmlDumpElementContent(buf, content->c2, 1); 1202 xmlDumpElementContent(buf, content->c2, 1);
1199 else 1203 else
1200 xmlDumpElementContent(buf, content->c2, 0); 1204 xmlDumpElementContent(buf, content->c2, 0);
1201 break; 1205 break;
1202 default: 1206 default:
1203 xmlErrValid(NULL, XML_ERR_INTERNAL_ERROR, 1207 xmlErrValid(NULL, XML_ERR_INTERNAL_ERROR,
1204 "Internal: ELEMENT content corrupted invalid type\n", 1208 "Internal: ELEMENT content corrupted invalid type\n",
(...skipping 5840 matching lines...) Expand 10 before | Expand all | Expand 10 after
7045 */ 7049 */
7046 test_node->name = name; 7050 test_node->name = name;
7047 xmlFreeNode(test_node); 7051 xmlFreeNode(test_node);
7048 7052
7049 return(nb_valid_elements); 7053 return(nb_valid_elements);
7050 } 7054 }
7051 #endif /* LIBXML_VALID_ENABLED */ 7055 #endif /* LIBXML_VALID_ENABLED */
7052 7056
7053 #define bottom_valid 7057 #define bottom_valid
7054 #include "elfgcchack.h" 7058 #include "elfgcchack.h"
OLDNEW
« no previous file with comments | « third_party/libxml/src/uri.c ('k') | third_party/libxml/src/xpath.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698