mirror of
https://github.com/libretro/RetroArch
synced 2025-02-06 09:40:06 +00:00
(libxml) Remove schematron
This commit is contained in:
parent
1379d895ed
commit
f459819813
@ -42,7 +42,6 @@ LOCAL_LIBXML_SRC_FILES = $(LIBXML_PATH)/c14n.c \
|
||||
$(LIBXML_PATH)/relaxng.c \
|
||||
$(LIBXML_PATH)/SAX.c \
|
||||
$(LIBXML_PATH)/SAX2.c \
|
||||
$(LIBXML_PATH)/schematron.c \
|
||||
$(LIBXML_PATH)/threads.c \
|
||||
$(LIBXML_PATH)/tree.c \
|
||||
$(LIBXML_PATH)/uri.c \
|
||||
|
@ -8073,126 +8073,6 @@ extern __typeof (xmlSchemaWhiteSpaceReplace) xmlSchemaWhiteSpaceReplace__interna
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(LIBXML_SCHEMATRON_ENABLED)
|
||||
#ifdef bottom_schematron
|
||||
#undef xmlSchematronFree
|
||||
extern __typeof (xmlSchematronFree) xmlSchematronFree __attribute((alias("xmlSchematronFree__internal_alias")));
|
||||
#else
|
||||
#ifndef xmlSchematronFree
|
||||
extern __typeof (xmlSchematronFree) xmlSchematronFree__internal_alias __attribute((visibility("hidden")));
|
||||
#define xmlSchematronFree xmlSchematronFree__internal_alias
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(LIBXML_SCHEMATRON_ENABLED)
|
||||
#ifdef bottom_schematron
|
||||
#undef xmlSchematronFreeParserCtxt
|
||||
extern __typeof (xmlSchematronFreeParserCtxt) xmlSchematronFreeParserCtxt __attribute((alias("xmlSchematronFreeParserCtxt__internal_alias")));
|
||||
#else
|
||||
#ifndef xmlSchematronFreeParserCtxt
|
||||
extern __typeof (xmlSchematronFreeParserCtxt) xmlSchematronFreeParserCtxt__internal_alias __attribute((visibility("hidden")));
|
||||
#define xmlSchematronFreeParserCtxt xmlSchematronFreeParserCtxt__internal_alias
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(LIBXML_SCHEMATRON_ENABLED)
|
||||
#ifdef bottom_schematron
|
||||
#undef xmlSchematronFreeValidCtxt
|
||||
extern __typeof (xmlSchematronFreeValidCtxt) xmlSchematronFreeValidCtxt __attribute((alias("xmlSchematronFreeValidCtxt__internal_alias")));
|
||||
#else
|
||||
#ifndef xmlSchematronFreeValidCtxt
|
||||
extern __typeof (xmlSchematronFreeValidCtxt) xmlSchematronFreeValidCtxt__internal_alias __attribute((visibility("hidden")));
|
||||
#define xmlSchematronFreeValidCtxt xmlSchematronFreeValidCtxt__internal_alias
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(LIBXML_SCHEMATRON_ENABLED)
|
||||
#ifdef bottom_schematron
|
||||
#undef xmlSchematronNewDocParserCtxt
|
||||
extern __typeof (xmlSchematronNewDocParserCtxt) xmlSchematronNewDocParserCtxt __attribute((alias("xmlSchematronNewDocParserCtxt__internal_alias")));
|
||||
#else
|
||||
#ifndef xmlSchematronNewDocParserCtxt
|
||||
extern __typeof (xmlSchematronNewDocParserCtxt) xmlSchematronNewDocParserCtxt__internal_alias __attribute((visibility("hidden")));
|
||||
#define xmlSchematronNewDocParserCtxt xmlSchematronNewDocParserCtxt__internal_alias
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(LIBXML_SCHEMATRON_ENABLED)
|
||||
#ifdef bottom_schematron
|
||||
#undef xmlSchematronNewMemParserCtxt
|
||||
extern __typeof (xmlSchematronNewMemParserCtxt) xmlSchematronNewMemParserCtxt __attribute((alias("xmlSchematronNewMemParserCtxt__internal_alias")));
|
||||
#else
|
||||
#ifndef xmlSchematronNewMemParserCtxt
|
||||
extern __typeof (xmlSchematronNewMemParserCtxt) xmlSchematronNewMemParserCtxt__internal_alias __attribute((visibility("hidden")));
|
||||
#define xmlSchematronNewMemParserCtxt xmlSchematronNewMemParserCtxt__internal_alias
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(LIBXML_SCHEMATRON_ENABLED)
|
||||
#ifdef bottom_schematron
|
||||
#undef xmlSchematronNewParserCtxt
|
||||
extern __typeof (xmlSchematronNewParserCtxt) xmlSchematronNewParserCtxt __attribute((alias("xmlSchematronNewParserCtxt__internal_alias")));
|
||||
#else
|
||||
#ifndef xmlSchematronNewParserCtxt
|
||||
extern __typeof (xmlSchematronNewParserCtxt) xmlSchematronNewParserCtxt__internal_alias __attribute((visibility("hidden")));
|
||||
#define xmlSchematronNewParserCtxt xmlSchematronNewParserCtxt__internal_alias
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(LIBXML_SCHEMATRON_ENABLED)
|
||||
#ifdef bottom_schematron
|
||||
#undef xmlSchematronNewValidCtxt
|
||||
extern __typeof (xmlSchematronNewValidCtxt) xmlSchematronNewValidCtxt __attribute((alias("xmlSchematronNewValidCtxt__internal_alias")));
|
||||
#else
|
||||
#ifndef xmlSchematronNewValidCtxt
|
||||
extern __typeof (xmlSchematronNewValidCtxt) xmlSchematronNewValidCtxt__internal_alias __attribute((visibility("hidden")));
|
||||
#define xmlSchematronNewValidCtxt xmlSchematronNewValidCtxt__internal_alias
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(LIBXML_SCHEMATRON_ENABLED)
|
||||
#ifdef bottom_schematron
|
||||
#undef xmlSchematronParse
|
||||
extern __typeof (xmlSchematronParse) xmlSchematronParse __attribute((alias("xmlSchematronParse__internal_alias")));
|
||||
#else
|
||||
#ifndef xmlSchematronParse
|
||||
extern __typeof (xmlSchematronParse) xmlSchematronParse__internal_alias __attribute((visibility("hidden")));
|
||||
#define xmlSchematronParse xmlSchematronParse__internal_alias
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(LIBXML_SCHEMATRON_ENABLED)
|
||||
#ifdef bottom_schematron
|
||||
#undef xmlSchematronSetValidStructuredErrors
|
||||
extern __typeof (xmlSchematronSetValidStructuredErrors) xmlSchematronSetValidStructuredErrors __attribute((alias("xmlSchematronSetValidStructuredErrors__internal_alias")));
|
||||
#else
|
||||
#ifndef xmlSchematronSetValidStructuredErrors
|
||||
extern __typeof (xmlSchematronSetValidStructuredErrors) xmlSchematronSetValidStructuredErrors__internal_alias __attribute((visibility("hidden")));
|
||||
#define xmlSchematronSetValidStructuredErrors xmlSchematronSetValidStructuredErrors__internal_alias
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(LIBXML_SCHEMATRON_ENABLED)
|
||||
#ifdef bottom_schematron
|
||||
#undef xmlSchematronValidateDoc
|
||||
extern __typeof (xmlSchematronValidateDoc) xmlSchematronValidateDoc __attribute((alias("xmlSchematronValidateDoc__internal_alias")));
|
||||
#else
|
||||
#ifndef xmlSchematronValidateDoc
|
||||
extern __typeof (xmlSchematronValidateDoc) xmlSchematronValidateDoc__internal_alias __attribute((visibility("hidden")));
|
||||
#define xmlSchematronValidateDoc xmlSchematronValidateDoc__internal_alias
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef bottom_tree
|
||||
#undef xmlSearchNs
|
||||
extern __typeof (xmlSearchNs) xmlSearchNs __attribute((alias("xmlSearchNs__internal_alias")));
|
||||
|
@ -13,130 +13,4 @@
|
||||
|
||||
#include <libxml/xmlversion.h>
|
||||
|
||||
#ifdef LIBXML_SCHEMATRON_ENABLED
|
||||
|
||||
#include <libxml/tree.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef enum {
|
||||
XML_SCHEMATRON_OUT_QUIET = 1 << 0, /* quiet no report */
|
||||
XML_SCHEMATRON_OUT_TEXT = 1 << 1, /* build a textual report */
|
||||
XML_SCHEMATRON_OUT_XML = 1 << 2, /* output SVRL */
|
||||
XML_SCHEMATRON_OUT_ERROR = 1 << 3, /* output via xmlStructuredErrorFunc */
|
||||
XML_SCHEMATRON_OUT_FILE = 1 << 8, /* output to a file descriptor */
|
||||
XML_SCHEMATRON_OUT_BUFFER = 1 << 9, /* output to a buffer */
|
||||
XML_SCHEMATRON_OUT_IO = 1 << 10 /* output to I/O mechanism */
|
||||
} xmlSchematronValidOptions;
|
||||
|
||||
/**
|
||||
* The schemas related types are kept internal
|
||||
*/
|
||||
typedef struct _xmlSchematron xmlSchematron;
|
||||
typedef xmlSchematron *xmlSchematronPtr;
|
||||
|
||||
/**
|
||||
* xmlSchematronValidityErrorFunc:
|
||||
* @ctx: the validation context
|
||||
* @msg: the message
|
||||
* @...: extra arguments
|
||||
*
|
||||
* Signature of an error callback from a Schematron validation
|
||||
*/
|
||||
typedef void (*xmlSchematronValidityErrorFunc) (void *ctx, const char *msg, ...);
|
||||
|
||||
/**
|
||||
* xmlSchematronValidityWarningFunc:
|
||||
* @ctx: the validation context
|
||||
* @msg: the message
|
||||
* @...: extra arguments
|
||||
*
|
||||
* Signature of a warning callback from a Schematron validation
|
||||
*/
|
||||
typedef void (*xmlSchematronValidityWarningFunc) (void *ctx, const char *msg, ...);
|
||||
|
||||
/**
|
||||
* A schemas validation context
|
||||
*/
|
||||
typedef struct _xmlSchematronParserCtxt xmlSchematronParserCtxt;
|
||||
typedef xmlSchematronParserCtxt *xmlSchematronParserCtxtPtr;
|
||||
|
||||
typedef struct _xmlSchematronValidCtxt xmlSchematronValidCtxt;
|
||||
typedef xmlSchematronValidCtxt *xmlSchematronValidCtxtPtr;
|
||||
|
||||
/*
|
||||
* Interfaces for parsing.
|
||||
*/
|
||||
XMLPUBFUN xmlSchematronParserCtxtPtr XMLCALL
|
||||
xmlSchematronNewParserCtxt (const char *URL);
|
||||
XMLPUBFUN xmlSchematronParserCtxtPtr XMLCALL
|
||||
xmlSchematronNewMemParserCtxt(const char *buffer,
|
||||
int size);
|
||||
XMLPUBFUN xmlSchematronParserCtxtPtr XMLCALL
|
||||
xmlSchematronNewDocParserCtxt(xmlDocPtr doc);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSchematronFreeParserCtxt (xmlSchematronParserCtxtPtr ctxt);
|
||||
/*****
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSchematronSetParserErrors(xmlSchematronParserCtxtPtr ctxt,
|
||||
xmlSchematronValidityErrorFunc err,
|
||||
xmlSchematronValidityWarningFunc warn,
|
||||
void *ctx);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSchematronGetParserErrors(xmlSchematronParserCtxtPtr ctxt,
|
||||
xmlSchematronValidityErrorFunc * err,
|
||||
xmlSchematronValidityWarningFunc * warn,
|
||||
void **ctx);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSchematronIsValid (xmlSchematronValidCtxtPtr ctxt);
|
||||
*****/
|
||||
XMLPUBFUN xmlSchematronPtr XMLCALL
|
||||
xmlSchematronParse (xmlSchematronParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSchematronFree (xmlSchematronPtr schema);
|
||||
/*
|
||||
* Interfaces for validating
|
||||
*/
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSchematronSetValidStructuredErrors(
|
||||
xmlSchematronValidCtxtPtr ctxt,
|
||||
xmlStructuredErrorFunc serror,
|
||||
void *ctx);
|
||||
/******
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSchematronSetValidErrors (xmlSchematronValidCtxtPtr ctxt,
|
||||
xmlSchematronValidityErrorFunc err,
|
||||
xmlSchematronValidityWarningFunc warn,
|
||||
void *ctx);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSchematronGetValidErrors (xmlSchematronValidCtxtPtr ctxt,
|
||||
xmlSchematronValidityErrorFunc *err,
|
||||
xmlSchematronValidityWarningFunc *warn,
|
||||
void **ctx);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSchematronSetValidOptions(xmlSchematronValidCtxtPtr ctxt,
|
||||
int options);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSchematronValidCtxtGetOptions(xmlSchematronValidCtxtPtr ctxt);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSchematronValidateOneElement (xmlSchematronValidCtxtPtr ctxt,
|
||||
xmlNodePtr elem);
|
||||
*******/
|
||||
|
||||
XMLPUBFUN xmlSchematronValidCtxtPtr XMLCALL
|
||||
xmlSchematronNewValidCtxt (xmlSchematronPtr schema,
|
||||
int options);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSchematronFreeValidCtxt (xmlSchematronValidCtxtPtr ctxt);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSchematronValidateDoc (xmlSchematronValidCtxtPtr ctxt,
|
||||
xmlDocPtr instance);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LIBXML_SCHEMATRON_ENABLED */
|
||||
#endif /* __XML_SCHEMATRON_H__ */
|
||||
|
@ -295,15 +295,6 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
|
||||
#define LIBXML_SCHEMAS_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_SCHEMATRON_ENABLED:
|
||||
*
|
||||
* Whether the Schematron validation interfaces are compiled in
|
||||
*/
|
||||
#if 0
|
||||
#define LIBXML_SCHEMATRON_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_MODULES_ENABLED:
|
||||
*
|
||||
|
@ -900,11 +900,7 @@ xmlHasFeature(xmlFeature feature)
|
||||
return(0);
|
||||
#endif
|
||||
case XML_WITH_SCHEMATRON:
|
||||
#ifdef LIBXML_SCHEMATRON_ENABLED
|
||||
return(1);
|
||||
#else
|
||||
return(0);
|
||||
#endif
|
||||
case XML_WITH_MODULES:
|
||||
#ifdef LIBXML_MODULES_ENABLED
|
||||
return(1);
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -82,9 +82,6 @@
|
||||
#endif
|
||||
#include <libxml/globals.h>
|
||||
#include <libxml/xmlreader.h>
|
||||
#ifdef LIBXML_SCHEMATRON_ENABLED
|
||||
#include <libxml/schematron.h>
|
||||
#endif
|
||||
#ifdef LIBXML_SCHEMAS_ENABLED
|
||||
#include <libxml/relaxng.h>
|
||||
#include <libxml/xmlschemas.h>
|
||||
@ -142,10 +139,6 @@ static xmlRelaxNGPtr relaxngschemas = NULL;
|
||||
static char * schema = NULL;
|
||||
static xmlSchemaPtr wxschemas = NULL;
|
||||
#endif
|
||||
#ifdef LIBXML_SCHEMATRON_ENABLED
|
||||
static char * schematron = NULL;
|
||||
static xmlSchematronPtr wxschematron = NULL;
|
||||
#endif
|
||||
static int repeat = 0;
|
||||
static int insert = 0;
|
||||
static int htmlout = 0;
|
||||
@ -2462,46 +2455,6 @@ static void parseAndPrintFile(char *filename, xmlParserCtxtPtr rectxt) {
|
||||
xmlFreeValidCtxt(cvp);
|
||||
}
|
||||
#endif /* LIBXML_VALID_ENABLED */
|
||||
#ifdef LIBXML_SCHEMATRON_ENABLED
|
||||
if (wxschematron != NULL) {
|
||||
xmlSchematronValidCtxtPtr ctxt;
|
||||
int ret;
|
||||
int flag;
|
||||
|
||||
if ((timing) && (!repeat)) {
|
||||
startTimer();
|
||||
}
|
||||
|
||||
if (debug)
|
||||
flag = XML_SCHEMATRON_OUT_XML;
|
||||
else
|
||||
flag = XML_SCHEMATRON_OUT_TEXT;
|
||||
if (noout)
|
||||
flag |= XML_SCHEMATRON_OUT_QUIET;
|
||||
ctxt = xmlSchematronNewValidCtxt(wxschematron, flag);
|
||||
#if 0
|
||||
xmlSchematronSetValidErrors(ctxt,
|
||||
(xmlSchematronValidityErrorFunc) fprintf,
|
||||
(xmlSchematronValidityWarningFunc) fprintf,
|
||||
stderr);
|
||||
#endif
|
||||
ret = xmlSchematronValidateDoc(ctxt, doc);
|
||||
if (ret == 0) {
|
||||
fprintf(stderr, "%s validates\n", filename);
|
||||
} else if (ret > 0) {
|
||||
fprintf(stderr, "%s fails to validate\n", filename);
|
||||
progresult = XMLLINT_ERR_VALID;
|
||||
} else {
|
||||
fprintf(stderr, "%s validation generated an internal error\n",
|
||||
filename);
|
||||
progresult = XMLLINT_ERR_VALID;
|
||||
}
|
||||
xmlSchematronFreeValidCtxt(ctxt);
|
||||
if ((timing) && (!repeat)) {
|
||||
endTimer("Validating");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#ifdef LIBXML_SCHEMAS_ENABLED
|
||||
if (relaxngschemas != NULL) {
|
||||
xmlRelaxNGValidCtxtPtr ctxt;
|
||||
@ -2702,9 +2655,6 @@ static void usage(const char *name) {
|
||||
printf("\t--relaxng schema : do RelaxNG validation against the schema\n");
|
||||
printf("\t--schema schema : do validation against the WXS schema\n");
|
||||
#endif
|
||||
#ifdef LIBXML_SCHEMATRON_ENABLED
|
||||
printf("\t--schematron schema : do validation against a schematron\n");
|
||||
#endif
|
||||
#ifdef LIBXML_SAX1_ENABLED
|
||||
printf("\t--sax1: use the old SAX1 interfaces for processing\n");
|
||||
#endif
|
||||
@ -3007,13 +2957,6 @@ main(int argc, char **argv) {
|
||||
i++;
|
||||
schema = argv[i];
|
||||
noent++;
|
||||
#endif
|
||||
#ifdef LIBXML_SCHEMATRON_ENABLED
|
||||
} else if ((!strcmp(argv[i], "-schematron")) ||
|
||||
(!strcmp(argv[i], "--schematron"))) {
|
||||
i++;
|
||||
schematron = argv[i];
|
||||
noent++;
|
||||
#endif
|
||||
} else if ((!strcmp(argv[i], "-nonet")) ||
|
||||
(!strcmp(argv[i], "--nonet"))) {
|
||||
@ -3091,40 +3034,6 @@ main(int argc, char **argv) {
|
||||
argv[0]);
|
||||
}
|
||||
|
||||
#ifdef LIBXML_SCHEMATRON_ENABLED
|
||||
if ((schematron != NULL) && (sax == 0)
|
||||
#ifdef LIBXML_READER_ENABLED
|
||||
&& (stream == 0)
|
||||
#endif /* LIBXML_READER_ENABLED */
|
||||
) {
|
||||
xmlSchematronParserCtxtPtr ctxt;
|
||||
|
||||
/* forces loading the DTDs */
|
||||
xmlLoadExtDtdDefaultValue |= 1;
|
||||
options |= XML_PARSE_DTDLOAD;
|
||||
if (timing) {
|
||||
startTimer();
|
||||
}
|
||||
ctxt = xmlSchematronNewParserCtxt(schematron);
|
||||
#if 0
|
||||
xmlSchematronSetParserErrors(ctxt,
|
||||
(xmlSchematronValidityErrorFunc) fprintf,
|
||||
(xmlSchematronValidityWarningFunc) fprintf,
|
||||
stderr);
|
||||
#endif
|
||||
wxschematron = xmlSchematronParse(ctxt);
|
||||
if (wxschematron == NULL) {
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"Schematron schema %s failed to compile\n", schematron);
|
||||
progresult = XMLLINT_ERR_SCHEMACOMP;
|
||||
schematron = NULL;
|
||||
}
|
||||
xmlSchematronFreeParserCtxt(ctxt);
|
||||
if (timing) {
|
||||
endTimer("Compiling the schemas");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#ifdef LIBXML_SCHEMAS_ENABLED
|
||||
if ((relaxng != NULL) && (sax == 0)
|
||||
#ifdef LIBXML_READER_ENABLED
|
||||
@ -3302,10 +3211,6 @@ main(int argc, char **argv) {
|
||||
if ((files == 0) && (!generate) && (version == 0)) {
|
||||
usage(argv[0]);
|
||||
}
|
||||
#ifdef LIBXML_SCHEMATRON_ENABLED
|
||||
if (wxschematron != NULL)
|
||||
xmlSchematronFree(wxschematron);
|
||||
#endif
|
||||
#ifdef LIBXML_SCHEMAS_ENABLED
|
||||
if (relaxngschemas != NULL)
|
||||
xmlRelaxNGFree(relaxngschemas);
|
||||
|
Loading…
x
Reference in New Issue
Block a user