MCPcopy Create free account
hub / github.com/Kitware/VTK / xmlSchemaIsDerivedFromBuiltInType

Function xmlSchemaIsDerivedFromBuiltInType

ThirdParty/libxml2/vtklibxml2/xmlschemas.c:13324–13340  ·  view source on GitHub ↗

* 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. */

Source from the content-addressed store, hash-verified

13322 * is derived from such a type.
13323 */
13324static int
13325xmlSchemaIsDerivedFromBuiltInType(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/**

Calls

no outgoing calls

Tested by

no test coverage detected