Eneboo - Documentación para desarrolladores
'defines' | Funciones | Variables
Referencia del Archivo src/libdigidoc/libxml2/xmllint.c
#include "libxml.h"
#include <string.h>
#include <stdarg.h>
#include <assert.h>
#include <libxml/xmlmemory.h>
#include <libxml/parser.h>
#include <libxml/parserInternals.h>
#include <libxml/HTMLparser.h>
#include <libxml/HTMLtree.h>
#include <libxml/tree.h>
#include <libxml/xpath.h>
#include <libxml/debugXML.h>
#include <libxml/xmlerror.h>
#include <libxml/globals.h>
#include <libxml/xmlreader.h>

'defines'

#define XML_XML_DEFAULT_CATALOG   "file:#endiftypedef enum { XMLLINT_RETURN_OK = 0, /* No error */ XMLLINT_ERR_UNCLASS = 1, /* Unclassified */ XMLLINT_ERR_DTD = 2, /* Error in DTD */ XMLLINT_ERR_VALID = 3, /* Validation error */ XMLLINT_ERR_RDFILE = 4, /* CtxtReadFile error */ XMLLINT_ERR_SCHEMACOMP = 5, /* Schema compilation */ XMLLINT_ERR_OUT = 6, /* Error writing output */ XMLLINT_ERR_SCHEMAPAT = 7, /* Error in schema pattern */ XMLLINT_ERR_RDREGIS = 8, /* Error in Reader registration */ XMLLINT_ERR_MEM = 9, /* Out of memory error */ XMLLINT_ERR_XPATH = 10 /* XPath evaluation error */} xmllintReturnCode;#ifdef LIBXML_DEBUG_ENABLEDstatic int shell = 0;static int debugent = 0;#endifstatic int debug = 0;static int maxmem = 0;#ifdef LIBXML_TREE_ENABLEDstatic int copy = 0;#endif /* LIBXML_TREE_ENABLED */static int recovery = 0;static int noent = 0;static int noblanks = 0;static int noout = 0;static int nowrap = 0;#ifdef LIBXML_OUTPUT_ENABLEDstatic int format = 0;static const char *output = NULL;static int compress = 0;static int oldout = 0;#endif /* LIBXML_OUTPUT_ENABLED */#ifdef LIBXML_VALID_ENABLEDstatic int valid = 0;static int postvalid = 0;static char * dtdvalid = NULL;static char * dtdvalidfpi = NULL;#endif#ifdef LIBXML_SCHEMAS_ENABLEDstatic char * relaxng = NULL;static xmlRelaxNGPtr relaxngschemas = NULL;static char * schema = NULL;static xmlSchemaPtr wxschemas = NULL;#endif#ifdef LIBXML_SCHEMATRON_ENABLEDstatic char * schematron = NULL;static xmlSchematronPtr wxschematron = NULL;#endifstatic int repeat = 0;static int insert = 0;#if defined(LIBXML_HTML_ENABLED) || defined(LIBXML_VALID_ENABLED)static int html = 0;static int xmlout = 0;#endifstatic int htmlout = 0;#ifdef LIBXML_PUSH_ENABLEDstatic int push = 0;#endif /* LIBXML_PUSH_ENABLED */#ifdef HAVE_SYS_MMAN_Hstatic int memory = 0;#endifstatic int testIO = 0;static char *encoding = NULL;#ifdef LIBXML_XINCLUDE_ENABLEDstatic int xinclude = 0;#endifstatic int dtdattrs = 0;static int loaddtd = 0;static xmllintReturnCode progresult = XMLLINT_RETURN_OK;static int timing = 0;static int generate = 0;static int dropdtd = 0;#ifdef LIBXML_CATALOG_ENABLEDstatic int catalogs = 0;static int nocatalogs = 0;#endif#ifdef LIBXML_C14N_ENABLEDstatic int canonical = 0;static int canonical_11 = 0;static int exc_canonical = 0;#endif#ifdef LIBXML_READER_ENABLEDstatic int stream = 0;static int walker = 0;#endif /* LIBXML_READER_ENABLED */static int chkregister = 0;static int nbregister = 0;#ifdef LIBXML_SAX1_ENABLEDstatic int sax1 = 0;#endif /* LIBXML_SAX1_ENABLED */#ifdef LIBXML_PATTERN_ENABLEDstatic const char *pattern = NULL;static xmlPatternPtr patternc = NULL;static xmlStreamCtxtPtr patstream = NULL;#endif#ifdef LIBXML_XPATH_ENABLEDstatic const char *xpathquery = NULL;#endifstatic int options = XML_PARSE_COMPACT;static int sax = 0;static int oldxml10 = 0;#define MAX_PATHS 64#ifdef _WIN32# define PATH_SEPARATOR ';'#else# define PATH_SEPARATOR ':'#endifstatic xmlChar *paths[MAX_PATHS + 1];static int nbpaths = 0;static int load_trace = 0;staticvoid parsePath(const xmlChar *path) { const xmlChar *cur; if (path == NULL) return; while (*path != 0) { if (nbpaths >= MAX_PATHS) { fprintf(stderr, "MAX_PATHS reached: too many paths\n"); return; } cur = path; while ((*cur == ' ') || (*cur == PATH_SEPARATOR)) cur++; path = cur; while ((*cur != 0) && (*cur != ' ') && (*cur != PATH_SEPARATOR)) cur++; if (cur != path) { paths[nbpaths] = xmlStrndup(path, cur - path); if (paths[nbpaths] != NULL) nbpaths++; path = cur; } }}static xmlExternalEntityLoader defaultEntityLoader = NULL;static xmlParserInputPtrxmllintExternalEntityLoader(const char *URL, const char *ID, xmlParserCtxtPtr ctxt) { xmlParserInputPtr ret; warningSAXFunc warning = NULL; errorSAXFunc err = NULL; int i; const char *lastsegment = URL; const char *iter = URL; if ((nbpaths > 0) && (iter != NULL)) { while (*iter != 0) { if (*iter == '/') lastsegment = iter + 1; iter++; } } if ((ctxt != NULL) && (ctxt->sax != NULL)) { warning = ctxt->sax->warning; err = ctxt->sax->error; ctxt->sax->warning = NULL; ctxt->sax->error = NULL; } if (defaultEntityLoader != NULL) { ret = defaultEntityLoader(URL, ID, ctxt); if (ret != NULL) { if (warning != NULL) ctxt->sax->warning = warning; if (err != NULL) ctxt->sax->error = err; if (load_trace) { fprintf \ (stderr, "Loaded URL=\"%s\" ID=\"%s\"\n",

Funciones

 return (ret)
 for (i=0;i< nbpaths;i++)
 if (err!=NULL)
 return (NULL)
: The entity name

getParameterEntityDebug: : An XML parser context

Get a parameter entity by name

Returns the xmlParserInputPtr

: the attribute name

attributeDeclDebug: : An XML parser context

: the attribute type

An attribute definition has been parsed

: The name of the notation

notationDeclDebug: : An XML parser context

: The public ID of the entity : The system ID of the entity

What to do when a notation declaration has been parsed.

: The name of the entity

unparsedEntityDeclDebug: : An XML parser context

: The public ID of the entity : The system ID of the entity : the name of the notation

What to do when an unparsed entity declaration is parsed

Variables

URL URL
URL ID ID

: The entity name

referenceDebug: : An XML parser context

called when an entity reference is detected.

xmlSAXHandlerPtr debugSAXHandler = &debugSAXHandlerStruct

: The element name

endElementDebug: : An XML parser context

called when the end of an element has been detected.

int main (int argc, char **argv)

Documentación de los 'defines'

#define XML_XML_DEFAULT_CATALOG   "file:#endiftypedef enum { XMLLINT_RETURN_OK = 0, /* No error */ XMLLINT_ERR_UNCLASS = 1, /* Unclassified */ XMLLINT_ERR_DTD = 2, /* Error in DTD */ XMLLINT_ERR_VALID = 3, /* Validation error */ XMLLINT_ERR_RDFILE = 4, /* CtxtReadFile error */ XMLLINT_ERR_SCHEMACOMP = 5, /* Schema compilation */ XMLLINT_ERR_OUT = 6, /* Error writing output */ XMLLINT_ERR_SCHEMAPAT = 7, /* Error in schema pattern */ XMLLINT_ERR_RDREGIS = 8, /* Error in Reader registration */ XMLLINT_ERR_MEM = 9, /* Out of memory error */ XMLLINT_ERR_XPATH = 10 /* XPath evaluation error */} xmllintReturnCode;#ifdef LIBXML_DEBUG_ENABLEDstatic int shell = 0;static int debugent = 0;#endifstatic int debug = 0;static int maxmem = 0;#ifdef LIBXML_TREE_ENABLEDstatic int copy = 0;#endif /* LIBXML_TREE_ENABLED */static int recovery = 0;static int noent = 0;static int noblanks = 0;static int noout = 0;static int nowrap = 0;#ifdef LIBXML_OUTPUT_ENABLEDstatic int format = 0;static const char *output = NULL;static int compress = 0;static int oldout = 0;#endif /* LIBXML_OUTPUT_ENABLED */#ifdef LIBXML_VALID_ENABLEDstatic int valid = 0;static int postvalid = 0;static char * dtdvalid = NULL;static char * dtdvalidfpi = NULL;#endif#ifdef LIBXML_SCHEMAS_ENABLEDstatic char * relaxng = NULL;static xmlRelaxNGPtr relaxngschemas = NULL;static char * schema = NULL;static xmlSchemaPtr wxschemas = NULL;#endif#ifdef LIBXML_SCHEMATRON_ENABLEDstatic char * schematron = NULL;static xmlSchematronPtr wxschematron = NULL;#endifstatic int repeat = 0;static int insert = 0;#if defined(LIBXML_HTML_ENABLED) || defined(LIBXML_VALID_ENABLED)static int html = 0;static int xmlout = 0;#endifstatic int htmlout = 0;#ifdef LIBXML_PUSH_ENABLEDstatic int push = 0;#endif /* LIBXML_PUSH_ENABLED */#ifdef HAVE_SYS_MMAN_Hstatic int memory = 0;#endifstatic int testIO = 0;static char *encoding = NULL;#ifdef LIBXML_XINCLUDE_ENABLEDstatic int xinclude = 0;#endifstatic int dtdattrs = 0;static int loaddtd = 0;static xmllintReturnCode progresult = XMLLINT_RETURN_OK;static int timing = 0;static int generate = 0;static int dropdtd = 0;#ifdef LIBXML_CATALOG_ENABLEDstatic int catalogs = 0;static int nocatalogs = 0;#endif#ifdef LIBXML_C14N_ENABLEDstatic int canonical = 0;static int canonical_11 = 0;static int exc_canonical = 0;#endif#ifdef LIBXML_READER_ENABLEDstatic int stream = 0;static int walker = 0;#endif /* LIBXML_READER_ENABLED */static int chkregister = 0;static int nbregister = 0;#ifdef LIBXML_SAX1_ENABLEDstatic int sax1 = 0;#endif /* LIBXML_SAX1_ENABLED */#ifdef LIBXML_PATTERN_ENABLEDstatic const char *pattern = NULL;static xmlPatternPtr patternc = NULL;static xmlStreamCtxtPtr patstream = NULL;#endif#ifdef LIBXML_XPATH_ENABLEDstatic const char *xpathquery = NULL;#endifstatic int options = XML_PARSE_COMPACT;static int sax = 0;static int oldxml10 = 0;#define MAX_PATHS 64#ifdef _WIN32# define PATH_SEPARATOR ';'#else# define PATH_SEPARATOR ':'#endifstatic xmlChar *paths[MAX_PATHS + 1];static int nbpaths = 0;static int load_trace = 0;staticvoid parsePath(const xmlChar *path) { const xmlChar *cur; if (path == NULL) return; while (*path != 0) { if (nbpaths >= MAX_PATHS) { fprintf(stderr, "MAX_PATHS reached: too many paths\n"); return; } cur = path; while ((*cur == ' ') || (*cur == PATH_SEPARATOR)) cur++; path = cur; while ((*cur != 0) && (*cur != ' ') && (*cur != PATH_SEPARATOR)) cur++; if (cur != path) { paths[nbpaths] = xmlStrndup(path, cur - path); if (paths[nbpaths] != NULL) nbpaths++; path = cur; } }}static xmlExternalEntityLoader defaultEntityLoader = NULL;static xmlParserInputPtrxmllintExternalEntityLoader(const char *URL, const char *ID, xmlParserCtxtPtr ctxt) { xmlParserInputPtr ret; warningSAXFunc warning = NULL; errorSAXFunc err = NULL; int i; const char *lastsegment = URL; const char *iter = URL; if ((nbpaths > 0) && (iter != NULL)) { while (*iter != 0) { if (*iter == '/') lastsegment = iter + 1; iter++; } } if ((ctxt != NULL) && (ctxt->sax != NULL)) { warning = ctxt->sax->warning; err = ctxt->sax->error; ctxt->sax->warning = NULL; ctxt->sax->error = NULL; } if (defaultEntityLoader != NULL) { ret = defaultEntityLoader(URL, ID, ctxt); if (ret != NULL) { if (warning != NULL) ctxt->sax->warning = warning; if (err != NULL) ctxt->sax->error = err; if (load_trace) { fprintf \ (stderr, "Loaded URL=\"%s\" ID=\"%s\"\n",

Documentación de las funciones

for ( )
if ( err!  = NULL)
int main ( int  argc,
char **  argv 
)
return ( NULL  )
return ( ret  )

Documentación de las variables

 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'