1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-05 19:01:18 +03:00

build: Add separate configuration option for RELAX NG

Support for RELAX NG used to be enabled together with XML Schema support
(--with-schemas). Now there's a separate option and a new feature macro
LIBXML_RELAXNG_ENABLED.
This commit is contained in:
Nick Wellnhofer
2025-02-25 23:07:19 +01:00
parent ce1b704e33
commit e50d314a27
26 changed files with 370 additions and 196 deletions

View File

@ -2876,14 +2876,13 @@ libxml_addLocalCatalog(ATTRIBUTE_UNUSED PyObject * self, PyObject * args)
}
#endif /* LIBXML_CATALOG_ENABLED */
#ifdef LIBXML_SCHEMAS_ENABLED
/************************************************************************
* *
* RelaxNG error handler registration *
* *
************************************************************************/
#ifdef LIBXML_RELAXNG_ENABLED
typedef struct
{
PyObject *warn;
@ -3035,7 +3034,9 @@ libxml_xmlRelaxNGFreeValidCtxt(ATTRIBUTE_UNUSED PyObject *self, PyObject *args)
Py_INCREF(Py_None);
return(Py_None);
}
#endif /* LIBXML_RELAXNG_ENABLED */
#ifdef LIBXML_SCHEMAS_ENABLED
typedef struct
{
PyObject *warn;
@ -3188,8 +3189,7 @@ libxml_xmlSchemaFreeValidCtxt(ATTRIBUTE_UNUSED PyObject * self, PyObject * args)
Py_INCREF(Py_None);
return(Py_None);
}
#endif
#endif /* LIBXML_SCHEMAS_ENABLED */
#ifdef LIBXML_C14N_ENABLED
#ifdef LIBXML_OUTPUT_ENABLED
@ -3594,9 +3594,11 @@ static PyMethodDef libxmlMethods[] = {
#ifdef LIBXML_CATALOG_ENABLED
{(char *)"addLocalCatalog", libxml_addLocalCatalog, METH_VARARGS, NULL },
#endif
#ifdef LIBXML_SCHEMAS_ENABLED
#ifdef LIBXML_RELAXNG_ENABLED
{(char *)"xmlRelaxNGSetValidErrors", libxml_xmlRelaxNGSetValidErrors, METH_VARARGS, NULL},
{(char *)"xmlRelaxNGFreeValidCtxt", libxml_xmlRelaxNGFreeValidCtxt, METH_VARARGS, NULL},
#endif
#ifdef LIBXML_SCHEMAS_ENABLED
{(char *)"xmlSchemaSetValidErrors", libxml_xmlSchemaSetValidErrors, METH_VARARGS, NULL},
{(char *)"xmlSchemaFreeValidCtxt", libxml_xmlSchemaFreeValidCtxt, METH_VARARGS, NULL},
#endif