1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-29 11:41:22 +03:00

small change to xmlSchemaValidateAttributes, also corrected typo on error

* xmlschemas.c: small change to xmlSchemaValidateAttributes,
  also corrected typo on error code enum.
* include/libxml/xmlerror.h: corrected typo on schema error
  code enum
This commit is contained in:
William M. Brack
2004-06-03 10:50:29 +00:00
parent 803812b9fe
commit 767265dd9c
3 changed files with 13 additions and 6 deletions

View File

@ -1,3 +1,10 @@
Thu Jun 3 18:38:27 HKT 2004 William Brack <wbrack@mmm.com.hk>
* xmlschemas.c: small change to xmlSchemaValidateAttributes,
also corrected typo on error code enum.
* include/libxml/xmlerror.h: corrected typo on schema error
code enum
Thu Jun 3 10:12:38 HKT 2004 William Brack <wbrack@mmm.com.hk> Thu Jun 3 10:12:38 HKT 2004 William Brack <wbrack@mmm.com.hk>
* xmlschemas.c: minor cosmetic changes, no change to logic. * xmlschemas.c: minor cosmetic changes, no change to logic.

View File

@ -568,8 +568,8 @@ typedef enum {
XML_SCHEMAP_WILDCARD_INVALID_NS_MEMBER, /* 1791 */ XML_SCHEMAP_WILDCARD_INVALID_NS_MEMBER, /* 1791 */
XML_SCHEMAP_INTERSECTION_NOT_EXPRESSIBLE, /* 1792 */ XML_SCHEMAP_INTERSECTION_NOT_EXPRESSIBLE, /* 1792 */
XML_SCHEMAP_UNION_NOT_EXPRESSIBLE, /* 1793 */ XML_SCHEMAP_UNION_NOT_EXPRESSIBLE, /* 1793 */
XML_SCHRMAP_SRC_IMPORT_3_1, /* 1794 */ XML_SCHEMAP_SRC_IMPORT_3_1, /* 1794 */
XML_SCHRMAP_SRC_IMPORT_3_2, /* 1795 */ XML_SCHEMAP_SRC_IMPORT_3_2, /* 1795 */
XML_SCHEMAV_NOROOT = 1800, XML_SCHEMAV_NOROOT = 1800,
XML_SCHEMAV_UNDECLAREDELEM, /* 1801 */ XML_SCHEMAV_UNDECLAREDELEM, /* 1801 */
XML_SCHEMAV_NOTTOPLEVEL, /* 1802 */ XML_SCHEMAV_NOTTOPLEVEL, /* 1802 */

View File

@ -3485,7 +3485,7 @@ xmlSchemaParseImport(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema,
if (!xmlStrEqual(import->schema->targetNamespace, namespace)) { if (!xmlStrEqual(import->schema->targetNamespace, namespace)) {
if (namespace == NULL) { if (namespace == NULL) {
if (import->schema->targetNamespace != NULL) { if (import->schema->targetNamespace != NULL) {
xmlSchemaPErr(ctxt, node, XML_SCHRMAP_SRC_IMPORT_3_2, xmlSchemaPErr(ctxt, node, XML_SCHEMAP_SRC_IMPORT_3_2,
"There is no namespace attribute on the <import> " "There is no namespace attribute on the <import> "
"element information item, so the imported document " "element information item, so the imported document "
"must have no targetNamespace attribute.\n", "must have no targetNamespace attribute.\n",
@ -3493,14 +3493,14 @@ xmlSchemaParseImport(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema,
} }
} else { } else {
if (import->schema->targetNamespace != NULL) { if (import->schema->targetNamespace != NULL) {
xmlSchemaPErr(ctxt, node, XML_SCHRMAP_SRC_IMPORT_3_1, xmlSchemaPErr(ctxt, node, XML_SCHEMAP_SRC_IMPORT_3_1,
"The namespace attribute \"%s\" of an <import> " "The namespace attribute \"%s\" of an <import> "
"element information item must be identical to the " "element information item must be identical to the "
"targetNamespace attribute \"%s\" of the " "targetNamespace attribute \"%s\" of the "
"imported document.\n", "imported document.\n",
namespace, import->schema->targetNamespace); namespace, import->schema->targetNamespace);
} else { } else {
xmlSchemaPErr(ctxt, node, XML_SCHRMAP_SRC_IMPORT_3_1, xmlSchemaPErr(ctxt, node, XML_SCHEMAP_SRC_IMPORT_3_1,
"The namespace attribute on the <import> " "The namespace attribute on the <import> "
"element information item, requires the imported " "element information item, requires the imported "
"document to have a targetNamespace attribute " "document to have a targetNamespace attribute "
@ -8430,7 +8430,7 @@ xmlSchemaValidateAttributes(xmlSchemaValidCtxtPtr ctxt, xmlNodePtr elem, xmlSche
printf("found\n"); printf("found\n");
#endif #endif
found = 1; found = 1;
ctxt->cur = (xmlNodePtr) attrDecl; ctxt->cur = (xmlNodePtr) attr;
if (attrDecl->subtypes == NULL) { if (attrDecl->subtypes == NULL) {
curState->state = XML_SCHEMAS_ATTR_TYPE_NOT_RESOLVED; curState->state = XML_SCHEMAS_ATTR_TYPE_NOT_RESOLVED;