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

Function xmlSchemaGetType

ThirdParty/libxml2/vtklibxml2/xmlschemas.c:4780–4806  ·  view source on GitHub ↗

* xmlSchemaGetType: * @schema: the main schema * @name: the type's name * nsName: the type's namespace * * Lookup a type in the schemas or the predefined types * * Returns the group definition or NULL if not found. */

Source from the content-addressed store, hash-verified

4778 * Returns the group definition or NULL if not found.
4779 */
4780static xmlSchemaTypePtr
4781xmlSchemaGetType(xmlSchemaPtr schema, const xmlChar * name,
4782 const xmlChar * nsName)
4783{
4784 xmlSchemaTypePtr ret = NULL;
4785
4786 if (name == NULL)
4787 return (NULL);
4788 /* First try the built-in types. */
4789 if ((nsName != NULL) && xmlStrEqual(nsName, xmlSchemaNs)) {
4790 ret = xmlSchemaGetPredefinedType(name, nsName);
4791 if (ret != NULL)
4792 goto exit;
4793 /*
4794 * Note that we try the parsed schemas as well here
4795 * since one might have parsed the S4S, which contain more
4796 * than the built-in types.
4797 * TODO: Can we optimize this?
4798 */
4799 }
4800 if (schema != NULL) {
4801 WXS_FIND_GLOBAL_ITEM(typeDecl)
4802 }
4803exit:
4804
4805 return (ret);
4806}
4807
4808/**
4809 * xmlSchemaGetAttributeDecl:

Calls 2

xmlStrEqualFunction · 0.85

Tested by

no test coverage detected