* xmlSchemaGetBuiltInType: * @type: the type of the built in type * * Gives you the type struct for a built-in * type by its type id. * * Returns the type if found, NULL otherwise. */
| 950 | * Returns the type if found, NULL otherwise. |
| 951 | */ |
| 952 | xmlSchemaTypePtr |
| 953 | xmlSchemaGetBuiltInType(xmlSchemaValType type) |
| 954 | { |
| 955 | if ((xmlSchemaTypesInitialized == 0) && |
| 956 | (xmlSchemaInitTypes() < 0)) |
| 957 | return (NULL); |
| 958 | switch (type) { |
| 959 | |
| 960 | case XML_SCHEMAS_ANYSIMPLETYPE: |
| 961 | return (xmlSchemaTypeAnySimpleTypeDef); |
| 962 | case XML_SCHEMAS_STRING: |
| 963 | return (xmlSchemaTypeStringDef); |
| 964 | case XML_SCHEMAS_NORMSTRING: |
| 965 | return (xmlSchemaTypeNormStringDef); |
| 966 | case XML_SCHEMAS_DECIMAL: |
| 967 | return (xmlSchemaTypeDecimalDef); |
| 968 | case XML_SCHEMAS_TIME: |
| 969 | return (xmlSchemaTypeTimeDef); |
| 970 | case XML_SCHEMAS_GDAY: |
| 971 | return (xmlSchemaTypeGDayDef); |
| 972 | case XML_SCHEMAS_GMONTH: |
| 973 | return (xmlSchemaTypeGMonthDef); |
| 974 | case XML_SCHEMAS_GMONTHDAY: |
| 975 | return (xmlSchemaTypeGMonthDayDef); |
| 976 | case XML_SCHEMAS_GYEAR: |
| 977 | return (xmlSchemaTypeGYearDef); |
| 978 | case XML_SCHEMAS_GYEARMONTH: |
| 979 | return (xmlSchemaTypeGYearMonthDef); |
| 980 | case XML_SCHEMAS_DATE: |
| 981 | return (xmlSchemaTypeDateDef); |
| 982 | case XML_SCHEMAS_DATETIME: |
| 983 | return (xmlSchemaTypeDatetimeDef); |
| 984 | case XML_SCHEMAS_DURATION: |
| 985 | return (xmlSchemaTypeDurationDef); |
| 986 | case XML_SCHEMAS_FLOAT: |
| 987 | return (xmlSchemaTypeFloatDef); |
| 988 | case XML_SCHEMAS_DOUBLE: |
| 989 | return (xmlSchemaTypeDoubleDef); |
| 990 | case XML_SCHEMAS_BOOLEAN: |
| 991 | return (xmlSchemaTypeBooleanDef); |
| 992 | case XML_SCHEMAS_TOKEN: |
| 993 | return (xmlSchemaTypeTokenDef); |
| 994 | case XML_SCHEMAS_LANGUAGE: |
| 995 | return (xmlSchemaTypeLanguageDef); |
| 996 | case XML_SCHEMAS_NMTOKEN: |
| 997 | return (xmlSchemaTypeNmtokenDef); |
| 998 | case XML_SCHEMAS_NMTOKENS: |
| 999 | return (xmlSchemaTypeNmtokensDef); |
| 1000 | case XML_SCHEMAS_NAME: |
| 1001 | return (xmlSchemaTypeNameDef); |
| 1002 | case XML_SCHEMAS_QNAME: |
| 1003 | return (xmlSchemaTypeQNameDef); |
| 1004 | case XML_SCHEMAS_NCNAME: |
| 1005 | return (xmlSchemaTypeNCNameDef); |
| 1006 | case XML_SCHEMAS_ID: |
| 1007 | return (xmlSchemaTypeIdDef); |
| 1008 | case XML_SCHEMAS_IDREF: |
| 1009 | return (xmlSchemaTypeIdrefDef); |
no test coverage detected