| OLD | NEW |
| 1 /* | 1 /* |
| 2 * schemastypes.c : implementation of the XML Schema Datatypes | 2 * schemastypes.c : implementation of the XML Schema Datatypes |
| 3 * definition and validity checking | 3 * definition and 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 #define IN_LIBXML | 10 #define IN_LIBXML |
| (...skipping 5097 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5108 * @length: the actual length of the value | 5108 * @length: the actual length of the value |
| 5109 * | 5109 * |
| 5110 * Checka a value against a "length", "minLength" and "maxLength" | 5110 * Checka a value against a "length", "minLength" and "maxLength" |
| 5111 * facet; sets @length to the computed length of @value. | 5111 * facet; sets @length to the computed length of @value. |
| 5112 * | 5112 * |
| 5113 * Returns 0 if the value is valid, a positive error code | 5113 * Returns 0 if the value is valid, a positive error code |
| 5114 * otherwise and -1 in case of an internal or API error. | 5114 * otherwise and -1 in case of an internal or API error. |
| 5115 */ | 5115 */ |
| 5116 static int | 5116 static int |
| 5117 xmlSchemaValidateLengthFacetInternal(xmlSchemaFacetPtr facet, | 5117 xmlSchemaValidateLengthFacetInternal(xmlSchemaFacetPtr facet, |
| 5118 » » » » xmlSchemaTypeType valType, | 5118 » » » » xmlSchemaValType valType, |
| 5119 const xmlChar *value, | 5119 const xmlChar *value, |
| 5120 » » » » xmlSchemaValPtr val,» » »
» | 5120 » » » » xmlSchemaValPtr val, |
| 5121 unsigned long *length, | 5121 unsigned long *length, |
| 5122 xmlSchemaWhitespaceValueType ws) | 5122 xmlSchemaWhitespaceValueType ws) |
| 5123 { | 5123 { |
| 5124 unsigned int len = 0; | 5124 unsigned int len = 0; |
| 5125 | 5125 |
| 5126 if ((length == NULL) || (facet == NULL)) | 5126 if ((length == NULL) || (facet == NULL)) |
| 5127 return (-1); | 5127 return (-1); |
| 5128 *length = 0; | 5128 *length = 0; |
| 5129 if ((facet->type != XML_SCHEMA_FACET_LENGTH) && | 5129 if ((facet->type != XML_SCHEMA_FACET_LENGTH) && |
| 5130 (facet->type != XML_SCHEMA_FACET_MAXLENGTH) && | 5130 (facet->type != XML_SCHEMA_FACET_MAXLENGTH) && |
| (...skipping 987 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6118 xmlSchemaGetValType(xmlSchemaValPtr val) | 6118 xmlSchemaGetValType(xmlSchemaValPtr val) |
| 6119 { | 6119 { |
| 6120 if (val == NULL) | 6120 if (val == NULL) |
| 6121 return(XML_SCHEMAS_UNKNOWN); | 6121 return(XML_SCHEMAS_UNKNOWN); |
| 6122 return (val->type); | 6122 return (val->type); |
| 6123 } | 6123 } |
| 6124 | 6124 |
| 6125 #define bottom_xmlschemastypes | 6125 #define bottom_xmlschemastypes |
| 6126 #include "elfgcchack.h" | 6126 #include "elfgcchack.h" |
| 6127 #endif /* LIBXML_SCHEMAS_ENABLED */ | 6127 #endif /* LIBXML_SCHEMAS_ENABLED */ |
| OLD | NEW |