* xmlSchemaIsDerivedFromBuiltInType: * @ctxt: the schema parser context * @type: the type definition * @valType: the value type * * * Returns 1 if the type has the given value type, or * is derived from such a type. */
| 13322 | * is derived from such a type. |
| 13323 | */ |
| 13324 | static int |
| 13325 | xmlSchemaIsDerivedFromBuiltInType(xmlSchemaTypePtr type, int valType) |
| 13326 | { |
| 13327 | if (type == NULL) |
| 13328 | return (0); |
| 13329 | if (WXS_IS_COMPLEX(type)) |
| 13330 | return (0); |
| 13331 | if (type->type == XML_SCHEMA_TYPE_BASIC) { |
| 13332 | if (type->builtInType == valType) |
| 13333 | return(1); |
| 13334 | if ((type->builtInType == XML_SCHEMAS_ANYSIMPLETYPE) || |
| 13335 | (type->builtInType == XML_SCHEMAS_ANYTYPE)) |
| 13336 | return (0); |
| 13337 | return(xmlSchemaIsDerivedFromBuiltInType(type->subtypes, valType)); |
| 13338 | } |
| 13339 | return(xmlSchemaIsDerivedFromBuiltInType(type->subtypes, valType)); |
| 13340 | } |
| 13341 | |
| 13342 | #if 0 |
| 13343 | /** |
no outgoing calls
no test coverage detected