| OLD | NEW |
| 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 24168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 24179 */ | 24179 */ |
| 24180 if (type->facetSet == NULL) | 24180 if (type->facetSet == NULL) |
| 24181 goto pattern_and_enum; | 24181 goto pattern_and_enum; |
| 24182 | 24182 |
| 24183 if (! WXS_IS_ATOMIC(type)) { | 24183 if (! WXS_IS_ATOMIC(type)) { |
| 24184 if (WXS_IS_LIST(type)) | 24184 if (WXS_IS_LIST(type)) |
| 24185 goto WXS_IS_LIST; | 24185 goto WXS_IS_LIST; |
| 24186 else | 24186 else |
| 24187 goto pattern_and_enum; | 24187 goto pattern_and_enum; |
| 24188 } | 24188 } |
| 24189 |
| 24189 /* | 24190 /* |
| 24190 * Whitespace handling is only of importance for string-based | 24191 * Whitespace handling is only of importance for string-based |
| 24191 * types. | 24192 * types. |
| 24192 */ | 24193 */ |
| 24193 tmpType = xmlSchemaGetPrimitiveType(type); | 24194 tmpType = xmlSchemaGetPrimitiveType(type); |
| 24194 if ((tmpType->builtInType == XML_SCHEMAS_STRING) || | 24195 if ((tmpType->builtInType == XML_SCHEMAS_STRING) || |
| 24195 WXS_IS_ANY_SIMPLE_TYPE(tmpType)) { | 24196 WXS_IS_ANY_SIMPLE_TYPE(tmpType)) { |
| 24196 ws = xmlSchemaGetWhiteSpaceFacetValue(type); | 24197 ws = xmlSchemaGetWhiteSpaceFacetValue(type); |
| 24197 } else | 24198 } else |
| 24198 ws = XML_SCHEMA_WHITESPACE_COLLAPSE; | 24199 ws = XML_SCHEMA_WHITESPACE_COLLAPSE; |
| 24200 |
| 24199 /* | 24201 /* |
| 24200 * If the value was not computed (for string or | 24202 * If the value was not computed (for string or |
| 24201 * anySimpleType based types), then use the provided | 24203 * anySimpleType based types), then use the provided |
| 24202 * type. | 24204 * type. |
| 24203 */ | 24205 */ |
| 24204 if (val != NULL) | 24206 if (val != NULL) |
| 24205 valType = xmlSchemaGetValType(val); | 24207 valType = xmlSchemaGetValType(val); |
| 24206 | 24208 |
| 24207 ret = 0; | 24209 ret = 0; |
| 24208 for (facetLink = type->facetSet; facetLink != NULL; | 24210 for (facetLink = type->facetSet; facetLink != NULL; |
| (...skipping 1328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 25537 */ | 25539 */ |
| 25538 normValue = xmlSchemaNormalizeValue(iattr->typeDef, | 25540 normValue = xmlSchemaNormalizeValue(iattr->typeDef, |
| 25539 iattr->value); | 25541 iattr->value); |
| 25540 if (normValue != NULL) | 25542 if (normValue != NULL) |
| 25541 value = BAD_CAST normValue; | 25543 value = BAD_CAST normValue; |
| 25542 | 25544 |
| 25543 if (iattr->nsName == NULL) { | 25545 if (iattr->nsName == NULL) { |
| 25544 if (xmlNewProp(defAttrOwnerElem, | 25546 if (xmlNewProp(defAttrOwnerElem, |
| 25545 iattr->localName, value) == NULL) { | 25547 iattr->localName, value) == NULL) { |
| 25546 VERROR_INT("xmlSchemaVAttributesComplex", | 25548 VERROR_INT("xmlSchemaVAttributesComplex", |
| 25547 » » » "callling xmlNewProp()"); | 25549 » » » "calling xmlNewProp()"); |
| 25548 if (normValue != NULL) | 25550 if (normValue != NULL) |
| 25549 xmlFree(normValue); | 25551 xmlFree(normValue); |
| 25550 goto internal_error; | 25552 goto internal_error; |
| 25551 } | 25553 } |
| 25552 } else { | 25554 } else { |
| 25553 xmlNsPtr ns; | 25555 xmlNsPtr ns; |
| 25554 | 25556 |
| 25555 ns = xmlSearchNsByHref(defAttrOwnerElem->doc, | 25557 ns = xmlSearchNsByHref(defAttrOwnerElem->doc, |
| 25556 defAttrOwnerElem, iattr->nsName); | 25558 defAttrOwnerElem, iattr->nsName); |
| 25557 if (ns == NULL) { | 25559 if (ns == NULL) { |
| (...skipping 3338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 28896 xmlSchemaValidCtxtGetParserCtxt(xmlSchemaValidCtxtPtr ctxt) | 28898 xmlSchemaValidCtxtGetParserCtxt(xmlSchemaValidCtxtPtr ctxt) |
| 28897 { | 28899 { |
| 28898 if (ctxt == NULL) | 28900 if (ctxt == NULL) |
| 28899 return(NULL); | 28901 return(NULL); |
| 28900 return (ctxt->parserCtxt); | 28902 return (ctxt->parserCtxt); |
| 28901 } | 28903 } |
| 28902 | 28904 |
| 28903 #define bottom_xmlschemas | 28905 #define bottom_xmlschemas |
| 28904 #include "elfgcchack.h" | 28906 #include "elfgcchack.h" |
| 28905 #endif /* LIBXML_SCHEMAS_ENABLED */ | 28907 #endif /* LIBXML_SCHEMAS_ENABLED */ |
| OLD | NEW |