* xmlRelaxNGInitTypes: * * Initialize the default type libraries. * * Returns 0 in case of success and -1 in case of error. */
| 2773 | * Returns 0 in case of success and -1 in case of error. |
| 2774 | */ |
| 2775 | int |
| 2776 | xmlRelaxNGInitTypes(void) |
| 2777 | { |
| 2778 | if (xmlRelaxNGTypeInitialized != 0) |
| 2779 | return (0); |
| 2780 | xmlRelaxNGRegisteredTypes = xmlHashCreate(10); |
| 2781 | if (xmlRelaxNGRegisteredTypes == NULL) |
| 2782 | return (-1); |
| 2783 | xmlRelaxNGRegisterTypeLibrary(BAD_CAST |
| 2784 | "http://www.w3.org/2001/XMLSchema-datatypes", |
| 2785 | NULL, xmlRelaxNGSchemaTypeHave, |
| 2786 | xmlRelaxNGSchemaTypeCheck, |
| 2787 | xmlRelaxNGSchemaTypeCompare, |
| 2788 | xmlRelaxNGSchemaFacetCheck, |
| 2789 | xmlRelaxNGSchemaFreeValue); |
| 2790 | xmlRelaxNGRegisterTypeLibrary(xmlRelaxNGNs, NULL, |
| 2791 | xmlRelaxNGDefaultTypeHave, |
| 2792 | xmlRelaxNGDefaultTypeCheck, |
| 2793 | xmlRelaxNGDefaultTypeCompare, NULL, |
| 2794 | NULL); |
| 2795 | xmlRelaxNGTypeInitialized = 1; |
| 2796 | return (0); |
| 2797 | } |
| 2798 | |
| 2799 | /** |
| 2800 | * xmlRelaxNGCleanupTypes: |