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

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

Issue 1977213002: Roll libxml to 8effcb578e0590cc01bbcab0f9dccefc6bdbcdbd (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update README.chromium. Created 4 years, 7 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
OLDNEW
1 /* 1 /*
2 * schemas.c : implementation of the XML Schema handling and 2 * schemas.c : implementation of the XML Schema handling and
3 * schema validity checking 3 * schema validity 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 <veillard@redhat.com> 7 * Daniel Veillard <veillard@redhat.com>
8 */ 8 */
9 9
10 /* 10 /*
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 int size; 610 int size;
611 611
612 /* 612 /*
613 * Used to build complex element content models 613 * Used to build complex element content models
614 */ 614 */
615 xmlAutomataPtr am; 615 xmlAutomataPtr am;
616 xmlAutomataStatePtr start; 616 xmlAutomataStatePtr start;
617 xmlAutomataStatePtr end; 617 xmlAutomataStatePtr end;
618 xmlAutomataStatePtr state; 618 xmlAutomataStatePtr state;
619 619
620 xmlDictPtr dict;» » /* dictionnary for interned string names */ 620 xmlDictPtr dict;» » /* dictionary for interned string names */
621 xmlSchemaTypePtr ctxtType; /* The current context simple/complex type */ 621 xmlSchemaTypePtr ctxtType; /* The current context simple/complex type */
622 int options; 622 int options;
623 xmlSchemaValidCtxtPtr vctxt; 623 xmlSchemaValidCtxtPtr vctxt;
624 int isS4S; 624 int isS4S;
625 int isRedefine; 625 int isRedefine;
626 int xsiAssemble; 626 int xsiAssemble;
627 int stop; /* If the parser should stop; i.e. a critical error. */ 627 int stop; /* If the parser should stop; i.e. a critical error. */
628 const xmlChar *targetNamespace; 628 const xmlChar *targetNamespace;
629 xmlSchemaBucketPtr redefined; /* The schema to be redefined. */ 629 xmlSchemaBucketPtr redefined; /* The schema to be redefined. */
630 630
(...skipping 26744 matching lines...) Expand 10 before | Expand all | Expand 10 after
27375 /* 27375 /*
27376 * Register attributes. 27376 * Register attributes.
27377 * SAX VAL TODO: We are not adding namespace declaration 27377 * SAX VAL TODO: We are not adding namespace declaration
27378 * attributes yet. 27378 * attributes yet.
27379 */ 27379 */
27380 if (nb_attributes != 0) { 27380 if (nb_attributes != 0) {
27381 xmlChar *value; 27381 xmlChar *value;
27382 27382
27383 for (j = 0, i = 0; i < nb_attributes; i++, j += 5) { 27383 for (j = 0, i = 0; i < nb_attributes; i++, j += 5) {
27384 /* 27384 /*
27385 » * Duplicate the value. 27385 » * Duplicate the value, changing any &#38; to a literal ampersand.
27386 » *
27387 » * libxml2 differs from normal SAX here in that it escapes all ampers ands
27388 » * as &#38; instead of delivering the raw converted string. Changing the
27389 » * behavior at this point would break applications that use this API, so
27390 » * we are forced to work around it. There is no danger of accidentall y
27391 » * decoding some entity other than &#38; in this step because without
27392 » * unescaped ampersands there can be no other entities in the string.
27386 */ 27393 */
27387 » value = xmlStrndup(attributes[j+3], 27394 » value = xmlStringLenDecodeEntities(vctxt->parserCtxt, attributes[j+3 ],
27388 » » attributes[j+4] - attributes[j+3]); 27395 » » attributes[j+4] - attributes[j+3], XML_SUBSTITUTE_REF, 0, 0, 0);
27389 /* 27396 /*
27390 * TODO: Set the node line. 27397 * TODO: Set the node line.
27391 */ 27398 */
27392 ret = xmlSchemaValidatorPushAttribute(vctxt, 27399 ret = xmlSchemaValidatorPushAttribute(vctxt,
27393 NULL, ielem->nodeLine, attributes[j], attributes[j+2], 0, 27400 NULL, ielem->nodeLine, attributes[j], attributes[j+2], 0,
27394 value, 1); 27401 value, 1);
27395 if (ret == -1) { 27402 if (ret == -1) {
27396 VERROR_INT("xmlSchemaSAXHandleStartElementNs", 27403 VERROR_INT("xmlSchemaSAXHandleStartElementNs",
27397 "calling xmlSchemaValidatorPushAttribute()"); 27404 "calling xmlSchemaValidatorPushAttribute()");
27398 goto internal_error; 27405 goto internal_error;
(...skipping 1499 matching lines...) Expand 10 before | Expand all | Expand 10 after
28898 xmlSchemaValidCtxtGetParserCtxt(xmlSchemaValidCtxtPtr ctxt) 28905 xmlSchemaValidCtxtGetParserCtxt(xmlSchemaValidCtxtPtr ctxt)
28899 { 28906 {
28900 if (ctxt == NULL) 28907 if (ctxt == NULL)
28901 return(NULL); 28908 return(NULL);
28902 return (ctxt->parserCtxt); 28909 return (ctxt->parserCtxt);
28903 } 28910 }
28904 28911
28905 #define bottom_xmlschemas 28912 #define bottom_xmlschemas
28906 #include "elfgcchack.h" 28913 #include "elfgcchack.h"
28907 #endif /* LIBXML_SCHEMAS_ENABLED */ 28914 #endif /* LIBXML_SCHEMAS_ENABLED */
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698