mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-27 03:43:36 +00:00
[LIBXML2] Update to release 2.12.8 (from Wine-10.0)
This commit is contained in:
@@ -1,96 +0,0 @@
|
||||
/*
|
||||
* Summary: old DocBook SGML parser
|
||||
* Description: interface for a DocBook SGML non-verifying parser
|
||||
* This code is DEPRECATED, and should not be used anymore.
|
||||
*
|
||||
* Copy: See Copyright for the status of this software.
|
||||
*
|
||||
* Author: Daniel Veillard
|
||||
*/
|
||||
|
||||
#ifndef __DOCB_PARSER_H__
|
||||
#define __DOCB_PARSER_H__
|
||||
#include <libxml/xmlversion.h>
|
||||
|
||||
#ifdef LIBXML_DOCB_ENABLED
|
||||
|
||||
#include <libxml/parser.h>
|
||||
#include <libxml/parserInternals.h>
|
||||
|
||||
#ifndef IN_LIBXML
|
||||
#ifdef __GNUC__
|
||||
#warning "The DOCBparser module has been deprecated in libxml2-2.6.0"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Most of the back-end structures from XML and SGML are shared.
|
||||
*/
|
||||
typedef xmlParserCtxt docbParserCtxt;
|
||||
typedef xmlParserCtxtPtr docbParserCtxtPtr;
|
||||
typedef xmlSAXHandler docbSAXHandler;
|
||||
typedef xmlSAXHandlerPtr docbSAXHandlerPtr;
|
||||
typedef xmlParserInput docbParserInput;
|
||||
typedef xmlParserInputPtr docbParserInputPtr;
|
||||
typedef xmlDocPtr docbDocPtr;
|
||||
|
||||
/*
|
||||
* There is only few public functions.
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
docbEncodeEntities(unsigned char *out,
|
||||
int *outlen,
|
||||
const unsigned char *in,
|
||||
int *inlen, int quoteChar);
|
||||
|
||||
XMLPUBFUN docbDocPtr XMLCALL
|
||||
docbSAXParseDoc (xmlChar *cur,
|
||||
const char *encoding,
|
||||
docbSAXHandlerPtr sax,
|
||||
void *userData);
|
||||
XMLPUBFUN docbDocPtr XMLCALL
|
||||
docbParseDoc (xmlChar *cur,
|
||||
const char *encoding);
|
||||
XMLPUBFUN docbDocPtr XMLCALL
|
||||
docbSAXParseFile (const char *filename,
|
||||
const char *encoding,
|
||||
docbSAXHandlerPtr sax,
|
||||
void *userData);
|
||||
XMLPUBFUN docbDocPtr XMLCALL
|
||||
docbParseFile (const char *filename,
|
||||
const char *encoding);
|
||||
|
||||
/**
|
||||
* Interfaces for the Push mode.
|
||||
*/
|
||||
XMLPUBFUN void XMLCALL
|
||||
docbFreeParserCtxt (docbParserCtxtPtr ctxt);
|
||||
XMLPUBFUN docbParserCtxtPtr XMLCALL
|
||||
docbCreatePushParserCtxt(docbSAXHandlerPtr sax,
|
||||
void *user_data,
|
||||
const char *chunk,
|
||||
int size,
|
||||
const char *filename,
|
||||
xmlCharEncoding enc);
|
||||
XMLPUBFUN int XMLCALL
|
||||
docbParseChunk (docbParserCtxtPtr ctxt,
|
||||
const char *chunk,
|
||||
int size,
|
||||
int terminate);
|
||||
XMLPUBFUN docbParserCtxtPtr XMLCALL
|
||||
docbCreateFileParserCtxt(const char *filename,
|
||||
const char *encoding);
|
||||
XMLPUBFUN int XMLCALL
|
||||
docbParseDocument (docbParserCtxtPtr ctxt);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LIBXML_DOCB_ENABLED */
|
||||
|
||||
#endif /* __DOCB_PARSER_H__ */
|
||||
@@ -1,128 +0,0 @@
|
||||
/*
|
||||
* Summary: Provide Canonical XML and Exclusive XML Canonicalization
|
||||
* Description: the c14n modules provides a
|
||||
*
|
||||
* "Canonical XML" implementation
|
||||
* http://www.w3.org/TR/xml-c14n
|
||||
*
|
||||
* and an
|
||||
*
|
||||
* "Exclusive XML Canonicalization" implementation
|
||||
* http://www.w3.org/TR/xml-exc-c14n
|
||||
|
||||
* Copy: See Copyright for the status of this software.
|
||||
*
|
||||
* Author: Aleksey Sanin <[email protected]>
|
||||
*/
|
||||
#ifndef __XML_C14N_H__
|
||||
#define __XML_C14N_H__
|
||||
|
||||
#include <libxml/xmlversion.h>
|
||||
|
||||
#ifdef LIBXML_C14N_ENABLED
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
|
||||
#include <libxml/tree.h>
|
||||
#include <libxml/xpath.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/*
|
||||
* XML Canonicalization
|
||||
* http://www.w3.org/TR/xml-c14n
|
||||
*
|
||||
* Exclusive XML Canonicalization
|
||||
* http://www.w3.org/TR/xml-exc-c14n
|
||||
*
|
||||
* Canonical form of an XML document could be created if and only if
|
||||
* a) default attributes (if any) are added to all nodes
|
||||
* b) all character and parsed entity references are resolved
|
||||
* In order to achieve this in libxml2 the document MUST be loaded with
|
||||
* following global settings:
|
||||
*
|
||||
* xmlLoadExtDtdDefaultValue = XML_DETECT_IDS | XML_COMPLETE_ATTRS;
|
||||
* xmlSubstituteEntitiesDefault(1);
|
||||
*
|
||||
* or corresponding parser context setting:
|
||||
* xmlParserCtxtPtr ctxt;
|
||||
*
|
||||
* ...
|
||||
* ctxt->loadsubset = XML_DETECT_IDS | XML_COMPLETE_ATTRS;
|
||||
* ctxt->replaceEntities = 1;
|
||||
* ...
|
||||
*/
|
||||
|
||||
/*
|
||||
* xmlC14NMode:
|
||||
*
|
||||
* Predefined values for C14N modes
|
||||
*
|
||||
*/
|
||||
typedef enum {
|
||||
XML_C14N_1_0 = 0, /* Original C14N 1.0 spec */
|
||||
XML_C14N_EXCLUSIVE_1_0 = 1, /* Exclusive C14N 1.0 spec */
|
||||
XML_C14N_1_1 = 2 /* C14N 1.1 spec */
|
||||
} xmlC14NMode;
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlC14NDocSaveTo (xmlDocPtr doc,
|
||||
xmlNodeSetPtr nodes,
|
||||
int mode, /* a xmlC14NMode */
|
||||
xmlChar **inclusive_ns_prefixes,
|
||||
int with_comments,
|
||||
xmlOutputBufferPtr buf);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlC14NDocDumpMemory (xmlDocPtr doc,
|
||||
xmlNodeSetPtr nodes,
|
||||
int mode, /* a xmlC14NMode */
|
||||
xmlChar **inclusive_ns_prefixes,
|
||||
int with_comments,
|
||||
xmlChar **doc_txt_ptr);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlC14NDocSave (xmlDocPtr doc,
|
||||
xmlNodeSetPtr nodes,
|
||||
int mode, /* a xmlC14NMode */
|
||||
xmlChar **inclusive_ns_prefixes,
|
||||
int with_comments,
|
||||
const char* filename,
|
||||
int compression);
|
||||
|
||||
|
||||
/**
|
||||
* This is the core C14N function
|
||||
*/
|
||||
/**
|
||||
* xmlC14NIsVisibleCallback:
|
||||
* @user_data: user data
|
||||
* @node: the current node
|
||||
* @parent: the parent node
|
||||
*
|
||||
* Signature for a C14N callback on visible nodes
|
||||
*
|
||||
* Returns 1 if the node should be included
|
||||
*/
|
||||
typedef int (*xmlC14NIsVisibleCallback) (void* user_data,
|
||||
xmlNodePtr node,
|
||||
xmlNodePtr parent);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlC14NExecute (xmlDocPtr doc,
|
||||
xmlC14NIsVisibleCallback is_visible_callback,
|
||||
void* user_data,
|
||||
int mode, /* a xmlC14NMode */
|
||||
xmlChar **inclusive_ns_prefixes,
|
||||
int with_comments,
|
||||
xmlOutputBufferPtr buf);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
#endif /* LIBXML_C14N_ENABLED */
|
||||
#endif /* __XML_C14N_H__ */
|
||||
|
||||
@@ -1,499 +0,0 @@
|
||||
/*
|
||||
* Summary: interface for all global variables of the library
|
||||
* Description: all the global variables and thread handling for
|
||||
* those variables is handled by this module.
|
||||
*
|
||||
* The bottom of this file is automatically generated by build_glob.py
|
||||
* based on the description file global.data
|
||||
*
|
||||
* Copy: See Copyright for the status of this software.
|
||||
*
|
||||
* Author: Gary Pennington <[email protected]>, Daniel Veillard
|
||||
*/
|
||||
|
||||
#ifndef __XML_GLOBALS_H
|
||||
#define __XML_GLOBALS_H
|
||||
|
||||
#include <libxml/xmlversion.h>
|
||||
#include <libxml/parser.h>
|
||||
#include <libxml/xmlerror.h>
|
||||
#include <libxml/SAX2.h>
|
||||
#include <libxml/xmlmemory.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void XMLCALL xmlInitGlobals(void);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void XMLCALL xmlCleanupGlobals(void);
|
||||
|
||||
/**
|
||||
* xmlParserInputBufferCreateFilenameFunc:
|
||||
* @URI: the URI to read from
|
||||
* @enc: the requested source encoding
|
||||
*
|
||||
* Signature for the function doing the lookup for a suitable input method
|
||||
* corresponding to an URI.
|
||||
*
|
||||
* Returns the new xmlParserInputBufferPtr in case of success or NULL if no
|
||||
* method was found.
|
||||
*/
|
||||
typedef xmlParserInputBufferPtr (*xmlParserInputBufferCreateFilenameFunc) (const char *URI,
|
||||
xmlCharEncoding enc);
|
||||
|
||||
|
||||
/**
|
||||
* xmlOutputBufferCreateFilenameFunc:
|
||||
* @URI: the URI to write to
|
||||
* @enc: the requested target encoding
|
||||
*
|
||||
* Signature for the function doing the lookup for a suitable output method
|
||||
* corresponding to an URI.
|
||||
*
|
||||
* Returns the new xmlOutputBufferPtr in case of success or NULL if no
|
||||
* method was found.
|
||||
*/
|
||||
typedef xmlOutputBufferPtr (*xmlOutputBufferCreateFilenameFunc) (const char *URI,
|
||||
xmlCharEncodingHandlerPtr encoder,
|
||||
int compression);
|
||||
|
||||
XMLPUBFUN xmlParserInputBufferCreateFilenameFunc
|
||||
XMLCALL xmlParserInputBufferCreateFilenameDefault (xmlParserInputBufferCreateFilenameFunc func);
|
||||
XMLPUBFUN xmlOutputBufferCreateFilenameFunc
|
||||
XMLCALL xmlOutputBufferCreateFilenameDefault (xmlOutputBufferCreateFilenameFunc func);
|
||||
|
||||
/*
|
||||
* Externally global symbols which need to be protected for backwards
|
||||
* compatibility support.
|
||||
*/
|
||||
|
||||
#undef htmlDefaultSAXHandler
|
||||
#undef oldXMLWDcompatibility
|
||||
#undef xmlBufferAllocScheme
|
||||
#undef xmlDefaultBufferSize
|
||||
#undef xmlDefaultSAXHandler
|
||||
#undef xmlDefaultSAXLocator
|
||||
#undef xmlDoValidityCheckingDefaultValue
|
||||
#undef xmlFree
|
||||
#undef xmlGenericError
|
||||
#undef xmlStructuredError
|
||||
#undef xmlGenericErrorContext
|
||||
#undef xmlStructuredErrorContext
|
||||
#undef xmlGetWarningsDefaultValue
|
||||
#undef xmlIndentTreeOutput
|
||||
#undef xmlTreeIndentString
|
||||
#undef xmlKeepBlanksDefaultValue
|
||||
#undef xmlLineNumbersDefaultValue
|
||||
#undef xmlLoadExtDtdDefaultValue
|
||||
#undef xmlMalloc
|
||||
#undef xmlMallocAtomic
|
||||
#undef xmlMemStrdup
|
||||
#undef xmlParserDebugEntities
|
||||
#undef xmlParserVersion
|
||||
#undef xmlPedanticParserDefaultValue
|
||||
#undef xmlRealloc
|
||||
#undef xmlSaveNoEmptyTags
|
||||
#undef xmlSubstituteEntitiesDefaultValue
|
||||
#undef xmlRegisterNodeDefaultValue
|
||||
#undef xmlDeregisterNodeDefaultValue
|
||||
#undef xmlLastError
|
||||
#undef xmlParserInputBufferCreateFilenameValue
|
||||
#undef xmlOutputBufferCreateFilenameValue
|
||||
|
||||
/**
|
||||
* xmlRegisterNodeFunc:
|
||||
* @node: the current node
|
||||
*
|
||||
* Signature for the registration callback of a created node
|
||||
*/
|
||||
typedef void (*xmlRegisterNodeFunc) (xmlNodePtr node);
|
||||
/**
|
||||
* xmlDeregisterNodeFunc:
|
||||
* @node: the current node
|
||||
*
|
||||
* Signature for the deregistration callback of a discarded node
|
||||
*/
|
||||
typedef void (*xmlDeregisterNodeFunc) (xmlNodePtr node);
|
||||
|
||||
typedef struct _xmlGlobalState xmlGlobalState;
|
||||
typedef xmlGlobalState *xmlGlobalStatePtr;
|
||||
struct _xmlGlobalState
|
||||
{
|
||||
const char *xmlParserVersion;
|
||||
|
||||
xmlSAXLocator xmlDefaultSAXLocator;
|
||||
xmlSAXHandlerV1 xmlDefaultSAXHandler;
|
||||
xmlSAXHandlerV1 docbDefaultSAXHandler; /* unused */
|
||||
xmlSAXHandlerV1 htmlDefaultSAXHandler;
|
||||
|
||||
xmlFreeFunc xmlFree;
|
||||
xmlMallocFunc xmlMalloc;
|
||||
xmlStrdupFunc xmlMemStrdup;
|
||||
xmlReallocFunc xmlRealloc;
|
||||
|
||||
xmlGenericErrorFunc xmlGenericError;
|
||||
xmlStructuredErrorFunc xmlStructuredError;
|
||||
void *xmlGenericErrorContext;
|
||||
|
||||
int oldXMLWDcompatibility;
|
||||
|
||||
xmlBufferAllocationScheme xmlBufferAllocScheme;
|
||||
int xmlDefaultBufferSize;
|
||||
|
||||
int xmlSubstituteEntitiesDefaultValue;
|
||||
int xmlDoValidityCheckingDefaultValue;
|
||||
int xmlGetWarningsDefaultValue;
|
||||
int xmlKeepBlanksDefaultValue;
|
||||
int xmlLineNumbersDefaultValue;
|
||||
int xmlLoadExtDtdDefaultValue;
|
||||
int xmlParserDebugEntities;
|
||||
int xmlPedanticParserDefaultValue;
|
||||
|
||||
int xmlSaveNoEmptyTags;
|
||||
int xmlIndentTreeOutput;
|
||||
const char *xmlTreeIndentString;
|
||||
|
||||
xmlRegisterNodeFunc xmlRegisterNodeDefaultValue;
|
||||
xmlDeregisterNodeFunc xmlDeregisterNodeDefaultValue;
|
||||
|
||||
xmlMallocFunc xmlMallocAtomic;
|
||||
xmlError xmlLastError;
|
||||
|
||||
xmlParserInputBufferCreateFilenameFunc xmlParserInputBufferCreateFilenameValue;
|
||||
xmlOutputBufferCreateFilenameFunc xmlOutputBufferCreateFilenameValue;
|
||||
|
||||
void *xmlStructuredErrorContext;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include <libxml/threads.h>
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
XMLPUBFUN void XMLCALL xmlInitializeGlobalState(xmlGlobalStatePtr gs);
|
||||
|
||||
XMLPUBFUN void XMLCALL xmlThrDefSetGenericErrorFunc(void *ctx, xmlGenericErrorFunc handler);
|
||||
|
||||
XMLPUBFUN void XMLCALL xmlThrDefSetStructuredErrorFunc(void *ctx, xmlStructuredErrorFunc handler);
|
||||
|
||||
XMLPUBFUN xmlRegisterNodeFunc XMLCALL xmlRegisterNodeDefault(xmlRegisterNodeFunc func);
|
||||
XMLPUBFUN xmlRegisterNodeFunc XMLCALL xmlThrDefRegisterNodeDefault(xmlRegisterNodeFunc func);
|
||||
XMLPUBFUN xmlDeregisterNodeFunc XMLCALL xmlDeregisterNodeDefault(xmlDeregisterNodeFunc func);
|
||||
XMLPUBFUN xmlDeregisterNodeFunc XMLCALL xmlThrDefDeregisterNodeDefault(xmlDeregisterNodeFunc func);
|
||||
|
||||
XMLPUBFUN xmlOutputBufferCreateFilenameFunc XMLCALL
|
||||
xmlThrDefOutputBufferCreateFilenameDefault(xmlOutputBufferCreateFilenameFunc func);
|
||||
XMLPUBFUN xmlParserInputBufferCreateFilenameFunc XMLCALL
|
||||
xmlThrDefParserInputBufferCreateFilenameDefault(
|
||||
xmlParserInputBufferCreateFilenameFunc func);
|
||||
|
||||
/** DOC_DISABLE */
|
||||
/*
|
||||
* In general the memory allocation entry points are not kept
|
||||
* thread specific but this can be overridden by LIBXML_THREAD_ALLOC_ENABLED
|
||||
* - xmlMalloc
|
||||
* - xmlMallocAtomic
|
||||
* - xmlRealloc
|
||||
* - xmlMemStrdup
|
||||
* - xmlFree
|
||||
*/
|
||||
|
||||
#ifdef LIBXML_THREAD_ALLOC_ENABLED
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
XMLPUBFUN xmlMallocFunc * XMLCALL __xmlMalloc(void);
|
||||
#define xmlMalloc \
|
||||
(*(__xmlMalloc()))
|
||||
#else
|
||||
XMLPUBVAR xmlMallocFunc xmlMalloc;
|
||||
#endif
|
||||
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
XMLPUBFUN xmlMallocFunc * XMLCALL __xmlMallocAtomic(void);
|
||||
#define xmlMallocAtomic \
|
||||
(*(__xmlMallocAtomic()))
|
||||
#else
|
||||
XMLPUBVAR xmlMallocFunc xmlMallocAtomic;
|
||||
#endif
|
||||
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
XMLPUBFUN xmlReallocFunc * XMLCALL __xmlRealloc(void);
|
||||
#define xmlRealloc \
|
||||
(*(__xmlRealloc()))
|
||||
#else
|
||||
XMLPUBVAR xmlReallocFunc xmlRealloc;
|
||||
#endif
|
||||
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
XMLPUBFUN xmlFreeFunc * XMLCALL __xmlFree(void);
|
||||
#define xmlFree \
|
||||
(*(__xmlFree()))
|
||||
#else
|
||||
XMLPUBVAR xmlFreeFunc xmlFree;
|
||||
#endif
|
||||
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
XMLPUBFUN xmlStrdupFunc * XMLCALL __xmlMemStrdup(void);
|
||||
#define xmlMemStrdup \
|
||||
(*(__xmlMemStrdup()))
|
||||
#else
|
||||
XMLPUBVAR xmlStrdupFunc xmlMemStrdup;
|
||||
#endif
|
||||
|
||||
#else /* !LIBXML_THREAD_ALLOC_ENABLED */
|
||||
XMLPUBVAR xmlMallocFunc xmlMalloc;
|
||||
XMLPUBVAR xmlMallocFunc xmlMallocAtomic;
|
||||
XMLPUBVAR xmlReallocFunc xmlRealloc;
|
||||
XMLPUBVAR xmlFreeFunc xmlFree;
|
||||
XMLPUBVAR xmlStrdupFunc xmlMemStrdup;
|
||||
#endif /* LIBXML_THREAD_ALLOC_ENABLED */
|
||||
|
||||
#ifdef LIBXML_HTML_ENABLED
|
||||
XMLPUBFUN xmlSAXHandlerV1 * XMLCALL __htmlDefaultSAXHandler(void);
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
#define htmlDefaultSAXHandler \
|
||||
(*(__htmlDefaultSAXHandler()))
|
||||
#else
|
||||
XMLPUBVAR xmlSAXHandlerV1 htmlDefaultSAXHandler;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
XMLPUBFUN xmlError * XMLCALL __xmlLastError(void);
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
#define xmlLastError \
|
||||
(*(__xmlLastError()))
|
||||
#else
|
||||
XMLPUBVAR xmlError xmlLastError;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Everything starting from the line below is
|
||||
* Automatically generated by build_glob.py.
|
||||
* Do not modify the previous line.
|
||||
*/
|
||||
|
||||
|
||||
XMLPUBFUN int * XMLCALL __oldXMLWDcompatibility(void);
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
#define oldXMLWDcompatibility \
|
||||
(*(__oldXMLWDcompatibility()))
|
||||
#else
|
||||
XMLPUBVAR int oldXMLWDcompatibility;
|
||||
#endif
|
||||
|
||||
XMLPUBFUN xmlBufferAllocationScheme * XMLCALL __xmlBufferAllocScheme(void);
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
#define xmlBufferAllocScheme \
|
||||
(*(__xmlBufferAllocScheme()))
|
||||
#else
|
||||
XMLPUBVAR xmlBufferAllocationScheme xmlBufferAllocScheme;
|
||||
#endif
|
||||
XMLPUBFUN xmlBufferAllocationScheme XMLCALL
|
||||
xmlThrDefBufferAllocScheme(xmlBufferAllocationScheme v);
|
||||
|
||||
XMLPUBFUN int * XMLCALL __xmlDefaultBufferSize(void);
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
#define xmlDefaultBufferSize \
|
||||
(*(__xmlDefaultBufferSize()))
|
||||
#else
|
||||
XMLPUBVAR int xmlDefaultBufferSize;
|
||||
#endif
|
||||
XMLPUBFUN int XMLCALL xmlThrDefDefaultBufferSize(int v);
|
||||
|
||||
XMLPUBFUN xmlSAXHandlerV1 * XMLCALL __xmlDefaultSAXHandler(void);
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
#define xmlDefaultSAXHandler \
|
||||
(*(__xmlDefaultSAXHandler()))
|
||||
#else
|
||||
XMLPUBVAR xmlSAXHandlerV1 xmlDefaultSAXHandler;
|
||||
#endif
|
||||
|
||||
XMLPUBFUN xmlSAXLocator * XMLCALL __xmlDefaultSAXLocator(void);
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
#define xmlDefaultSAXLocator \
|
||||
(*(__xmlDefaultSAXLocator()))
|
||||
#else
|
||||
XMLPUBVAR xmlSAXLocator xmlDefaultSAXLocator;
|
||||
#endif
|
||||
|
||||
XMLPUBFUN int * XMLCALL __xmlDoValidityCheckingDefaultValue(void);
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
#define xmlDoValidityCheckingDefaultValue \
|
||||
(*(__xmlDoValidityCheckingDefaultValue()))
|
||||
#else
|
||||
XMLPUBVAR int xmlDoValidityCheckingDefaultValue;
|
||||
#endif
|
||||
XMLPUBFUN int XMLCALL xmlThrDefDoValidityCheckingDefaultValue(int v);
|
||||
|
||||
XMLPUBFUN xmlGenericErrorFunc * XMLCALL __xmlGenericError(void);
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
#define xmlGenericError \
|
||||
(*(__xmlGenericError()))
|
||||
#else
|
||||
XMLPUBVAR xmlGenericErrorFunc xmlGenericError;
|
||||
#endif
|
||||
|
||||
XMLPUBFUN xmlStructuredErrorFunc * XMLCALL __xmlStructuredError(void);
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
#define xmlStructuredError \
|
||||
(*(__xmlStructuredError()))
|
||||
#else
|
||||
XMLPUBVAR xmlStructuredErrorFunc xmlStructuredError;
|
||||
#endif
|
||||
|
||||
XMLPUBFUN void * * XMLCALL __xmlGenericErrorContext(void);
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
#define xmlGenericErrorContext \
|
||||
(*(__xmlGenericErrorContext()))
|
||||
#else
|
||||
XMLPUBVAR void * xmlGenericErrorContext;
|
||||
#endif
|
||||
|
||||
XMLPUBFUN void * * XMLCALL __xmlStructuredErrorContext(void);
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
#define xmlStructuredErrorContext \
|
||||
(*(__xmlStructuredErrorContext()))
|
||||
#else
|
||||
XMLPUBVAR void * xmlStructuredErrorContext;
|
||||
#endif
|
||||
|
||||
XMLPUBFUN int * XMLCALL __xmlGetWarningsDefaultValue(void);
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
#define xmlGetWarningsDefaultValue \
|
||||
(*(__xmlGetWarningsDefaultValue()))
|
||||
#else
|
||||
XMLPUBVAR int xmlGetWarningsDefaultValue;
|
||||
#endif
|
||||
XMLPUBFUN int XMLCALL xmlThrDefGetWarningsDefaultValue(int v);
|
||||
|
||||
XMLPUBFUN int * XMLCALL __xmlIndentTreeOutput(void);
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
#define xmlIndentTreeOutput \
|
||||
(*(__xmlIndentTreeOutput()))
|
||||
#else
|
||||
XMLPUBVAR int xmlIndentTreeOutput;
|
||||
#endif
|
||||
XMLPUBFUN int XMLCALL xmlThrDefIndentTreeOutput(int v);
|
||||
|
||||
XMLPUBFUN const char * * XMLCALL __xmlTreeIndentString(void);
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
#define xmlTreeIndentString \
|
||||
(*(__xmlTreeIndentString()))
|
||||
#else
|
||||
XMLPUBVAR const char * xmlTreeIndentString;
|
||||
#endif
|
||||
XMLPUBFUN const char * XMLCALL xmlThrDefTreeIndentString(const char * v);
|
||||
|
||||
XMLPUBFUN int * XMLCALL __xmlKeepBlanksDefaultValue(void);
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
#define xmlKeepBlanksDefaultValue \
|
||||
(*(__xmlKeepBlanksDefaultValue()))
|
||||
#else
|
||||
XMLPUBVAR int xmlKeepBlanksDefaultValue;
|
||||
#endif
|
||||
XMLPUBFUN int XMLCALL xmlThrDefKeepBlanksDefaultValue(int v);
|
||||
|
||||
XMLPUBFUN int * XMLCALL __xmlLineNumbersDefaultValue(void);
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
#define xmlLineNumbersDefaultValue \
|
||||
(*(__xmlLineNumbersDefaultValue()))
|
||||
#else
|
||||
XMLPUBVAR int xmlLineNumbersDefaultValue;
|
||||
#endif
|
||||
XMLPUBFUN int XMLCALL xmlThrDefLineNumbersDefaultValue(int v);
|
||||
|
||||
XMLPUBFUN int * XMLCALL __xmlLoadExtDtdDefaultValue(void);
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
#define xmlLoadExtDtdDefaultValue \
|
||||
(*(__xmlLoadExtDtdDefaultValue()))
|
||||
#else
|
||||
XMLPUBVAR int xmlLoadExtDtdDefaultValue;
|
||||
#endif
|
||||
XMLPUBFUN int XMLCALL xmlThrDefLoadExtDtdDefaultValue(int v);
|
||||
|
||||
XMLPUBFUN int * XMLCALL __xmlParserDebugEntities(void);
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
#define xmlParserDebugEntities \
|
||||
(*(__xmlParserDebugEntities()))
|
||||
#else
|
||||
XMLPUBVAR int xmlParserDebugEntities;
|
||||
#endif
|
||||
XMLPUBFUN int XMLCALL xmlThrDefParserDebugEntities(int v);
|
||||
|
||||
XMLPUBFUN const char * * XMLCALL __xmlParserVersion(void);
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
#define xmlParserVersion \
|
||||
(*(__xmlParserVersion()))
|
||||
#else
|
||||
XMLPUBVAR const char * xmlParserVersion;
|
||||
#endif
|
||||
|
||||
XMLPUBFUN int * XMLCALL __xmlPedanticParserDefaultValue(void);
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
#define xmlPedanticParserDefaultValue \
|
||||
(*(__xmlPedanticParserDefaultValue()))
|
||||
#else
|
||||
XMLPUBVAR int xmlPedanticParserDefaultValue;
|
||||
#endif
|
||||
XMLPUBFUN int XMLCALL xmlThrDefPedanticParserDefaultValue(int v);
|
||||
|
||||
XMLPUBFUN int * XMLCALL __xmlSaveNoEmptyTags(void);
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
#define xmlSaveNoEmptyTags \
|
||||
(*(__xmlSaveNoEmptyTags()))
|
||||
#else
|
||||
XMLPUBVAR int xmlSaveNoEmptyTags;
|
||||
#endif
|
||||
XMLPUBFUN int XMLCALL xmlThrDefSaveNoEmptyTags(int v);
|
||||
|
||||
XMLPUBFUN int * XMLCALL __xmlSubstituteEntitiesDefaultValue(void);
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
#define xmlSubstituteEntitiesDefaultValue \
|
||||
(*(__xmlSubstituteEntitiesDefaultValue()))
|
||||
#else
|
||||
XMLPUBVAR int xmlSubstituteEntitiesDefaultValue;
|
||||
#endif
|
||||
XMLPUBFUN int XMLCALL xmlThrDefSubstituteEntitiesDefaultValue(int v);
|
||||
|
||||
XMLPUBFUN xmlRegisterNodeFunc * XMLCALL __xmlRegisterNodeDefaultValue(void);
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
#define xmlRegisterNodeDefaultValue \
|
||||
(*(__xmlRegisterNodeDefaultValue()))
|
||||
#else
|
||||
XMLPUBVAR xmlRegisterNodeFunc xmlRegisterNodeDefaultValue;
|
||||
#endif
|
||||
|
||||
XMLPUBFUN xmlDeregisterNodeFunc * XMLCALL __xmlDeregisterNodeDefaultValue(void);
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
#define xmlDeregisterNodeDefaultValue \
|
||||
(*(__xmlDeregisterNodeDefaultValue()))
|
||||
#else
|
||||
XMLPUBVAR xmlDeregisterNodeFunc xmlDeregisterNodeDefaultValue;
|
||||
#endif
|
||||
|
||||
XMLPUBFUN xmlParserInputBufferCreateFilenameFunc * XMLCALL \
|
||||
__xmlParserInputBufferCreateFilenameValue(void);
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
#define xmlParserInputBufferCreateFilenameValue \
|
||||
(*(__xmlParserInputBufferCreateFilenameValue()))
|
||||
#else
|
||||
XMLPUBVAR xmlParserInputBufferCreateFilenameFunc xmlParserInputBufferCreateFilenameValue;
|
||||
#endif
|
||||
|
||||
XMLPUBFUN xmlOutputBufferCreateFilenameFunc * XMLCALL __xmlOutputBufferCreateFilenameValue(void);
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
#define xmlOutputBufferCreateFilenameValue \
|
||||
(*(__xmlOutputBufferCreateFilenameValue()))
|
||||
#else
|
||||
XMLPUBVAR xmlOutputBufferCreateFilenameFunc xmlOutputBufferCreateFilenameValue;
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __XML_GLOBALS_H */
|
||||
@@ -1,142 +0,0 @@
|
||||
/*
|
||||
* Summary: XML Schematron implementation
|
||||
* Description: interface to the XML Schematron validity checking.
|
||||
*
|
||||
* Copy: See Copyright for the status of this software.
|
||||
*
|
||||
* Author: Daniel Veillard
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __XML_SCHEMATRON_H__
|
||||
#define __XML_SCHEMATRON_H__
|
||||
|
||||
#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__ */
|
||||
@@ -1,189 +0,0 @@
|
||||
/*
|
||||
* Summary: unfinished XLink detection module
|
||||
* Description: unfinished XLink detection module
|
||||
*
|
||||
* Copy: See Copyright for the status of this software.
|
||||
*
|
||||
* Author: Daniel Veillard
|
||||
*/
|
||||
|
||||
#ifndef __XML_XLINK_H__
|
||||
#define __XML_XLINK_H__
|
||||
|
||||
#include <libxml/xmlversion.h>
|
||||
#include <libxml/tree.h>
|
||||
|
||||
#ifdef LIBXML_XPTR_ENABLED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Various defines for the various Link properties.
|
||||
*
|
||||
* NOTE: the link detection layer will try to resolve QName expansion
|
||||
* of namespaces. If "foo" is the prefix for "http://foo.com/"
|
||||
* then the link detection layer will expand role="foo:myrole"
|
||||
* to "http://foo.com/:myrole".
|
||||
* NOTE: the link detection layer will expand URI-References found on
|
||||
* href attributes by using the base mechanism if found.
|
||||
*/
|
||||
typedef xmlChar *xlinkHRef;
|
||||
typedef xmlChar *xlinkRole;
|
||||
typedef xmlChar *xlinkTitle;
|
||||
|
||||
typedef enum {
|
||||
XLINK_TYPE_NONE = 0,
|
||||
XLINK_TYPE_SIMPLE,
|
||||
XLINK_TYPE_EXTENDED,
|
||||
XLINK_TYPE_EXTENDED_SET
|
||||
} xlinkType;
|
||||
|
||||
typedef enum {
|
||||
XLINK_SHOW_NONE = 0,
|
||||
XLINK_SHOW_NEW,
|
||||
XLINK_SHOW_EMBED,
|
||||
XLINK_SHOW_REPLACE
|
||||
} xlinkShow;
|
||||
|
||||
typedef enum {
|
||||
XLINK_ACTUATE_NONE = 0,
|
||||
XLINK_ACTUATE_AUTO,
|
||||
XLINK_ACTUATE_ONREQUEST
|
||||
} xlinkActuate;
|
||||
|
||||
/**
|
||||
* xlinkNodeDetectFunc:
|
||||
* @ctx: user data pointer
|
||||
* @node: the node to check
|
||||
*
|
||||
* This is the prototype for the link detection routine.
|
||||
* It calls the default link detection callbacks upon link detection.
|
||||
*/
|
||||
typedef void (*xlinkNodeDetectFunc) (void *ctx, xmlNodePtr node);
|
||||
|
||||
/*
|
||||
* The link detection module interact with the upper layers using
|
||||
* a set of callback registered at parsing time.
|
||||
*/
|
||||
|
||||
/**
|
||||
* xlinkSimpleLinkFunk:
|
||||
* @ctx: user data pointer
|
||||
* @node: the node carrying the link
|
||||
* @href: the target of the link
|
||||
* @role: the role string
|
||||
* @title: the link title
|
||||
*
|
||||
* This is the prototype for a simple link detection callback.
|
||||
*/
|
||||
typedef void
|
||||
(*xlinkSimpleLinkFunk) (void *ctx,
|
||||
xmlNodePtr node,
|
||||
const xlinkHRef href,
|
||||
const xlinkRole role,
|
||||
const xlinkTitle title);
|
||||
|
||||
/**
|
||||
* xlinkExtendedLinkFunk:
|
||||
* @ctx: user data pointer
|
||||
* @node: the node carrying the link
|
||||
* @nbLocators: the number of locators detected on the link
|
||||
* @hrefs: pointer to the array of locator hrefs
|
||||
* @roles: pointer to the array of locator roles
|
||||
* @nbArcs: the number of arcs detected on the link
|
||||
* @from: pointer to the array of source roles found on the arcs
|
||||
* @to: pointer to the array of target roles found on the arcs
|
||||
* @show: array of values for the show attributes found on the arcs
|
||||
* @actuate: array of values for the actuate attributes found on the arcs
|
||||
* @nbTitles: the number of titles detected on the link
|
||||
* @title: array of titles detected on the link
|
||||
* @langs: array of xml:lang values for the titles
|
||||
*
|
||||
* This is the prototype for a extended link detection callback.
|
||||
*/
|
||||
typedef void
|
||||
(*xlinkExtendedLinkFunk)(void *ctx,
|
||||
xmlNodePtr node,
|
||||
int nbLocators,
|
||||
const xlinkHRef *hrefs,
|
||||
const xlinkRole *roles,
|
||||
int nbArcs,
|
||||
const xlinkRole *from,
|
||||
const xlinkRole *to,
|
||||
xlinkShow *show,
|
||||
xlinkActuate *actuate,
|
||||
int nbTitles,
|
||||
const xlinkTitle *titles,
|
||||
const xmlChar **langs);
|
||||
|
||||
/**
|
||||
* xlinkExtendedLinkSetFunk:
|
||||
* @ctx: user data pointer
|
||||
* @node: the node carrying the link
|
||||
* @nbLocators: the number of locators detected on the link
|
||||
* @hrefs: pointer to the array of locator hrefs
|
||||
* @roles: pointer to the array of locator roles
|
||||
* @nbTitles: the number of titles detected on the link
|
||||
* @title: array of titles detected on the link
|
||||
* @langs: array of xml:lang values for the titles
|
||||
*
|
||||
* This is the prototype for a extended link set detection callback.
|
||||
*/
|
||||
typedef void
|
||||
(*xlinkExtendedLinkSetFunk) (void *ctx,
|
||||
xmlNodePtr node,
|
||||
int nbLocators,
|
||||
const xlinkHRef *hrefs,
|
||||
const xlinkRole *roles,
|
||||
int nbTitles,
|
||||
const xlinkTitle *titles,
|
||||
const xmlChar **langs);
|
||||
|
||||
/**
|
||||
* This is the structure containing a set of Links detection callbacks.
|
||||
*
|
||||
* There is no default xlink callbacks, if one want to get link
|
||||
* recognition activated, those call backs must be provided before parsing.
|
||||
*/
|
||||
typedef struct _xlinkHandler xlinkHandler;
|
||||
typedef xlinkHandler *xlinkHandlerPtr;
|
||||
struct _xlinkHandler {
|
||||
xlinkSimpleLinkFunk simple;
|
||||
xlinkExtendedLinkFunk extended;
|
||||
xlinkExtendedLinkSetFunk set;
|
||||
};
|
||||
|
||||
/*
|
||||
* The default detection routine, can be overridden, they call the default
|
||||
* detection callbacks.
|
||||
*/
|
||||
|
||||
XMLPUBFUN xlinkNodeDetectFunc XMLCALL
|
||||
xlinkGetDefaultDetect (void);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xlinkSetDefaultDetect (xlinkNodeDetectFunc func);
|
||||
|
||||
/*
|
||||
* Routines to set/get the default handlers.
|
||||
*/
|
||||
XMLPUBFUN xlinkHandlerPtr XMLCALL
|
||||
xlinkGetDefaultHandler (void);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xlinkSetDefaultHandler (xlinkHandlerPtr handler);
|
||||
|
||||
/*
|
||||
* Link detection module itself.
|
||||
*/
|
||||
XMLPUBFUN xlinkType XMLCALL
|
||||
xlinkIsLink (xmlDocPtr doc,
|
||||
xmlNodePtr node);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LIBXML_XPTR_ENABLED */
|
||||
|
||||
#endif /* __XML_XLINK_H__ */
|
||||
@@ -1,57 +0,0 @@
|
||||
/*
|
||||
* Summary: dynamic module loading
|
||||
* Description: basic API for dynamic module loading, used by
|
||||
* libexslt added in 2.6.17
|
||||
*
|
||||
* Copy: See Copyright for the status of this software.
|
||||
*
|
||||
* Author: Joel W. Reed
|
||||
*/
|
||||
|
||||
#ifndef __XML_MODULE_H__
|
||||
#define __XML_MODULE_H__
|
||||
|
||||
#include <libxml/xmlversion.h>
|
||||
|
||||
#ifdef LIBXML_MODULES_ENABLED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* xmlModulePtr:
|
||||
*
|
||||
* A handle to a dynamically loaded module
|
||||
*/
|
||||
typedef struct _xmlModule xmlModule;
|
||||
typedef xmlModule *xmlModulePtr;
|
||||
|
||||
/**
|
||||
* xmlModuleOption:
|
||||
*
|
||||
* enumeration of options that can be passed down to xmlModuleOpen()
|
||||
*/
|
||||
typedef enum {
|
||||
XML_MODULE_LAZY = 1, /* lazy binding */
|
||||
XML_MODULE_LOCAL= 2 /* local binding */
|
||||
} xmlModuleOption;
|
||||
|
||||
XMLPUBFUN xmlModulePtr XMLCALL xmlModuleOpen (const char *filename,
|
||||
int options);
|
||||
|
||||
XMLPUBFUN int XMLCALL xmlModuleSymbol (xmlModulePtr module,
|
||||
const char* name,
|
||||
void **result);
|
||||
|
||||
XMLPUBFUN int XMLCALL xmlModuleClose (xmlModulePtr module);
|
||||
|
||||
XMLPUBFUN int XMLCALL xmlModuleFree (xmlModulePtr module);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LIBXML_MODULES_ENABLED */
|
||||
|
||||
#endif /*__XML_MODULE_H__ */
|
||||
@@ -1,202 +0,0 @@
|
||||
/*
|
||||
* Summary: Unicode character APIs
|
||||
* Description: API for the Unicode character APIs
|
||||
*
|
||||
* This file is automatically generated from the
|
||||
* UCS description files of the Unicode Character Database
|
||||
* http://www.unicode.org/Public/4.0-Update1/UCD-4.0.1.html
|
||||
* using the genUnicode.py Python script.
|
||||
*
|
||||
* Generation date: Mon Mar 27 11:09:52 2006
|
||||
* Sources: Blocks-4.0.1.txt UnicodeData-4.0.1.txt
|
||||
* Author: Daniel Veillard
|
||||
*/
|
||||
|
||||
#ifndef __XML_UNICODE_H__
|
||||
#define __XML_UNICODE_H__
|
||||
|
||||
#include <libxml/xmlversion.h>
|
||||
|
||||
#ifdef LIBXML_UNICODE_ENABLED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsAegeanNumbers (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsAlphabeticPresentationForms (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsArabic (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsArabicPresentationFormsA (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsArabicPresentationFormsB (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsArmenian (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsArrows (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsBasicLatin (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsBengali (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsBlockElements (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsBopomofo (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsBopomofoExtended (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsBoxDrawing (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsBraillePatterns (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsBuhid (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsByzantineMusicalSymbols (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCJKCompatibility (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCJKCompatibilityForms (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCJKCompatibilityIdeographs (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCJKCompatibilityIdeographsSupplement (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCJKRadicalsSupplement (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCJKSymbolsandPunctuation (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCJKUnifiedIdeographs (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCJKUnifiedIdeographsExtensionA (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCJKUnifiedIdeographsExtensionB (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCherokee (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCombiningDiacriticalMarks (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCombiningDiacriticalMarksforSymbols (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCombiningHalfMarks (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCombiningMarksforSymbols (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsControlPictures (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCurrencySymbols (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCypriotSyllabary (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCyrillic (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCyrillicSupplement (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsDeseret (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsDevanagari (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsDingbats (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsEnclosedAlphanumerics (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsEnclosedCJKLettersandMonths (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsEthiopic (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsGeneralPunctuation (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsGeometricShapes (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsGeorgian (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsGothic (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsGreek (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsGreekExtended (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsGreekandCoptic (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsGujarati (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsGurmukhi (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsHalfwidthandFullwidthForms (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsHangulCompatibilityJamo (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsHangulJamo (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsHangulSyllables (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsHanunoo (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsHebrew (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsHighPrivateUseSurrogates (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsHighSurrogates (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsHiragana (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsIPAExtensions (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsIdeographicDescriptionCharacters (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsKanbun (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsKangxiRadicals (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsKannada (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsKatakana (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsKatakanaPhoneticExtensions (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsKhmer (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsKhmerSymbols (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsLao (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsLatin1Supplement (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsLatinExtendedA (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsLatinExtendedB (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsLatinExtendedAdditional (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsLetterlikeSymbols (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsLimbu (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsLinearBIdeograms (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsLinearBSyllabary (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsLowSurrogates (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsMalayalam (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsMathematicalAlphanumericSymbols (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsMathematicalOperators (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsMiscellaneousMathematicalSymbolsA (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsMiscellaneousMathematicalSymbolsB (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsMiscellaneousSymbols (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsMiscellaneousSymbolsandArrows (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsMiscellaneousTechnical (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsMongolian (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsMusicalSymbols (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsMyanmar (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsNumberForms (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsOgham (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsOldItalic (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsOpticalCharacterRecognition (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsOriya (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsOsmanya (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsPhoneticExtensions (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsPrivateUse (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsPrivateUseArea (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsRunic (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsShavian (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsSinhala (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsSmallFormVariants (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsSpacingModifierLetters (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsSpecials (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsSuperscriptsandSubscripts (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsSupplementalArrowsA (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsSupplementalArrowsB (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsSupplementalMathematicalOperators (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsSupplementaryPrivateUseAreaA (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsSupplementaryPrivateUseAreaB (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsSyriac (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsTagalog (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsTagbanwa (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsTags (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsTaiLe (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsTaiXuanJingSymbols (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsTamil (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsTelugu (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsThaana (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsThai (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsTibetan (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsUgaritic (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsUnifiedCanadianAboriginalSyllabics (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsVariationSelectors (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsVariationSelectorsSupplement (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsYiRadicals (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsYiSyllables (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsYijingHexagramSymbols (int code);
|
||||
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsBlock (int code, const char *block);
|
||||
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCatC (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCatCc (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCatCf (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCatCo (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCatCs (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCatL (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCatLl (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCatLm (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCatLo (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCatLt (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCatLu (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCatM (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCatMc (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCatMe (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCatMn (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCatN (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCatNd (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCatNl (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCatNo (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCatP (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCatPc (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCatPd (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCatPe (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCatPf (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCatPi (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCatPo (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCatPs (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCatS (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCatSc (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCatSk (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCatSm (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCatSo (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCatZ (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCatZl (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCatZp (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCatZs (int code);
|
||||
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCat (int code, const char *cat);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LIBXML_UNICODE_ENABLED */
|
||||
|
||||
#endif /* __XML_UNICODE_H__ */
|
||||
@@ -1,503 +0,0 @@
|
||||
/*
|
||||
* Summary: compile-time version information
|
||||
* Description: compile-time version information for the XML library
|
||||
*
|
||||
* Copy: See Copyright for the status of this software.
|
||||
*
|
||||
* Author: Daniel Veillard
|
||||
*/
|
||||
|
||||
#ifndef __XML_VERSION_H__
|
||||
#define __XML_VERSION_H__
|
||||
|
||||
#include <libxml/xmlexports.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* use those to be sure nothing nasty will happen if
|
||||
* your library and includes mismatch
|
||||
*/
|
||||
#ifndef LIBXML2_COMPILING_MSCCDEF
|
||||
XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
|
||||
#endif /* LIBXML2_COMPILING_MSCCDEF */
|
||||
|
||||
/**
|
||||
* LIBXML_DOTTED_VERSION:
|
||||
*
|
||||
* the version string like "1.2.3"
|
||||
*/
|
||||
#define LIBXML_DOTTED_VERSION "@VERSION@"
|
||||
|
||||
/**
|
||||
* LIBXML_VERSION:
|
||||
*
|
||||
* the version number: 1.2.3 value is 10203
|
||||
*/
|
||||
#define LIBXML_VERSION @LIBXML_VERSION_NUMBER@
|
||||
|
||||
/**
|
||||
* LIBXML_VERSION_STRING:
|
||||
*
|
||||
* the version number string, 1.2.3 value is "10203"
|
||||
*/
|
||||
#define LIBXML_VERSION_STRING "@LIBXML_VERSION_NUMBER@"
|
||||
|
||||
/**
|
||||
* LIBXML_VERSION_EXTRA:
|
||||
*
|
||||
* extra version information, used to show a git commit description
|
||||
*/
|
||||
#define LIBXML_VERSION_EXTRA "@LIBXML_VERSION_EXTRA@"
|
||||
|
||||
/**
|
||||
* LIBXML_TEST_VERSION:
|
||||
*
|
||||
* Macro to check that the libxml version in use is compatible with
|
||||
* the version the software has been compiled against
|
||||
*/
|
||||
#define LIBXML_TEST_VERSION xmlCheckVersion(@LIBXML_VERSION_NUMBER@);
|
||||
|
||||
#ifndef VMS
|
||||
#if @WITH_TRIO@
|
||||
/**
|
||||
* WITH_TRIO:
|
||||
*
|
||||
* defined if the trio support need to be configured in
|
||||
*/
|
||||
#define WITH_TRIO
|
||||
#else
|
||||
/**
|
||||
* WITHOUT_TRIO:
|
||||
*
|
||||
* defined if the trio support should not be configured in
|
||||
*/
|
||||
#define WITHOUT_TRIO
|
||||
#endif
|
||||
#else /* VMS */
|
||||
/**
|
||||
* WITH_TRIO:
|
||||
*
|
||||
* defined if the trio support need to be configured in
|
||||
*/
|
||||
#define WITH_TRIO 1
|
||||
#endif /* VMS */
|
||||
|
||||
/**
|
||||
* LIBXML_THREAD_ENABLED:
|
||||
*
|
||||
* Whether the thread support is configured in
|
||||
*/
|
||||
#if @WITH_THREADS@
|
||||
#define LIBXML_THREAD_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_THREAD_ALLOC_ENABLED:
|
||||
*
|
||||
* Whether the allocation hooks are per-thread
|
||||
*/
|
||||
#if @WITH_THREAD_ALLOC@
|
||||
#define LIBXML_THREAD_ALLOC_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_TREE_ENABLED:
|
||||
*
|
||||
* Whether the DOM like tree manipulation API support is configured in
|
||||
*/
|
||||
#if @WITH_TREE@
|
||||
#define LIBXML_TREE_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_OUTPUT_ENABLED:
|
||||
*
|
||||
* Whether the serialization/saving support is configured in
|
||||
*/
|
||||
#if @WITH_OUTPUT@
|
||||
#define LIBXML_OUTPUT_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_PUSH_ENABLED:
|
||||
*
|
||||
* Whether the push parsing interfaces are configured in
|
||||
*/
|
||||
#if @WITH_PUSH@
|
||||
#define LIBXML_PUSH_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_READER_ENABLED:
|
||||
*
|
||||
* Whether the xmlReader parsing interface is configured in
|
||||
*/
|
||||
#if @WITH_READER@
|
||||
#define LIBXML_READER_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_PATTERN_ENABLED:
|
||||
*
|
||||
* Whether the xmlPattern node selection interface is configured in
|
||||
*/
|
||||
#if @WITH_PATTERN@
|
||||
#define LIBXML_PATTERN_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_WRITER_ENABLED:
|
||||
*
|
||||
* Whether the xmlWriter saving interface is configured in
|
||||
*/
|
||||
#if @WITH_WRITER@
|
||||
#define LIBXML_WRITER_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_SAX1_ENABLED:
|
||||
*
|
||||
* Whether the older SAX1 interface is configured in
|
||||
*/
|
||||
#if @WITH_SAX1@
|
||||
#define LIBXML_SAX1_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_FTP_ENABLED:
|
||||
*
|
||||
* Whether the FTP support is configured in
|
||||
*/
|
||||
#if @WITH_FTP@
|
||||
#define LIBXML_FTP_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_HTTP_ENABLED:
|
||||
*
|
||||
* Whether the HTTP support is configured in
|
||||
*/
|
||||
#if @WITH_HTTP@
|
||||
#define LIBXML_HTTP_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_VALID_ENABLED:
|
||||
*
|
||||
* Whether the DTD validation support is configured in
|
||||
*/
|
||||
#if @WITH_VALID@
|
||||
#define LIBXML_VALID_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_HTML_ENABLED:
|
||||
*
|
||||
* Whether the HTML support is configured in
|
||||
*/
|
||||
#if @WITH_HTML@
|
||||
#define LIBXML_HTML_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_LEGACY_ENABLED:
|
||||
*
|
||||
* Whether the deprecated APIs are compiled in for compatibility
|
||||
*/
|
||||
#if @WITH_LEGACY@
|
||||
#define LIBXML_LEGACY_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_C14N_ENABLED:
|
||||
*
|
||||
* Whether the Canonicalization support is configured in
|
||||
*/
|
||||
#if @WITH_C14N@
|
||||
#define LIBXML_C14N_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_CATALOG_ENABLED:
|
||||
*
|
||||
* Whether the Catalog support is configured in
|
||||
*/
|
||||
#if @WITH_CATALOG@
|
||||
#define LIBXML_CATALOG_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_XPATH_ENABLED:
|
||||
*
|
||||
* Whether XPath is configured in
|
||||
*/
|
||||
#if @WITH_XPATH@
|
||||
#define LIBXML_XPATH_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_XPTR_ENABLED:
|
||||
*
|
||||
* Whether XPointer is configured in
|
||||
*/
|
||||
#if @WITH_XPTR@
|
||||
#define LIBXML_XPTR_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_XPTR_LOCS_ENABLED:
|
||||
*
|
||||
* Whether support for XPointer locations is configured in
|
||||
*/
|
||||
#if @WITH_XPTR_LOCS@
|
||||
#define LIBXML_XPTR_LOCS_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_XINCLUDE_ENABLED:
|
||||
*
|
||||
* Whether XInclude is configured in
|
||||
*/
|
||||
#if @WITH_XINCLUDE@
|
||||
#define LIBXML_XINCLUDE_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_ICONV_ENABLED:
|
||||
*
|
||||
* Whether iconv support is available
|
||||
*/
|
||||
#if @WITH_ICONV@
|
||||
#define LIBXML_ICONV_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_ICU_ENABLED:
|
||||
*
|
||||
* Whether icu support is available
|
||||
*/
|
||||
#if @WITH_ICU@
|
||||
#define LIBXML_ICU_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_ISO8859X_ENABLED:
|
||||
*
|
||||
* Whether ISO-8859-* support is made available in case iconv is not
|
||||
*/
|
||||
#if @WITH_ISO8859X@
|
||||
#define LIBXML_ISO8859X_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_DEBUG_ENABLED:
|
||||
*
|
||||
* Whether Debugging module is configured in
|
||||
*/
|
||||
#if @WITH_DEBUG@
|
||||
#define LIBXML_DEBUG_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* DEBUG_MEMORY_LOCATION:
|
||||
*
|
||||
* Whether the memory debugging is configured in
|
||||
*/
|
||||
#if @WITH_MEM_DEBUG@
|
||||
#define DEBUG_MEMORY_LOCATION
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_DEBUG_RUNTIME:
|
||||
*
|
||||
* Whether the runtime debugging is configured in
|
||||
*/
|
||||
#if @WITH_RUN_DEBUG@
|
||||
#define LIBXML_DEBUG_RUNTIME
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_UNICODE_ENABLED:
|
||||
*
|
||||
* Whether the Unicode related interfaces are compiled in
|
||||
*/
|
||||
#if @WITH_REGEXPS@
|
||||
#define LIBXML_UNICODE_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_REGEXP_ENABLED:
|
||||
*
|
||||
* Whether the regular expressions interfaces are compiled in
|
||||
*/
|
||||
#if @WITH_REGEXPS@
|
||||
#define LIBXML_REGEXP_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_AUTOMATA_ENABLED:
|
||||
*
|
||||
* Whether the automata interfaces are compiled in
|
||||
*/
|
||||
#if @WITH_REGEXPS@
|
||||
#define LIBXML_AUTOMATA_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_EXPR_ENABLED:
|
||||
*
|
||||
* Whether the formal expressions interfaces are compiled in
|
||||
*
|
||||
* This code is unused and disabled unconditionally for now.
|
||||
*/
|
||||
#if 0
|
||||
#define LIBXML_EXPR_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_SCHEMAS_ENABLED:
|
||||
*
|
||||
* Whether the Schemas validation interfaces are compiled in
|
||||
*/
|
||||
#if @WITH_SCHEMAS@
|
||||
#define LIBXML_SCHEMAS_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_SCHEMATRON_ENABLED:
|
||||
*
|
||||
* Whether the Schematron validation interfaces are compiled in
|
||||
*/
|
||||
#if @WITH_SCHEMATRON@
|
||||
#define LIBXML_SCHEMATRON_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_MODULES_ENABLED:
|
||||
*
|
||||
* Whether the module interfaces are compiled in
|
||||
*/
|
||||
#if @WITH_MODULES@
|
||||
#define LIBXML_MODULES_ENABLED
|
||||
/**
|
||||
* LIBXML_MODULE_EXTENSION:
|
||||
*
|
||||
* the string suffix used by dynamic modules (usually shared libraries)
|
||||
*/
|
||||
#define LIBXML_MODULE_EXTENSION "@MODULE_EXTENSION@"
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_ZLIB_ENABLED:
|
||||
*
|
||||
* Whether the Zlib support is compiled in
|
||||
*/
|
||||
#if @WITH_ZLIB@
|
||||
#define LIBXML_ZLIB_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_LZMA_ENABLED:
|
||||
*
|
||||
* Whether the Lzma support is compiled in
|
||||
*/
|
||||
#if @WITH_LZMA@
|
||||
#define LIBXML_LZMA_ENABLED
|
||||
#endif
|
||||
|
||||
#ifdef __GNUC__
|
||||
|
||||
/**
|
||||
* ATTRIBUTE_UNUSED:
|
||||
*
|
||||
* Macro used to signal to GCC unused function parameters
|
||||
*/
|
||||
|
||||
#ifndef ATTRIBUTE_UNUSED
|
||||
# if ((__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ >= 7)))
|
||||
# define ATTRIBUTE_UNUSED __attribute__((unused))
|
||||
# else
|
||||
# define ATTRIBUTE_UNUSED
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_ATTR_ALLOC_SIZE:
|
||||
*
|
||||
* Macro used to indicate to GCC this is an allocator function
|
||||
*/
|
||||
|
||||
#ifndef LIBXML_ATTR_ALLOC_SIZE
|
||||
# if (!defined(__clang__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3))))
|
||||
# define LIBXML_ATTR_ALLOC_SIZE(x) __attribute__((alloc_size(x)))
|
||||
# else
|
||||
# define LIBXML_ATTR_ALLOC_SIZE(x)
|
||||
# endif
|
||||
#else
|
||||
# define LIBXML_ATTR_ALLOC_SIZE(x)
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_ATTR_FORMAT:
|
||||
*
|
||||
* Macro used to indicate to GCC the parameter are printf like
|
||||
*/
|
||||
|
||||
#ifndef LIBXML_ATTR_FORMAT
|
||||
# if ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)))
|
||||
# define LIBXML_ATTR_FORMAT(fmt,args) __attribute__((__format__(__printf__,fmt,args)))
|
||||
# else
|
||||
# define LIBXML_ATTR_FORMAT(fmt,args)
|
||||
# endif
|
||||
#else
|
||||
# define LIBXML_ATTR_FORMAT(fmt,args)
|
||||
#endif
|
||||
|
||||
#ifndef XML_DEPRECATED
|
||||
# ifdef IN_LIBXML
|
||||
# define XML_DEPRECATED
|
||||
# else
|
||||
/* Available since at least GCC 3.1 */
|
||||
# define XML_DEPRECATED __attribute__((deprecated))
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#else /* ! __GNUC__ */
|
||||
/**
|
||||
* ATTRIBUTE_UNUSED:
|
||||
*
|
||||
* Macro used to signal to GCC unused function parameters
|
||||
*/
|
||||
#define ATTRIBUTE_UNUSED
|
||||
/**
|
||||
* LIBXML_ATTR_ALLOC_SIZE:
|
||||
*
|
||||
* Macro used to indicate to GCC this is an allocator function
|
||||
*/
|
||||
#define LIBXML_ATTR_ALLOC_SIZE(x)
|
||||
/**
|
||||
* LIBXML_ATTR_FORMAT:
|
||||
*
|
||||
* Macro used to indicate to GCC the parameter are printf like
|
||||
*/
|
||||
#define LIBXML_ATTR_FORMAT(fmt,args)
|
||||
/**
|
||||
* XML_DEPRECATED:
|
||||
*
|
||||
* Macro used to indicate that a function, variable, type or struct member
|
||||
* is deprecated.
|
||||
*/
|
||||
#ifndef XML_DEPRECATED
|
||||
#define XML_DEPRECATED
|
||||
#endif
|
||||
#endif /* __GNUC__ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,488 +0,0 @@
|
||||
/*
|
||||
* Summary: text writing API for XML
|
||||
* Description: text writing API for XML
|
||||
*
|
||||
* Copy: See Copyright for the status of this software.
|
||||
*
|
||||
* Author: Alfred Mickautsch <[email protected]>
|
||||
*/
|
||||
|
||||
#ifndef __XML_XMLWRITER_H__
|
||||
#define __XML_XMLWRITER_H__
|
||||
|
||||
#include <libxml/xmlversion.h>
|
||||
|
||||
#ifdef LIBXML_WRITER_ENABLED
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <libxml/xmlIO.h>
|
||||
#include <libxml/list.h>
|
||||
#include <libxml/xmlstring.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct _xmlTextWriter xmlTextWriter;
|
||||
typedef xmlTextWriter *xmlTextWriterPtr;
|
||||
|
||||
/*
|
||||
* Constructors & Destructor
|
||||
*/
|
||||
XMLPUBFUN xmlTextWriterPtr XMLCALL
|
||||
xmlNewTextWriter(xmlOutputBufferPtr out);
|
||||
XMLPUBFUN xmlTextWriterPtr XMLCALL
|
||||
xmlNewTextWriterFilename(const char *uri, int compression);
|
||||
XMLPUBFUN xmlTextWriterPtr XMLCALL
|
||||
xmlNewTextWriterMemory(xmlBufferPtr buf, int compression);
|
||||
XMLPUBFUN xmlTextWriterPtr XMLCALL
|
||||
xmlNewTextWriterPushParser(xmlParserCtxtPtr ctxt, int compression);
|
||||
XMLPUBFUN xmlTextWriterPtr XMLCALL
|
||||
xmlNewTextWriterDoc(xmlDocPtr * doc, int compression);
|
||||
XMLPUBFUN xmlTextWriterPtr XMLCALL
|
||||
xmlNewTextWriterTree(xmlDocPtr doc, xmlNodePtr node,
|
||||
int compression);
|
||||
XMLPUBFUN void XMLCALL xmlFreeTextWriter(xmlTextWriterPtr writer);
|
||||
|
||||
/*
|
||||
* Functions
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* Document
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterStartDocument(xmlTextWriterPtr writer,
|
||||
const char *version,
|
||||
const char *encoding,
|
||||
const char *standalone);
|
||||
XMLPUBFUN int XMLCALL xmlTextWriterEndDocument(xmlTextWriterPtr
|
||||
writer);
|
||||
|
||||
/*
|
||||
* Comments
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL xmlTextWriterStartComment(xmlTextWriterPtr
|
||||
writer);
|
||||
XMLPUBFUN int XMLCALL xmlTextWriterEndComment(xmlTextWriterPtr writer);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterWriteFormatComment(xmlTextWriterPtr writer,
|
||||
const char *format, ...)
|
||||
LIBXML_ATTR_FORMAT(2,3);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterWriteVFormatComment(xmlTextWriterPtr writer,
|
||||
const char *format,
|
||||
va_list argptr)
|
||||
LIBXML_ATTR_FORMAT(2,0);
|
||||
XMLPUBFUN int XMLCALL xmlTextWriterWriteComment(xmlTextWriterPtr
|
||||
writer,
|
||||
const xmlChar *
|
||||
content);
|
||||
|
||||
/*
|
||||
* Elements
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterStartElement(xmlTextWriterPtr writer,
|
||||
const xmlChar * name);
|
||||
XMLPUBFUN int XMLCALL xmlTextWriterStartElementNS(xmlTextWriterPtr
|
||||
writer,
|
||||
const xmlChar *
|
||||
prefix,
|
||||
const xmlChar * name,
|
||||
const xmlChar *
|
||||
namespaceURI);
|
||||
XMLPUBFUN int XMLCALL xmlTextWriterEndElement(xmlTextWriterPtr writer);
|
||||
XMLPUBFUN int XMLCALL xmlTextWriterFullEndElement(xmlTextWriterPtr
|
||||
writer);
|
||||
|
||||
/*
|
||||
* Elements conveniency functions
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterWriteFormatElement(xmlTextWriterPtr writer,
|
||||
const xmlChar * name,
|
||||
const char *format, ...)
|
||||
LIBXML_ATTR_FORMAT(3,4);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterWriteVFormatElement(xmlTextWriterPtr writer,
|
||||
const xmlChar * name,
|
||||
const char *format,
|
||||
va_list argptr)
|
||||
LIBXML_ATTR_FORMAT(3,0);
|
||||
XMLPUBFUN int XMLCALL xmlTextWriterWriteElement(xmlTextWriterPtr
|
||||
writer,
|
||||
const xmlChar * name,
|
||||
const xmlChar *
|
||||
content);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterWriteFormatElementNS(xmlTextWriterPtr writer,
|
||||
const xmlChar * prefix,
|
||||
const xmlChar * name,
|
||||
const xmlChar * namespaceURI,
|
||||
const char *format, ...)
|
||||
LIBXML_ATTR_FORMAT(5,6);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterWriteVFormatElementNS(xmlTextWriterPtr writer,
|
||||
const xmlChar * prefix,
|
||||
const xmlChar * name,
|
||||
const xmlChar * namespaceURI,
|
||||
const char *format,
|
||||
va_list argptr)
|
||||
LIBXML_ATTR_FORMAT(5,0);
|
||||
XMLPUBFUN int XMLCALL xmlTextWriterWriteElementNS(xmlTextWriterPtr
|
||||
writer,
|
||||
const xmlChar *
|
||||
prefix,
|
||||
const xmlChar * name,
|
||||
const xmlChar *
|
||||
namespaceURI,
|
||||
const xmlChar *
|
||||
content);
|
||||
|
||||
/*
|
||||
* Text
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterWriteFormatRaw(xmlTextWriterPtr writer,
|
||||
const char *format, ...)
|
||||
LIBXML_ATTR_FORMAT(2,3);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterWriteVFormatRaw(xmlTextWriterPtr writer,
|
||||
const char *format, va_list argptr)
|
||||
LIBXML_ATTR_FORMAT(2,0);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterWriteRawLen(xmlTextWriterPtr writer,
|
||||
const xmlChar * content, int len);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterWriteRaw(xmlTextWriterPtr writer,
|
||||
const xmlChar * content);
|
||||
XMLPUBFUN int XMLCALL xmlTextWriterWriteFormatString(xmlTextWriterPtr
|
||||
writer,
|
||||
const char
|
||||
*format, ...)
|
||||
LIBXML_ATTR_FORMAT(2,3);
|
||||
XMLPUBFUN int XMLCALL xmlTextWriterWriteVFormatString(xmlTextWriterPtr
|
||||
writer,
|
||||
const char
|
||||
*format,
|
||||
va_list argptr)
|
||||
LIBXML_ATTR_FORMAT(2,0);
|
||||
XMLPUBFUN int XMLCALL xmlTextWriterWriteString(xmlTextWriterPtr writer,
|
||||
const xmlChar *
|
||||
content);
|
||||
XMLPUBFUN int XMLCALL xmlTextWriterWriteBase64(xmlTextWriterPtr writer,
|
||||
const char *data,
|
||||
int start, int len);
|
||||
XMLPUBFUN int XMLCALL xmlTextWriterWriteBinHex(xmlTextWriterPtr writer,
|
||||
const char *data,
|
||||
int start, int len);
|
||||
|
||||
/*
|
||||
* Attributes
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterStartAttribute(xmlTextWriterPtr writer,
|
||||
const xmlChar * name);
|
||||
XMLPUBFUN int XMLCALL xmlTextWriterStartAttributeNS(xmlTextWriterPtr
|
||||
writer,
|
||||
const xmlChar *
|
||||
prefix,
|
||||
const xmlChar *
|
||||
name,
|
||||
const xmlChar *
|
||||
namespaceURI);
|
||||
XMLPUBFUN int XMLCALL xmlTextWriterEndAttribute(xmlTextWriterPtr
|
||||
writer);
|
||||
|
||||
/*
|
||||
* Attributes conveniency functions
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterWriteFormatAttribute(xmlTextWriterPtr writer,
|
||||
const xmlChar * name,
|
||||
const char *format, ...)
|
||||
LIBXML_ATTR_FORMAT(3,4);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterWriteVFormatAttribute(xmlTextWriterPtr writer,
|
||||
const xmlChar * name,
|
||||
const char *format,
|
||||
va_list argptr)
|
||||
LIBXML_ATTR_FORMAT(3,0);
|
||||
XMLPUBFUN int XMLCALL xmlTextWriterWriteAttribute(xmlTextWriterPtr
|
||||
writer,
|
||||
const xmlChar * name,
|
||||
const xmlChar *
|
||||
content);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterWriteFormatAttributeNS(xmlTextWriterPtr writer,
|
||||
const xmlChar * prefix,
|
||||
const xmlChar * name,
|
||||
const xmlChar * namespaceURI,
|
||||
const char *format, ...)
|
||||
LIBXML_ATTR_FORMAT(5,6);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterWriteVFormatAttributeNS(xmlTextWriterPtr writer,
|
||||
const xmlChar * prefix,
|
||||
const xmlChar * name,
|
||||
const xmlChar * namespaceURI,
|
||||
const char *format,
|
||||
va_list argptr)
|
||||
LIBXML_ATTR_FORMAT(5,0);
|
||||
XMLPUBFUN int XMLCALL xmlTextWriterWriteAttributeNS(xmlTextWriterPtr
|
||||
writer,
|
||||
const xmlChar *
|
||||
prefix,
|
||||
const xmlChar *
|
||||
name,
|
||||
const xmlChar *
|
||||
namespaceURI,
|
||||
const xmlChar *
|
||||
content);
|
||||
|
||||
/*
|
||||
* PI's
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterStartPI(xmlTextWriterPtr writer,
|
||||
const xmlChar * target);
|
||||
XMLPUBFUN int XMLCALL xmlTextWriterEndPI(xmlTextWriterPtr writer);
|
||||
|
||||
/*
|
||||
* PI conveniency functions
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterWriteFormatPI(xmlTextWriterPtr writer,
|
||||
const xmlChar * target,
|
||||
const char *format, ...)
|
||||
LIBXML_ATTR_FORMAT(3,4);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterWriteVFormatPI(xmlTextWriterPtr writer,
|
||||
const xmlChar * target,
|
||||
const char *format, va_list argptr)
|
||||
LIBXML_ATTR_FORMAT(3,0);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterWritePI(xmlTextWriterPtr writer,
|
||||
const xmlChar * target,
|
||||
const xmlChar * content);
|
||||
|
||||
/**
|
||||
* xmlTextWriterWriteProcessingInstruction:
|
||||
*
|
||||
* This macro maps to xmlTextWriterWritePI
|
||||
*/
|
||||
#define xmlTextWriterWriteProcessingInstruction xmlTextWriterWritePI
|
||||
|
||||
/*
|
||||
* CDATA
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL xmlTextWriterStartCDATA(xmlTextWriterPtr writer);
|
||||
XMLPUBFUN int XMLCALL xmlTextWriterEndCDATA(xmlTextWriterPtr writer);
|
||||
|
||||
/*
|
||||
* CDATA conveniency functions
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterWriteFormatCDATA(xmlTextWriterPtr writer,
|
||||
const char *format, ...)
|
||||
LIBXML_ATTR_FORMAT(2,3);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterWriteVFormatCDATA(xmlTextWriterPtr writer,
|
||||
const char *format, va_list argptr)
|
||||
LIBXML_ATTR_FORMAT(2,0);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterWriteCDATA(xmlTextWriterPtr writer,
|
||||
const xmlChar * content);
|
||||
|
||||
/*
|
||||
* DTD
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterStartDTD(xmlTextWriterPtr writer,
|
||||
const xmlChar * name,
|
||||
const xmlChar * pubid,
|
||||
const xmlChar * sysid);
|
||||
XMLPUBFUN int XMLCALL xmlTextWriterEndDTD(xmlTextWriterPtr writer);
|
||||
|
||||
/*
|
||||
* DTD conveniency functions
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterWriteFormatDTD(xmlTextWriterPtr writer,
|
||||
const xmlChar * name,
|
||||
const xmlChar * pubid,
|
||||
const xmlChar * sysid,
|
||||
const char *format, ...)
|
||||
LIBXML_ATTR_FORMAT(5,6);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterWriteVFormatDTD(xmlTextWriterPtr writer,
|
||||
const xmlChar * name,
|
||||
const xmlChar * pubid,
|
||||
const xmlChar * sysid,
|
||||
const char *format, va_list argptr)
|
||||
LIBXML_ATTR_FORMAT(5,0);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterWriteDTD(xmlTextWriterPtr writer,
|
||||
const xmlChar * name,
|
||||
const xmlChar * pubid,
|
||||
const xmlChar * sysid,
|
||||
const xmlChar * subset);
|
||||
|
||||
/**
|
||||
* xmlTextWriterWriteDocType:
|
||||
*
|
||||
* this macro maps to xmlTextWriterWriteDTD
|
||||
*/
|
||||
#define xmlTextWriterWriteDocType xmlTextWriterWriteDTD
|
||||
|
||||
/*
|
||||
* DTD element definition
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterStartDTDElement(xmlTextWriterPtr writer,
|
||||
const xmlChar * name);
|
||||
XMLPUBFUN int XMLCALL xmlTextWriterEndDTDElement(xmlTextWriterPtr
|
||||
writer);
|
||||
|
||||
/*
|
||||
* DTD element definition conveniency functions
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterWriteFormatDTDElement(xmlTextWriterPtr writer,
|
||||
const xmlChar * name,
|
||||
const char *format, ...)
|
||||
LIBXML_ATTR_FORMAT(3,4);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterWriteVFormatDTDElement(xmlTextWriterPtr writer,
|
||||
const xmlChar * name,
|
||||
const char *format,
|
||||
va_list argptr)
|
||||
LIBXML_ATTR_FORMAT(3,0);
|
||||
XMLPUBFUN int XMLCALL xmlTextWriterWriteDTDElement(xmlTextWriterPtr
|
||||
writer,
|
||||
const xmlChar *
|
||||
name,
|
||||
const xmlChar *
|
||||
content);
|
||||
|
||||
/*
|
||||
* DTD attribute list definition
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterStartDTDAttlist(xmlTextWriterPtr writer,
|
||||
const xmlChar * name);
|
||||
XMLPUBFUN int XMLCALL xmlTextWriterEndDTDAttlist(xmlTextWriterPtr
|
||||
writer);
|
||||
|
||||
/*
|
||||
* DTD attribute list definition conveniency functions
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterWriteFormatDTDAttlist(xmlTextWriterPtr writer,
|
||||
const xmlChar * name,
|
||||
const char *format, ...)
|
||||
LIBXML_ATTR_FORMAT(3,4);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterWriteVFormatDTDAttlist(xmlTextWriterPtr writer,
|
||||
const xmlChar * name,
|
||||
const char *format,
|
||||
va_list argptr)
|
||||
LIBXML_ATTR_FORMAT(3,0);
|
||||
XMLPUBFUN int XMLCALL xmlTextWriterWriteDTDAttlist(xmlTextWriterPtr
|
||||
writer,
|
||||
const xmlChar *
|
||||
name,
|
||||
const xmlChar *
|
||||
content);
|
||||
|
||||
/*
|
||||
* DTD entity definition
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterStartDTDEntity(xmlTextWriterPtr writer,
|
||||
int pe, const xmlChar * name);
|
||||
XMLPUBFUN int XMLCALL xmlTextWriterEndDTDEntity(xmlTextWriterPtr
|
||||
writer);
|
||||
|
||||
/*
|
||||
* DTD entity definition conveniency functions
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterWriteFormatDTDInternalEntity(xmlTextWriterPtr writer,
|
||||
int pe,
|
||||
const xmlChar * name,
|
||||
const char *format, ...)
|
||||
LIBXML_ATTR_FORMAT(4,5);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterWriteVFormatDTDInternalEntity(xmlTextWriterPtr writer,
|
||||
int pe,
|
||||
const xmlChar * name,
|
||||
const char *format,
|
||||
va_list argptr)
|
||||
LIBXML_ATTR_FORMAT(4,0);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterWriteDTDInternalEntity(xmlTextWriterPtr writer,
|
||||
int pe,
|
||||
const xmlChar * name,
|
||||
const xmlChar * content);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterWriteDTDExternalEntity(xmlTextWriterPtr writer,
|
||||
int pe,
|
||||
const xmlChar * name,
|
||||
const xmlChar * pubid,
|
||||
const xmlChar * sysid,
|
||||
const xmlChar * ndataid);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterWriteDTDExternalEntityContents(xmlTextWriterPtr
|
||||
writer,
|
||||
const xmlChar * pubid,
|
||||
const xmlChar * sysid,
|
||||
const xmlChar *
|
||||
ndataid);
|
||||
XMLPUBFUN int XMLCALL xmlTextWriterWriteDTDEntity(xmlTextWriterPtr
|
||||
writer, int pe,
|
||||
const xmlChar * name,
|
||||
const xmlChar *
|
||||
pubid,
|
||||
const xmlChar *
|
||||
sysid,
|
||||
const xmlChar *
|
||||
ndataid,
|
||||
const xmlChar *
|
||||
content);
|
||||
|
||||
/*
|
||||
* DTD notation definition
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterWriteDTDNotation(xmlTextWriterPtr writer,
|
||||
const xmlChar * name,
|
||||
const xmlChar * pubid,
|
||||
const xmlChar * sysid);
|
||||
|
||||
/*
|
||||
* Indentation
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterSetIndent(xmlTextWriterPtr writer, int indent);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterSetIndentString(xmlTextWriterPtr writer,
|
||||
const xmlChar * str);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterSetQuoteChar(xmlTextWriterPtr writer, xmlChar quotechar);
|
||||
|
||||
|
||||
/*
|
||||
* misc
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL xmlTextWriterFlush(xmlTextWriterPtr writer);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LIBXML_WRITER_ENABLED */
|
||||
|
||||
#endif /* __XML_XMLWRITER_H__ */
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
Daniel Veillard <[email protected]>
|
||||
Bjorn Reese <[email protected]>
|
||||
William Brack <[email protected]>
|
||||
Igor Zlatkovic <[email protected]> for the Windows port
|
||||
Aleksey Sanin <[email protected]>
|
||||
+13
-9
@@ -1,6 +1,5 @@
|
||||
|
||||
include_directories(
|
||||
include
|
||||
${REACTOS_SOURCE_DIR}/sdk/lib/3rdparty/libwin-iconv
|
||||
${REACTOS_SOURCE_DIR}/sdk/include/reactos/libs/zlib)
|
||||
|
||||
@@ -8,7 +7,6 @@ add_definitions(
|
||||
-D__MINGW32__
|
||||
-DLIBXML_STATIC
|
||||
-D_REENTRANT
|
||||
-DHAVE_WIN32_THREADS
|
||||
-D_MBCS
|
||||
-D_WINDOWS
|
||||
-DWIN32
|
||||
@@ -18,7 +16,6 @@ add_definitions(
|
||||
|
||||
list(APPEND SOURCE
|
||||
buf.c
|
||||
c14n.c
|
||||
catalog.c
|
||||
chvalid.c
|
||||
debugXML.c
|
||||
@@ -30,10 +27,7 @@ list(APPEND SOURCE
|
||||
hash.c
|
||||
HTMLparser.c
|
||||
HTMLtree.c
|
||||
legacy.c
|
||||
list.c
|
||||
nanoftp.c
|
||||
nanohttp.c
|
||||
parser.c
|
||||
parserInternals.c
|
||||
pattern.c
|
||||
@@ -45,17 +39,14 @@ list(APPEND SOURCE
|
||||
uri.c
|
||||
valid.c
|
||||
xinclude.c
|
||||
xlink.c
|
||||
xmlIO.c
|
||||
xmlmemory.c
|
||||
xmlreader.c
|
||||
xmlregexp.c
|
||||
xmlmodule.c
|
||||
xmlsave.c
|
||||
xmlschemas.c
|
||||
xmlschemastypes.c
|
||||
xmlunicode.c
|
||||
xmlwriter.c
|
||||
xpath.c
|
||||
xpointer.c
|
||||
xmlstring.c
|
||||
@@ -69,10 +60,23 @@ if(CMAKE_C_COMPILER_ID STREQUAL "MSVC")
|
||||
target_compile_options(libxml2 PRIVATE "/wd4101")
|
||||
# Local variable initialized but not referenced
|
||||
remove_target_compile_option(libxml2 "/we4189")
|
||||
# warning C4996: 'function': was declared deprecated
|
||||
target_compile_options(libxml2 PRIVATE "/wd4996")
|
||||
# warning C4090: 'function': different 'const' qualifiers
|
||||
target_compile_options(libxml2 PRIVATE "/wd4090")
|
||||
if(ARCH STREQUAL "amd64" OR ARCH STREQUAL "arm64")
|
||||
# '=': conversion from 'size_t' to 'int', possible loss of data
|
||||
target_compile_options(libxml2 PRIVATE "/wd4267")
|
||||
endif()
|
||||
else()
|
||||
target_compile_options(libxml2 PRIVATE "-w")
|
||||
endif()
|
||||
|
||||
target_include_directories(libxml2
|
||||
PRIVATE include/private
|
||||
PUBLIC include;include/libxml
|
||||
)
|
||||
|
||||
target_link_libraries(libxml2 oldnames)
|
||||
add_pch(libxml2 libxml.h SOURCE)
|
||||
add_dependencies(libxml2 psdk)
|
||||
|
||||
+416
-753
File diff suppressed because it is too large
Load Diff
Vendored
+13
-14
@@ -19,13 +19,14 @@
|
||||
#include <libxml/HTMLparser.h>
|
||||
#include <libxml/HTMLtree.h>
|
||||
#include <libxml/entities.h>
|
||||
#include <libxml/valid.h>
|
||||
#include <libxml/xmlerror.h>
|
||||
#include <libxml/parserInternals.h>
|
||||
#include <libxml/globals.h>
|
||||
#include <libxml/uri.h>
|
||||
|
||||
#include "buf.h"
|
||||
#include "private/buf.h"
|
||||
#include "private/error.h"
|
||||
#include "private/io.h"
|
||||
#include "private/save.h"
|
||||
|
||||
/************************************************************************
|
||||
* *
|
||||
@@ -328,11 +329,6 @@ htmlIsBooleanAttr(const xmlChar *name)
|
||||
}
|
||||
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
/*
|
||||
* private routine exported from xmlIO.c
|
||||
*/
|
||||
xmlOutputBufferPtr
|
||||
xmlAllocOutputBufferInternal(xmlCharEncodingHandlerPtr encoder);
|
||||
/************************************************************************
|
||||
* *
|
||||
* Output error handlers *
|
||||
@@ -417,7 +413,7 @@ htmlBufNodeDumpFormat(xmlBufPtr buf, xmlDocPtr doc, xmlNodePtr cur,
|
||||
htmlSaveErrMemory("allocating HTML output buffer");
|
||||
return (-1);
|
||||
}
|
||||
memset(outbuf, 0, (size_t) sizeof(xmlOutputBuffer));
|
||||
memset(outbuf, 0, sizeof(xmlOutputBuffer));
|
||||
outbuf->buffer = buf;
|
||||
outbuf->encoder = NULL;
|
||||
outbuf->writecallback = NULL;
|
||||
@@ -622,8 +618,6 @@ htmlDocDumpMemory(xmlDocPtr cur, xmlChar**mem, int *size) {
|
||||
* *
|
||||
************************************************************************/
|
||||
|
||||
void xmlNsListDumpOutput(xmlOutputBufferPtr buf, xmlNsPtr cur);
|
||||
|
||||
/**
|
||||
* htmlDtdDumpOutput:
|
||||
* @buf: the HTML buffer output
|
||||
@@ -705,10 +699,15 @@ htmlAttrDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, xmlAttrPtr cur) {
|
||||
while (IS_BLANK_CH(*tmp)) tmp++;
|
||||
|
||||
/*
|
||||
* the < and > have already been escaped at the entity level
|
||||
* And doing so here breaks server side includes
|
||||
* Angle brackets are technically illegal in URIs, but they're
|
||||
* used in server side includes, for example. Curly brackets
|
||||
* are illegal as well and often used in templates.
|
||||
* Don't escape non-whitespace, printable ASCII chars for
|
||||
* improved interoperability. Only escape space, control
|
||||
* and non-ASCII chars.
|
||||
*/
|
||||
escaped = xmlURIEscapeStr(tmp, BAD_CAST"@/:=?;#%&,+<>");
|
||||
escaped = xmlURIEscapeStr(tmp,
|
||||
BAD_CAST "\"#$%&+,/:;<=>?@[\\]^`{|}");
|
||||
if (escaped != NULL) {
|
||||
xmlBufWriteQuotedString(buf->buffer, escaped);
|
||||
xmlFree(escaped);
|
||||
|
||||
Vendored
-3836
File diff suppressed because it is too large
Load Diff
Vendored
-126
@@ -1,126 +0,0 @@
|
||||
# libxml2
|
||||
|
||||
libxml2 is an XML toolkit implemented in C, originally developed for
|
||||
the GNOME Project.
|
||||
|
||||
Full documentation is available at
|
||||
<https://gitlab.gnome.org/GNOME/libxml2/-/wikis>.
|
||||
|
||||
Bugs should be reported at
|
||||
<https://gitlab.gnome.org/GNOME/libxml2/-/issues>.
|
||||
|
||||
A mailing list xml@gnome.org is available. You can subscribe at
|
||||
<https://mail.gnome.org/mailman/listinfo/xml>. The list archive is at
|
||||
<https://mail.gnome.org/archives/xml/>.
|
||||
|
||||
## License
|
||||
|
||||
This code is released under the MIT License, see the Copyright file.
|
||||
|
||||
## Build instructions
|
||||
|
||||
libxml2 can be built with GNU Autotools, CMake, or several other build
|
||||
systems in platform-specific subdirectories.
|
||||
|
||||
### Autotools (for POSIX systems like Linux, BSD, macOS)
|
||||
|
||||
If you build from a Git tree, you have to install Autotools and start
|
||||
by generating the configuration files with:
|
||||
|
||||
./autogen.sh
|
||||
|
||||
If you build from a source tarball, extract the archive with:
|
||||
|
||||
tar xf libxml2-xxx.tar.gz
|
||||
cd libxml2-xxx
|
||||
|
||||
To see a list of build options:
|
||||
|
||||
./configure --help
|
||||
|
||||
Also see the INSTALL file for additional instructions. Then you can
|
||||
configure and build the library:
|
||||
|
||||
./configure [possible options]
|
||||
make
|
||||
|
||||
Note that by default, no optimization options are used. You have to
|
||||
enable them manually, for example with:
|
||||
|
||||
CFLAGS='-O2 -fno-semantic-interposition' ./configure
|
||||
|
||||
Now you can run the test suite with:
|
||||
|
||||
make check
|
||||
|
||||
Please report test failures to the mailing list or bug tracker.
|
||||
|
||||
Then you can install the library:
|
||||
|
||||
make install
|
||||
|
||||
At that point you may have to rerun ldconfig or a similar utility to
|
||||
update your list of installed shared libs.
|
||||
|
||||
### CMake (mainly for Windows)
|
||||
|
||||
Another option for compiling libxml is using CMake:
|
||||
|
||||
cmake -E tar xf libxml2-xxx.tar.gz
|
||||
cmake -S libxml2-xxx -B libxml2-xxx-build [possible options]
|
||||
cmake --build libxml2-xxx-build
|
||||
cmake --install libxml2-xxx-build
|
||||
|
||||
Common CMake options include:
|
||||
|
||||
-D BUILD_SHARED_LIBS=OFF # build static libraries
|
||||
-D CMAKE_BUILD_TYPE=Release # specify build type
|
||||
-D CMAKE_INSTALL_PREFIX=/usr/local # specify the install path
|
||||
-D LIBXML2_WITH_ICONV=OFF # disable iconv
|
||||
-D LIBXML2_WITH_LZMA=OFF # disable liblzma
|
||||
-D LIBXML2_WITH_PYTHON=OFF # disable Python
|
||||
-D LIBXML2_WITH_ZLIB=OFF # disable libz
|
||||
|
||||
You can also open the libxml source directory with its CMakeLists.txt
|
||||
directly in various IDEs such as CLion, QtCreator, or Visual Studio.
|
||||
|
||||
## Dependencies
|
||||
|
||||
Libxml does not require any other libraries. A platform with somewhat
|
||||
recent POSIX support should be sufficient (please report any violation
|
||||
to this rule you may find).
|
||||
|
||||
However, if found at configuration time, libxml will detect and use
|
||||
the following libraries:
|
||||
|
||||
- [libz](https://zlib.net/), a highly portable and widely available
|
||||
compression library.
|
||||
- [liblzma](https://tukaani.org/xz/), another compression library.
|
||||
- [libiconv](https://www.gnu.org/software/libiconv/), a character encoding
|
||||
conversion library. The iconv function is part of POSIX.1-2001, so
|
||||
libiconv isn't required on modern UNIX-like systems like Linux, BSD or
|
||||
macOS.
|
||||
- [ICU](https://icu.unicode.org/), a Unicode library. Mainly useful as an
|
||||
alternative to iconv on Windows. Unnecessary on most other systems.
|
||||
|
||||
## Contributing
|
||||
|
||||
The current version of the code can be found in GNOME's GitLab at
|
||||
at <https://gitlab.gnome.org/GNOME/libxml2>. The best way to get involved
|
||||
is by creating issues and merge requests on GitLab. Alternatively, you can
|
||||
start discussions and send patches to the mailing list. If you want to
|
||||
work with patches, please format them with git-format-patch and use plain
|
||||
text attachments.
|
||||
|
||||
All code must conform to C89 and pass the GitLab CI tests. Add regression
|
||||
tests if possible.
|
||||
|
||||
## Authors
|
||||
|
||||
- Daniel Veillard
|
||||
- Bjorn Reese
|
||||
- William Brack
|
||||
- Igor Zlatkovic for the Windows port
|
||||
- Aleksey Sanin
|
||||
- Nick Wellnhofer
|
||||
|
||||
Vendored
-1
@@ -25,7 +25,6 @@
|
||||
#include <libxml/uri.h>
|
||||
#include <libxml/valid.h>
|
||||
#include <libxml/HTMLtree.h>
|
||||
#include <libxml/globals.h>
|
||||
#include <libxml/SAX2.h>
|
||||
|
||||
#ifdef LIBXML_LEGACY_ENABLED
|
||||
|
||||
Vendored
+183
-340
@@ -13,6 +13,7 @@
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
#include <stddef.h>
|
||||
#include <libxml/SAX2.h>
|
||||
#include <libxml/xmlmemory.h>
|
||||
#include <libxml/tree.h>
|
||||
#include <libxml/parser.h>
|
||||
@@ -22,14 +23,13 @@
|
||||
#include <libxml/xmlerror.h>
|
||||
#include <libxml/debugXML.h>
|
||||
#include <libxml/xmlIO.h>
|
||||
#include <libxml/SAX.h>
|
||||
#include <libxml/uri.h>
|
||||
#include <libxml/valid.h>
|
||||
#include <libxml/HTMLtree.h>
|
||||
#include <libxml/globals.h>
|
||||
|
||||
/* #define DEBUG_SAX2 */
|
||||
/* #define DEBUG_SAX2_TREE */
|
||||
#include "private/error.h"
|
||||
#include "private/parser.h"
|
||||
#include "private/tree.h"
|
||||
|
||||
/**
|
||||
* TODO:
|
||||
@@ -327,11 +327,6 @@ xmlSAX2InternalSubset(void *ctx, const xmlChar *name,
|
||||
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
|
||||
xmlDtdPtr dtd;
|
||||
if (ctx == NULL) return;
|
||||
#ifdef DEBUG_SAX
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"SAX.xmlSAX2InternalSubset(%s, %s, %s)\n",
|
||||
name, ExternalID, SystemID);
|
||||
#endif
|
||||
|
||||
if (ctxt->myDoc == NULL)
|
||||
return;
|
||||
@@ -364,11 +359,6 @@ xmlSAX2ExternalSubset(void *ctx, const xmlChar *name,
|
||||
{
|
||||
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
|
||||
if (ctx == NULL) return;
|
||||
#ifdef DEBUG_SAX
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"SAX.xmlSAX2ExternalSubset(%s, %s, %s)\n",
|
||||
name, ExternalID, SystemID);
|
||||
#endif
|
||||
if (((ExternalID != NULL) || (SystemID != NULL)) &&
|
||||
(((ctxt->validate) || (ctxt->loadsubset != 0)) &&
|
||||
(ctxt->wellFormed && ctxt->myDoc))) {
|
||||
@@ -380,9 +370,10 @@ xmlSAX2ExternalSubset(void *ctx, const xmlChar *name,
|
||||
int oldinputMax;
|
||||
xmlParserInputPtr *oldinputTab;
|
||||
xmlParserInputPtr input = NULL;
|
||||
xmlCharEncoding enc;
|
||||
int oldcharset;
|
||||
const xmlChar *oldencoding;
|
||||
int oldprogressive;
|
||||
unsigned long consumed;
|
||||
size_t buffered;
|
||||
|
||||
/*
|
||||
* Ask the Entity resolver to load the damn thing
|
||||
@@ -403,20 +394,22 @@ xmlSAX2ExternalSubset(void *ctx, const xmlChar *name,
|
||||
oldinputNr = ctxt->inputNr;
|
||||
oldinputMax = ctxt->inputMax;
|
||||
oldinputTab = ctxt->inputTab;
|
||||
oldcharset = ctxt->charset;
|
||||
oldencoding = ctxt->encoding;
|
||||
oldprogressive = ctxt->progressive;
|
||||
ctxt->encoding = NULL;
|
||||
ctxt->progressive = 0;
|
||||
|
||||
ctxt->inputTab = (xmlParserInputPtr *)
|
||||
xmlMalloc(5 * sizeof(xmlParserInputPtr));
|
||||
if (ctxt->inputTab == NULL) {
|
||||
xmlSAX2ErrMemory(ctxt, "xmlSAX2ExternalSubset");
|
||||
xmlFreeInputStream(input);
|
||||
ctxt->input = oldinput;
|
||||
ctxt->inputNr = oldinputNr;
|
||||
ctxt->inputMax = oldinputMax;
|
||||
ctxt->inputTab = oldinputTab;
|
||||
ctxt->charset = oldcharset;
|
||||
ctxt->encoding = oldencoding;
|
||||
ctxt->progressive = oldprogressive;
|
||||
return;
|
||||
}
|
||||
ctxt->inputNr = 0;
|
||||
@@ -424,14 +417,6 @@ xmlSAX2ExternalSubset(void *ctx, const xmlChar *name,
|
||||
ctxt->input = NULL;
|
||||
xmlPushInput(ctxt, input);
|
||||
|
||||
/*
|
||||
* On the fly encoding conversion if needed
|
||||
*/
|
||||
if (ctxt->input->length >= 4) {
|
||||
enc = xmlDetectCharEncoding(ctxt->input->cur, 4);
|
||||
xmlSwitchEncoding(ctxt, enc);
|
||||
}
|
||||
|
||||
if (input->filename == NULL)
|
||||
input->filename = (char *) xmlCanonicPath(SystemID);
|
||||
input->line = 1;
|
||||
@@ -451,6 +436,18 @@ xmlSAX2ExternalSubset(void *ctx, const xmlChar *name,
|
||||
|
||||
while (ctxt->inputNr > 1)
|
||||
xmlPopInput(ctxt);
|
||||
|
||||
consumed = ctxt->input->consumed;
|
||||
buffered = ctxt->input->cur - ctxt->input->base;
|
||||
if (buffered > ULONG_MAX - consumed)
|
||||
consumed = ULONG_MAX;
|
||||
else
|
||||
consumed += buffered;
|
||||
if (consumed > ULONG_MAX - ctxt->sizeentities)
|
||||
ctxt->sizeentities = ULONG_MAX;
|
||||
else
|
||||
ctxt->sizeentities += consumed;
|
||||
|
||||
xmlFreeInputStream(ctxt->input);
|
||||
xmlFree(ctxt->inputTab);
|
||||
|
||||
@@ -461,12 +458,12 @@ xmlSAX2ExternalSubset(void *ctx, const xmlChar *name,
|
||||
ctxt->inputNr = oldinputNr;
|
||||
ctxt->inputMax = oldinputMax;
|
||||
ctxt->inputTab = oldinputTab;
|
||||
ctxt->charset = oldcharset;
|
||||
if ((ctxt->encoding != NULL) &&
|
||||
((ctxt->dict == NULL) ||
|
||||
(!xmlDictOwns(ctxt->dict, ctxt->encoding))))
|
||||
xmlFree((xmlChar *) ctxt->encoding);
|
||||
ctxt->encoding = oldencoding;
|
||||
ctxt->progressive = oldprogressive;
|
||||
/* ctxt->wellFormed = oldwellFormed; */
|
||||
}
|
||||
}
|
||||
@@ -501,11 +498,6 @@ xmlSAX2ResolveEntity(void *ctx, const xmlChar *publicId, const xmlChar *systemId
|
||||
|
||||
URI = xmlBuildURI(systemId, (const xmlChar *) base);
|
||||
|
||||
#ifdef DEBUG_SAX
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"SAX.xmlSAX2ResolveEntity(%s, %s)\n", publicId, systemId);
|
||||
#endif
|
||||
|
||||
ret = xmlLoadExternalEntity((const char *) URI,
|
||||
(const char *) publicId, ctxt);
|
||||
if (URI != NULL)
|
||||
@@ -529,10 +521,6 @@ xmlSAX2GetEntity(void *ctx, const xmlChar *name)
|
||||
xmlEntityPtr ret = NULL;
|
||||
|
||||
if (ctx == NULL) return(NULL);
|
||||
#ifdef DEBUG_SAX
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"SAX.xmlSAX2GetEntity(%s)\n", name);
|
||||
#endif
|
||||
|
||||
if (ctxt->inSubset == 0) {
|
||||
ret = xmlGetPredefinedEntity(name);
|
||||
@@ -579,10 +567,6 @@ xmlSAX2GetParameterEntity(void *ctx, const xmlChar *name)
|
||||
xmlEntityPtr ret;
|
||||
|
||||
if (ctx == NULL) return(NULL);
|
||||
#ifdef DEBUG_SAX
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"SAX.xmlSAX2GetParameterEntity(%s)\n", name);
|
||||
#endif
|
||||
|
||||
ret = xmlGetParameterEntity(ctxt->myDoc, name);
|
||||
return(ret);
|
||||
@@ -608,11 +592,6 @@ xmlSAX2EntityDecl(void *ctx, const xmlChar *name, int type,
|
||||
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
|
||||
|
||||
if (ctx == NULL) return;
|
||||
#ifdef DEBUG_SAX
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"SAX.xmlSAX2EntityDecl(%s, %d, %s, %s, %s)\n",
|
||||
name, type, publicId, systemId, content);
|
||||
#endif
|
||||
if (ctxt->inSubset == 1) {
|
||||
ent = xmlAddDocEntity(ctxt->myDoc, name, type, publicId,
|
||||
systemId, content);
|
||||
@@ -685,11 +664,6 @@ xmlSAX2AttributeDecl(void *ctx, const xmlChar *elem, const xmlChar *fullname,
|
||||
if ((ctxt == NULL) || (ctxt->myDoc == NULL))
|
||||
return;
|
||||
|
||||
#ifdef DEBUG_SAX
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"SAX.xmlSAX2AttributeDecl(%s, %s, %d, %d, %s, ...)\n",
|
||||
elem, fullname, type, def, defaultValue);
|
||||
#endif
|
||||
if ((xmlStrEqual(fullname, BAD_CAST "xml:id")) &&
|
||||
(type != XML_ATTRIBUTE_ID)) {
|
||||
/*
|
||||
@@ -755,11 +729,6 @@ xmlSAX2ElementDecl(void *ctx, const xmlChar * name, int type,
|
||||
if ((ctxt == NULL) || (ctxt->myDoc == NULL))
|
||||
return;
|
||||
|
||||
#ifdef DEBUG_SAX
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"SAX.xmlSAX2ElementDecl(%s, %d, ...)\n", name, type);
|
||||
#endif
|
||||
|
||||
if (ctxt->inSubset == 1)
|
||||
elem = xmlAddElementDecl(&ctxt->vctxt, ctxt->myDoc->intSubset,
|
||||
name, (xmlElementTypeVal) type, content);
|
||||
@@ -804,11 +773,6 @@ xmlSAX2NotationDecl(void *ctx, const xmlChar *name,
|
||||
if ((ctxt == NULL) || (ctxt->myDoc == NULL))
|
||||
return;
|
||||
|
||||
#ifdef DEBUG_SAX
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"SAX.xmlSAX2NotationDecl(%s, %s, %s)\n", name, publicId, systemId);
|
||||
#endif
|
||||
|
||||
if ((publicId == NULL) && (systemId == NULL)) {
|
||||
xmlFatalErrMsg(ctxt, XML_ERR_NOTATION_PROCESSING,
|
||||
"SAX.xmlSAX2NotationDecl(%s) externalID or PublicID missing\n",
|
||||
@@ -853,11 +817,6 @@ xmlSAX2UnparsedEntityDecl(void *ctx, const xmlChar *name,
|
||||
xmlEntityPtr ent;
|
||||
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
|
||||
if (ctx == NULL) return;
|
||||
#ifdef DEBUG_SAX
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"SAX.xmlSAX2UnparsedEntityDecl(%s, %s, %s, %s)\n",
|
||||
name, publicId, systemId, notationName);
|
||||
#endif
|
||||
if (ctxt->inSubset == 1) {
|
||||
ent = xmlAddDocEntity(ctxt->myDoc, name,
|
||||
XML_EXTERNAL_GENERAL_UNPARSED_ENTITY,
|
||||
@@ -916,11 +875,6 @@ xmlSAX2UnparsedEntityDecl(void *ctx, const xmlChar *name,
|
||||
void
|
||||
xmlSAX2SetDocumentLocator(void *ctx ATTRIBUTE_UNUSED, xmlSAXLocatorPtr loc ATTRIBUTE_UNUSED)
|
||||
{
|
||||
/* xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; */
|
||||
#ifdef DEBUG_SAX
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"SAX.xmlSAX2SetDocumentLocator()\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -937,10 +891,6 @@ xmlSAX2StartDocument(void *ctx)
|
||||
|
||||
if (ctx == NULL) return;
|
||||
|
||||
#ifdef DEBUG_SAX
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"SAX.xmlSAX2StartDocument()\n");
|
||||
#endif
|
||||
if (ctxt->html) {
|
||||
#ifdef LIBXML_HTML_ENABLED
|
||||
if (ctxt->myDoc == NULL)
|
||||
@@ -966,10 +916,6 @@ xmlSAX2StartDocument(void *ctx)
|
||||
if (ctxt->options & XML_PARSE_OLD10)
|
||||
doc->properties |= XML_DOC_OLD10;
|
||||
doc->parseFlags = ctxt->options;
|
||||
if (ctxt->encoding != NULL)
|
||||
doc->encoding = xmlStrdup(ctxt->encoding);
|
||||
else
|
||||
doc->encoding = NULL;
|
||||
doc->standalone = ctxt->standalone;
|
||||
} else {
|
||||
xmlSAX2ErrMemory(ctxt, "xmlSAX2StartDocument");
|
||||
@@ -998,10 +944,8 @@ void
|
||||
xmlSAX2EndDocument(void *ctx)
|
||||
{
|
||||
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
|
||||
#ifdef DEBUG_SAX
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"SAX.xmlSAX2EndDocument()\n");
|
||||
#endif
|
||||
xmlDocPtr doc;
|
||||
|
||||
if (ctx == NULL) return;
|
||||
#ifdef LIBXML_VALID_ENABLED
|
||||
if (ctxt->validate && ctxt->wellFormed &&
|
||||
@@ -1009,23 +953,15 @@ xmlSAX2EndDocument(void *ctx)
|
||||
ctxt->valid &= xmlValidateDocumentFinal(&ctxt->vctxt, ctxt->myDoc);
|
||||
#endif /* LIBXML_VALID_ENABLED */
|
||||
|
||||
/*
|
||||
* Grab the encoding if it was added on-the-fly
|
||||
*/
|
||||
if ((ctxt->encoding != NULL) && (ctxt->myDoc != NULL) &&
|
||||
(ctxt->myDoc->encoding == NULL)) {
|
||||
ctxt->myDoc->encoding = ctxt->encoding;
|
||||
ctxt->encoding = NULL;
|
||||
}
|
||||
if ((ctxt->inputTab != NULL) &&
|
||||
(ctxt->inputNr > 0) && (ctxt->inputTab[0] != NULL) &&
|
||||
(ctxt->inputTab[0]->encoding != NULL) && (ctxt->myDoc != NULL) &&
|
||||
(ctxt->myDoc->encoding == NULL)) {
|
||||
ctxt->myDoc->encoding = xmlStrdup(ctxt->inputTab[0]->encoding);
|
||||
}
|
||||
if ((ctxt->charset != XML_CHAR_ENCODING_NONE) && (ctxt->myDoc != NULL) &&
|
||||
(ctxt->myDoc->charset == XML_CHAR_ENCODING_NONE)) {
|
||||
ctxt->myDoc->charset = ctxt->charset;
|
||||
doc = ctxt->myDoc;
|
||||
if ((doc != NULL) && (doc->encoding == NULL)) {
|
||||
const xmlChar *encoding = xmlGetActualEncoding(ctxt);
|
||||
|
||||
if (encoding != NULL) {
|
||||
doc->encoding = xmlStrdup(encoding);
|
||||
if (doc->encoding == NULL)
|
||||
xmlSAX2ErrMemory(ctxt, "xmlSAX2EndDocument");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1311,25 +1247,25 @@ xmlSAX2AttributeInternal(void *ctx, const xmlChar *fullname,
|
||||
|
||||
/* !!!!!! <a toto:arg="" xmlns:toto="http://toto.com"> */
|
||||
ret = xmlNewNsPropEatName(ctxt->node, namespace, name, NULL);
|
||||
if (ret == NULL)
|
||||
goto error;
|
||||
|
||||
if (ret != NULL) {
|
||||
if ((ctxt->replaceEntities == 0) && (!ctxt->html)) {
|
||||
xmlNodePtr tmp;
|
||||
if ((ctxt->replaceEntities == 0) && (!ctxt->html)) {
|
||||
xmlNodePtr tmp;
|
||||
|
||||
ret->children = xmlStringGetNodeList(ctxt->myDoc, value);
|
||||
tmp = ret->children;
|
||||
while (tmp != NULL) {
|
||||
tmp->parent = (xmlNodePtr) ret;
|
||||
if (tmp->next == NULL)
|
||||
ret->last = tmp;
|
||||
tmp = tmp->next;
|
||||
}
|
||||
} else if (value != NULL) {
|
||||
ret->children = xmlNewDocText(ctxt->myDoc, value);
|
||||
ret->last = ret->children;
|
||||
if (ret->children != NULL)
|
||||
ret->children->parent = (xmlNodePtr) ret;
|
||||
}
|
||||
ret->children = xmlStringGetNodeList(ctxt->myDoc, value);
|
||||
tmp = ret->children;
|
||||
while (tmp != NULL) {
|
||||
tmp->parent = (xmlNodePtr) ret;
|
||||
if (tmp->next == NULL)
|
||||
ret->last = tmp;
|
||||
tmp = tmp->next;
|
||||
}
|
||||
} else if (value != NULL) {
|
||||
ret->children = xmlNewDocText(ctxt->myDoc, value);
|
||||
ret->last = ret->children;
|
||||
if (ret->children != NULL)
|
||||
ret->children->parent = (xmlNodePtr) ret;
|
||||
}
|
||||
|
||||
#ifdef LIBXML_VALID_ENABLED
|
||||
@@ -1588,11 +1524,6 @@ xmlSAX2StartElement(void *ctx, const xmlChar *fullname, const xmlChar **atts)
|
||||
int i;
|
||||
|
||||
if ((ctx == NULL) || (fullname == NULL) || (ctxt->myDoc == NULL)) return;
|
||||
parent = ctxt->node;
|
||||
#ifdef DEBUG_SAX
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"SAX.xmlSAX2StartElement(%s)\n", fullname);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* First check on validity:
|
||||
@@ -1608,12 +1539,15 @@ xmlSAX2StartElement(void *ctx, const xmlChar *fullname, const xmlChar **atts)
|
||||
ctxt->validate = 0;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Split the full name into a namespace prefix and the tag name
|
||||
*/
|
||||
name = xmlSplitQName(ctxt, fullname, &prefix);
|
||||
|
||||
if (ctxt->html) {
|
||||
prefix = NULL;
|
||||
name = xmlStrdup(fullname);
|
||||
} else {
|
||||
/*
|
||||
* Split the full name into a namespace prefix and the tag name
|
||||
*/
|
||||
name = xmlSplitQName(ctxt, fullname, &prefix);
|
||||
}
|
||||
|
||||
/*
|
||||
* Note : the namespace resolution is deferred until the end of the
|
||||
@@ -1627,30 +1561,24 @@ xmlSAX2StartElement(void *ctx, const xmlChar *fullname, const xmlChar **atts)
|
||||
xmlSAX2ErrMemory(ctxt, "xmlSAX2StartElement");
|
||||
return;
|
||||
}
|
||||
if (ctxt->myDoc->children == NULL) {
|
||||
#ifdef DEBUG_SAX_TREE
|
||||
xmlGenericError(xmlGenericErrorContext, "Setting %s as root\n", name);
|
||||
#endif
|
||||
xmlAddChild((xmlNodePtr) ctxt->myDoc, (xmlNodePtr) ret);
|
||||
} else if (parent == NULL) {
|
||||
parent = ctxt->myDoc->children;
|
||||
}
|
||||
ctxt->nodemem = -1;
|
||||
if (ctxt->linenumbers) {
|
||||
if (ctxt->input != NULL) {
|
||||
if (ctxt->input->line < USHRT_MAX)
|
||||
ret->line = (unsigned short) ctxt->input->line;
|
||||
if ((unsigned) ctxt->input->line < (unsigned) USHRT_MAX)
|
||||
ret->line = ctxt->input->line;
|
||||
else
|
||||
ret->line = USHRT_MAX;
|
||||
}
|
||||
}
|
||||
|
||||
/* Initialize parent before pushing node */
|
||||
parent = ctxt->node;
|
||||
if (parent == NULL)
|
||||
parent = (xmlNodePtr) ctxt->myDoc;
|
||||
|
||||
/*
|
||||
* We are parsing a new node.
|
||||
*/
|
||||
#ifdef DEBUG_SAX_TREE
|
||||
xmlGenericError(xmlGenericErrorContext, "pushing(%s)\n", name);
|
||||
#endif
|
||||
if (nodePush(ctxt, ret) < 0) {
|
||||
xmlUnlinkNode(ret);
|
||||
xmlFreeNode(ret);
|
||||
@@ -1662,22 +1590,7 @@ xmlSAX2StartElement(void *ctx, const xmlChar *fullname, const xmlChar **atts)
|
||||
/*
|
||||
* Link the child element
|
||||
*/
|
||||
if (parent != NULL) {
|
||||
if (parent->type == XML_ELEMENT_NODE) {
|
||||
#ifdef DEBUG_SAX_TREE
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"adding child %s to %s\n", name, parent->name);
|
||||
#endif
|
||||
xmlAddChild(parent, ret);
|
||||
} else {
|
||||
#ifdef DEBUG_SAX_TREE
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"adding sibling %s to ", name);
|
||||
xmlDebugDumpOneNode(stderr, parent, 0);
|
||||
#endif
|
||||
xmlAddSibling(parent, ret);
|
||||
}
|
||||
}
|
||||
xmlAddChild(parent, ret);
|
||||
|
||||
if (!ctxt->html) {
|
||||
/*
|
||||
@@ -1792,40 +1705,22 @@ void
|
||||
xmlSAX2EndElement(void *ctx, const xmlChar *name ATTRIBUTE_UNUSED)
|
||||
{
|
||||
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
|
||||
xmlNodePtr cur;
|
||||
|
||||
if (ctx == NULL) return;
|
||||
cur = ctxt->node;
|
||||
#ifdef DEBUG_SAX
|
||||
if (name == NULL)
|
||||
xmlGenericError(xmlGenericErrorContext, "SAX.xmlSAX2EndElement(NULL)\n");
|
||||
else
|
||||
xmlGenericError(xmlGenericErrorContext, "SAX.xmlSAX2EndElement(%s)\n", name);
|
||||
#endif
|
||||
|
||||
/* Capture end position and add node */
|
||||
if (cur != NULL && ctxt->record_info) {
|
||||
ctxt->nodeInfo->end_pos = ctxt->input->cur - ctxt->input->base;
|
||||
ctxt->nodeInfo->end_line = ctxt->input->line;
|
||||
ctxt->nodeInfo->node = cur;
|
||||
xmlParserAddNodeInfo(ctxt, ctxt->nodeInfo);
|
||||
}
|
||||
ctxt->nodemem = -1;
|
||||
|
||||
#ifdef LIBXML_VALID_ENABLED
|
||||
if (ctxt->validate && ctxt->wellFormed &&
|
||||
ctxt->myDoc && ctxt->myDoc->intSubset)
|
||||
ctxt->valid &= xmlValidateOneElement(&ctxt->vctxt, ctxt->myDoc,
|
||||
cur);
|
||||
ctxt->node);
|
||||
#endif /* LIBXML_VALID_ENABLED */
|
||||
|
||||
|
||||
/*
|
||||
* end of parsing of this node.
|
||||
*/
|
||||
#ifdef DEBUG_SAX_TREE
|
||||
xmlGenericError(xmlGenericErrorContext, "popping(%s)\n", cur->name);
|
||||
#endif
|
||||
nodePop(ctxt);
|
||||
}
|
||||
#endif /* LIBXML_SAX1_ENABLED || LIBXML_HTML_ENABLED || LIBXML_LEGACY_ENABLED */
|
||||
@@ -1901,18 +1796,6 @@ skip:
|
||||
} else
|
||||
ret->content = (xmlChar *) intern;
|
||||
|
||||
if (ctxt->linenumbers) {
|
||||
if (ctxt->input != NULL) {
|
||||
if (ctxt->input->line < USHRT_MAX)
|
||||
ret->line = (unsigned short) ctxt->input->line;
|
||||
else {
|
||||
ret->line = USHRT_MAX;
|
||||
if (ctxt->options & XML_PARSE_BIG_LINES)
|
||||
ret->psvi = (void *) (ptrdiff_t) ctxt->input->line;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ((__xmlRegisterCallbacks) && (xmlRegisterNodeDefaultValue))
|
||||
xmlRegisterNodeDefaultValue(ret);
|
||||
return(ret);
|
||||
@@ -1962,8 +1845,10 @@ decode:
|
||||
* The default handling is to convert the attribute into an
|
||||
* DOM subtree and past it in a new xmlAttr element added to
|
||||
* the element.
|
||||
*
|
||||
* Returns the new attribute or NULL in case of error.
|
||||
*/
|
||||
static void
|
||||
static xmlAttrPtr
|
||||
xmlSAX2AttributeNs(xmlParserCtxtPtr ctxt,
|
||||
const xmlChar * localname,
|
||||
const xmlChar * prefix,
|
||||
@@ -1977,8 +1862,12 @@ xmlSAX2AttributeNs(xmlParserCtxtPtr ctxt,
|
||||
/*
|
||||
* Note: if prefix == NULL, the attribute is not in the default namespace
|
||||
*/
|
||||
if (prefix != NULL)
|
||||
namespace = xmlSearchNs(ctxt->myDoc, ctxt->node, prefix);
|
||||
if (prefix != NULL) {
|
||||
namespace = xmlParserNsLookupSax(ctxt, prefix);
|
||||
if ((namespace == NULL) && (xmlStrEqual(prefix, BAD_CAST "xml"))) {
|
||||
namespace = xmlSearchNs(ctxt->myDoc, ctxt->node, prefix);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* allocate the node
|
||||
@@ -1987,43 +1876,38 @@ xmlSAX2AttributeNs(xmlParserCtxtPtr ctxt,
|
||||
ret = ctxt->freeAttrs;
|
||||
ctxt->freeAttrs = ret->next;
|
||||
ctxt->freeAttrsNr--;
|
||||
memset(ret, 0, sizeof(xmlAttr));
|
||||
ret->type = XML_ATTRIBUTE_NODE;
|
||||
|
||||
ret->parent = ctxt->node;
|
||||
ret->doc = ctxt->myDoc;
|
||||
ret->ns = namespace;
|
||||
|
||||
if (ctxt->dictNames)
|
||||
ret->name = localname;
|
||||
else
|
||||
ret->name = xmlStrdup(localname);
|
||||
|
||||
/* link at the end to preserve order, TODO speed up with a last */
|
||||
if (ctxt->node->properties == NULL) {
|
||||
ctxt->node->properties = ret;
|
||||
} else {
|
||||
xmlAttrPtr prev = ctxt->node->properties;
|
||||
|
||||
while (prev->next != NULL) prev = prev->next;
|
||||
prev->next = ret;
|
||||
ret->prev = prev;
|
||||
}
|
||||
|
||||
if ((__xmlRegisterCallbacks) && (xmlRegisterNodeDefaultValue))
|
||||
xmlRegisterNodeDefaultValue((xmlNodePtr)ret);
|
||||
} else {
|
||||
if (ctxt->dictNames)
|
||||
ret = xmlNewNsPropEatName(ctxt->node, namespace,
|
||||
(xmlChar *) localname, NULL);
|
||||
else
|
||||
ret = xmlNewNsProp(ctxt->node, namespace, localname, NULL);
|
||||
if (ret == NULL) {
|
||||
xmlErrMemory(ctxt, "xmlSAX2AttributeNs");
|
||||
return;
|
||||
}
|
||||
ret = xmlMalloc(sizeof(*ret));
|
||||
if (ret == NULL) {
|
||||
xmlSAX2ErrMemory(ctxt, NULL);
|
||||
return(NULL);
|
||||
}
|
||||
}
|
||||
|
||||
memset(ret, 0, sizeof(xmlAttr));
|
||||
ret->type = XML_ATTRIBUTE_NODE;
|
||||
|
||||
/*
|
||||
* xmlParseBalancedChunkMemoryRecover had a bug that could result in
|
||||
* a mismatch between ctxt->node->doc and ctxt->myDoc. We use
|
||||
* ctxt->node->doc here, but we should somehow make sure that the
|
||||
* document pointers match.
|
||||
*/
|
||||
|
||||
/* assert(ctxt->node->doc == ctxt->myDoc); */
|
||||
|
||||
ret->parent = ctxt->node;
|
||||
ret->doc = ctxt->node->doc;
|
||||
ret->ns = namespace;
|
||||
|
||||
if (ctxt->dictNames)
|
||||
ret->name = localname;
|
||||
else
|
||||
ret->name = xmlStrdup(localname);
|
||||
|
||||
if ((__xmlRegisterCallbacks) && (xmlRegisterNodeDefaultValue))
|
||||
xmlRegisterNodeDefaultValue((xmlNodePtr)ret);
|
||||
|
||||
if ((ctxt->replaceEntities == 0) && (!ctxt->html)) {
|
||||
xmlNodePtr tmp;
|
||||
|
||||
@@ -2154,15 +2038,11 @@ xmlSAX2AttributeNs(xmlParserCtxtPtr ctxt,
|
||||
*
|
||||
* Open issue: normalization of the value.
|
||||
*/
|
||||
#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_LEGACY_ENABLED)
|
||||
#ifdef LIBXML_VALID_ENABLED
|
||||
if (xmlValidateNCName(content, 1) != 0) {
|
||||
xmlErrValid(ctxt, XML_DTD_XMLID_VALUE,
|
||||
"xml:id : attribute value %s is not an NCName\n",
|
||||
(const char *) content, NULL);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
xmlAddID(&ctxt->vctxt, ctxt->myDoc, content, ret);
|
||||
} else if (xmlIsID(ctxt->myDoc, ctxt->node, ret)) {
|
||||
xmlAddID(&ctxt->vctxt, ctxt->myDoc, content, ret);
|
||||
@@ -2172,6 +2052,8 @@ xmlSAX2AttributeNs(xmlParserCtxtPtr ctxt,
|
||||
}
|
||||
if (dup != NULL)
|
||||
xmlFree(dup);
|
||||
|
||||
return(ret);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2211,7 +2093,6 @@ xmlSAX2StartElementNs(void *ctx,
|
||||
int i, j;
|
||||
|
||||
if (ctx == NULL) return;
|
||||
parent = ctxt->node;
|
||||
/*
|
||||
* First check on validity:
|
||||
*/
|
||||
@@ -2260,6 +2141,7 @@ xmlSAX2StartElementNs(void *ctx,
|
||||
ret->name = lname;
|
||||
if (ret->name == NULL) {
|
||||
xmlSAX2ErrMemory(ctxt, "xmlSAX2StartElementNs");
|
||||
xmlFree(ret);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -2281,16 +2163,13 @@ xmlSAX2StartElementNs(void *ctx,
|
||||
}
|
||||
if (ctxt->linenumbers) {
|
||||
if (ctxt->input != NULL) {
|
||||
if (ctxt->input->line < USHRT_MAX)
|
||||
ret->line = (unsigned short) ctxt->input->line;
|
||||
if ((unsigned) ctxt->input->line < (unsigned) USHRT_MAX)
|
||||
ret->line = ctxt->input->line;
|
||||
else
|
||||
ret->line = USHRT_MAX;
|
||||
}
|
||||
}
|
||||
|
||||
if (parent == NULL) {
|
||||
xmlAddChild((xmlNodePtr) ctxt->myDoc, (xmlNodePtr) ret);
|
||||
}
|
||||
/*
|
||||
* Build the namespace list
|
||||
*/
|
||||
@@ -2315,6 +2194,9 @@ xmlSAX2StartElementNs(void *ctx,
|
||||
*/
|
||||
continue;
|
||||
}
|
||||
|
||||
xmlParserNsUpdateSax(ctxt, pref, ns);
|
||||
|
||||
#ifdef LIBXML_VALID_ENABLED
|
||||
if ((!ctxt->html) && ctxt->validate && ctxt->wellFormed &&
|
||||
ctxt->myDoc && ctxt->myDoc->intSubset) {
|
||||
@@ -2325,6 +2207,11 @@ xmlSAX2StartElementNs(void *ctx,
|
||||
}
|
||||
ctxt->nodemem = -1;
|
||||
|
||||
/* Initialize parent before pushing node */
|
||||
parent = ctxt->node;
|
||||
if (parent == NULL)
|
||||
parent = (xmlNodePtr) ctxt->myDoc;
|
||||
|
||||
/*
|
||||
* We are parsing a new node.
|
||||
*/
|
||||
@@ -2337,13 +2224,7 @@ xmlSAX2StartElementNs(void *ctx,
|
||||
/*
|
||||
* Link the child element
|
||||
*/
|
||||
if (parent != NULL) {
|
||||
if (parent->type == XML_ELEMENT_NODE) {
|
||||
xmlAddChild(parent, ret);
|
||||
} else {
|
||||
xmlAddSibling(parent, ret);
|
||||
}
|
||||
}
|
||||
xmlAddChild(parent, ret);
|
||||
|
||||
/*
|
||||
* Insert the defaulted attributes from the DTD only if requested:
|
||||
@@ -2357,7 +2238,7 @@ xmlSAX2StartElementNs(void *ctx,
|
||||
* Note that, if prefix is NULL, this searches for the default Ns
|
||||
*/
|
||||
if ((URI != NULL) && (ret->ns == NULL)) {
|
||||
ret->ns = xmlSearchNs(ctxt->myDoc, parent, prefix);
|
||||
ret->ns = xmlParserNsLookupSax(ctxt, prefix);
|
||||
if ((ret->ns == NULL) && (xmlStrEqual(prefix, BAD_CAST "xml"))) {
|
||||
ret->ns = xmlSearchNs(ctxt->myDoc, ret, prefix);
|
||||
}
|
||||
@@ -2383,7 +2264,11 @@ xmlSAX2StartElementNs(void *ctx,
|
||||
* process all the other attributes
|
||||
*/
|
||||
if (nb_attributes > 0) {
|
||||
xmlAttrPtr prev = NULL;
|
||||
|
||||
for (j = 0,i = 0;i < nb_attributes;i++,j+=5) {
|
||||
xmlAttrPtr attr = NULL;
|
||||
|
||||
/*
|
||||
* Handle the rare case of an undefined attribute prefix
|
||||
*/
|
||||
@@ -2394,23 +2279,38 @@ xmlSAX2StartElementNs(void *ctx,
|
||||
fullname = xmlDictQLookup(ctxt->dict, attributes[j+1],
|
||||
attributes[j]);
|
||||
if (fullname != NULL) {
|
||||
xmlSAX2AttributeNs(ctxt, fullname, NULL,
|
||||
attributes[j+3], attributes[j+4]);
|
||||
continue;
|
||||
attr = xmlSAX2AttributeNs(ctxt, fullname, NULL,
|
||||
attributes[j+3],
|
||||
attributes[j+4]);
|
||||
goto have_attr;
|
||||
}
|
||||
} else {
|
||||
lname = xmlBuildQName(attributes[j], attributes[j+1],
|
||||
NULL, 0);
|
||||
if (lname != NULL) {
|
||||
xmlSAX2AttributeNs(ctxt, lname, NULL,
|
||||
attributes[j+3], attributes[j+4]);
|
||||
attr = xmlSAX2AttributeNs(ctxt, lname, NULL,
|
||||
attributes[j+3],
|
||||
attributes[j+4]);
|
||||
xmlFree(lname);
|
||||
continue;
|
||||
goto have_attr;
|
||||
}
|
||||
}
|
||||
}
|
||||
xmlSAX2AttributeNs(ctxt, attributes[j], attributes[j+1],
|
||||
attributes[j+3], attributes[j+4]);
|
||||
attr = xmlSAX2AttributeNs(ctxt, attributes[j], attributes[j+1],
|
||||
attributes[j+3], attributes[j+4]);
|
||||
have_attr:
|
||||
if (attr == NULL)
|
||||
continue;
|
||||
|
||||
/* link at the end to preserve order */
|
||||
if (prev == NULL) {
|
||||
ctxt->node->properties = attr;
|
||||
} else {
|
||||
prev->next = attr;
|
||||
attr->prev = prev;
|
||||
}
|
||||
|
||||
prev = attr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2451,24 +2351,15 @@ xmlSAX2EndElementNs(void *ctx,
|
||||
const xmlChar * URI ATTRIBUTE_UNUSED)
|
||||
{
|
||||
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
|
||||
xmlParserNodeInfo node_info;
|
||||
xmlNodePtr cur;
|
||||
|
||||
if (ctx == NULL) return;
|
||||
cur = ctxt->node;
|
||||
/* Capture end position and add node */
|
||||
if ((ctxt->record_info) && (cur != NULL)) {
|
||||
node_info.end_pos = ctxt->input->cur - ctxt->input->base;
|
||||
node_info.end_line = ctxt->input->line;
|
||||
node_info.node = cur;
|
||||
xmlParserAddNodeInfo(ctxt, &node_info);
|
||||
}
|
||||
ctxt->nodemem = -1;
|
||||
|
||||
#ifdef LIBXML_VALID_ENABLED
|
||||
if (ctxt->validate && ctxt->wellFormed &&
|
||||
ctxt->myDoc && ctxt->myDoc->intSubset)
|
||||
ctxt->valid &= xmlValidateOneElement(&ctxt->vctxt, ctxt->myDoc, cur);
|
||||
ctxt->valid &= xmlValidateOneElement(&ctxt->vctxt, ctxt->myDoc,
|
||||
ctxt->node);
|
||||
#endif /* LIBXML_VALID_ENABLED */
|
||||
|
||||
/*
|
||||
@@ -2491,18 +2382,7 @@ xmlSAX2Reference(void *ctx, const xmlChar *name)
|
||||
xmlNodePtr ret;
|
||||
|
||||
if (ctx == NULL) return;
|
||||
#ifdef DEBUG_SAX
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"SAX.xmlSAX2Reference(%s)\n", name);
|
||||
#endif
|
||||
if (name[0] == '#')
|
||||
ret = xmlNewCharRef(ctxt->myDoc, name);
|
||||
else
|
||||
ret = xmlNewReference(ctxt->myDoc, name);
|
||||
#ifdef DEBUG_SAX_TREE
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"add xmlSAX2Reference %s to %s \n", name, ctxt->node->name);
|
||||
#endif
|
||||
ret = xmlNewReference(ctxt->myDoc, name);
|
||||
if (xmlAddChild(ctxt->node, ret) == NULL) {
|
||||
xmlFreeNode(ret);
|
||||
}
|
||||
@@ -2524,10 +2404,6 @@ xmlSAX2Text(xmlParserCtxtPtr ctxt, const xmlChar *ch, int len,
|
||||
xmlNodePtr lastChild;
|
||||
|
||||
if (ctxt == NULL) return;
|
||||
#ifdef DEBUG_SAX
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"SAX.xmlSAX2Characters(%.30s, %d)\n", ch, len);
|
||||
#endif
|
||||
/*
|
||||
* Handle the data if any. If there is no child
|
||||
* add it as content, otherwise if the last child is text,
|
||||
@@ -2535,17 +2411,9 @@ xmlSAX2Text(xmlParserCtxtPtr ctxt, const xmlChar *ch, int len,
|
||||
*/
|
||||
|
||||
if (ctxt->node == NULL) {
|
||||
#ifdef DEBUG_SAX_TREE
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"add chars: ctxt->node == NULL !\n");
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
lastChild = ctxt->node->last;
|
||||
#ifdef DEBUG_SAX_TREE
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"add chars to %s \n", ctxt->node->name);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Here we needed an accelerator mechanism in case of very large
|
||||
@@ -2631,7 +2499,8 @@ xmlSAX2Text(xmlParserCtxtPtr ctxt, const xmlChar *ch, int len,
|
||||
/* Mixed content, first time */
|
||||
if (type == XML_TEXT_NODE) {
|
||||
lastChild = xmlSAX2TextNode(ctxt, ch, len);
|
||||
lastChild->doc = ctxt->myDoc;
|
||||
if (lastChild != NULL)
|
||||
lastChild->doc = ctxt->myDoc;
|
||||
} else
|
||||
lastChild = xmlNewCDataBlock(ctxt->myDoc, ch, len);
|
||||
if (lastChild != NULL) {
|
||||
@@ -2643,6 +2512,19 @@ xmlSAX2Text(xmlParserCtxtPtr ctxt, const xmlChar *ch, int len,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ((lastChild != NULL) &&
|
||||
(type == XML_TEXT_NODE) &&
|
||||
(ctxt->linenumbers) &&
|
||||
(ctxt->input != NULL)) {
|
||||
if ((unsigned) ctxt->input->line < (unsigned) USHRT_MAX)
|
||||
lastChild->line = ctxt->input->line;
|
||||
else {
|
||||
lastChild->line = USHRT_MAX;
|
||||
if (ctxt->options & XML_PARSE_BIG_LINES)
|
||||
lastChild->psvi = (void *) (ptrdiff_t) ctxt->input->line;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2671,11 +2553,6 @@ xmlSAX2Characters(void *ctx, const xmlChar *ch, int len)
|
||||
void
|
||||
xmlSAX2IgnorableWhitespace(void *ctx ATTRIBUTE_UNUSED, const xmlChar *ch ATTRIBUTE_UNUSED, int len ATTRIBUTE_UNUSED)
|
||||
{
|
||||
/* xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; */
|
||||
#ifdef DEBUG_SAX
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"SAX.xmlSAX2IgnorableWhitespace(%.30s, %d)\n", ch, len);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2696,18 +2573,14 @@ xmlSAX2ProcessingInstruction(void *ctx, const xmlChar *target,
|
||||
|
||||
if (ctx == NULL) return;
|
||||
parent = ctxt->node;
|
||||
#ifdef DEBUG_SAX
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"SAX.xmlSAX2ProcessingInstruction(%s, %s)\n", target, data);
|
||||
#endif
|
||||
|
||||
ret = xmlNewDocPI(ctxt->myDoc, target, data);
|
||||
if (ret == NULL) return;
|
||||
|
||||
if (ctxt->linenumbers) {
|
||||
if (ctxt->input != NULL) {
|
||||
if (ctxt->input->line < USHRT_MAX)
|
||||
ret->line = (unsigned short) ctxt->input->line;
|
||||
if ((unsigned) ctxt->input->line < (unsigned) USHRT_MAX)
|
||||
ret->line = ctxt->input->line;
|
||||
else
|
||||
ret->line = USHRT_MAX;
|
||||
}
|
||||
@@ -2720,25 +2593,12 @@ xmlSAX2ProcessingInstruction(void *ctx, const xmlChar *target,
|
||||
return;
|
||||
}
|
||||
if (parent == NULL) {
|
||||
#ifdef DEBUG_SAX_TREE
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"Setting PI %s as root\n", target);
|
||||
#endif
|
||||
xmlAddChild((xmlNodePtr) ctxt->myDoc, (xmlNodePtr) ret);
|
||||
return;
|
||||
}
|
||||
if (parent->type == XML_ELEMENT_NODE) {
|
||||
#ifdef DEBUG_SAX_TREE
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"adding PI %s child to %s\n", target, parent->name);
|
||||
#endif
|
||||
xmlAddChild(parent, ret);
|
||||
} else {
|
||||
#ifdef DEBUG_SAX_TREE
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"adding PI %s sibling to ", target);
|
||||
xmlDebugDumpOneNode(stderr, parent, 0);
|
||||
#endif
|
||||
xmlAddSibling(parent, ret);
|
||||
}
|
||||
}
|
||||
@@ -2759,15 +2619,12 @@ xmlSAX2Comment(void *ctx, const xmlChar *value)
|
||||
|
||||
if (ctx == NULL) return;
|
||||
parent = ctxt->node;
|
||||
#ifdef DEBUG_SAX
|
||||
xmlGenericError(xmlGenericErrorContext, "SAX.xmlSAX2Comment(%s)\n", value);
|
||||
#endif
|
||||
ret = xmlNewDocComment(ctxt->myDoc, value);
|
||||
if (ret == NULL) return;
|
||||
if (ctxt->linenumbers) {
|
||||
if (ctxt->input != NULL) {
|
||||
if (ctxt->input->line < USHRT_MAX)
|
||||
ret->line = (unsigned short) ctxt->input->line;
|
||||
if ((unsigned) ctxt->input->line < (unsigned) USHRT_MAX)
|
||||
ret->line = ctxt->input->line;
|
||||
else
|
||||
ret->line = USHRT_MAX;
|
||||
}
|
||||
@@ -2781,25 +2638,12 @@ xmlSAX2Comment(void *ctx, const xmlChar *value)
|
||||
return;
|
||||
}
|
||||
if (parent == NULL) {
|
||||
#ifdef DEBUG_SAX_TREE
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"Setting xmlSAX2Comment as root\n");
|
||||
#endif
|
||||
xmlAddChild((xmlNodePtr) ctxt->myDoc, (xmlNodePtr) ret);
|
||||
return;
|
||||
}
|
||||
if (parent->type == XML_ELEMENT_NODE) {
|
||||
#ifdef DEBUG_SAX_TREE
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"adding xmlSAX2Comment child to %s\n", parent->name);
|
||||
#endif
|
||||
xmlAddChild(parent, ret);
|
||||
} else {
|
||||
#ifdef DEBUG_SAX_TREE
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"adding xmlSAX2Comment sibling to ");
|
||||
xmlDebugDumpOneNode(stderr, parent, 0);
|
||||
#endif
|
||||
xmlAddSibling(parent, ret);
|
||||
}
|
||||
}
|
||||
@@ -2825,6 +2669,8 @@ static int xmlSAX2DefaultVersionValue = 2;
|
||||
* xmlSAXDefaultVersion:
|
||||
* @version: the version, 1 or 2
|
||||
*
|
||||
* DEPRECATED: Use parser option XML_PARSE_SAX1.
|
||||
*
|
||||
* Set the default version of SAX used globally by the library.
|
||||
* By default, during initialization the default is set to 2.
|
||||
* Note that it is generally a better coding style to use
|
||||
@@ -2859,20 +2705,23 @@ xmlSAXVersion(xmlSAXHandler *hdlr, int version)
|
||||
{
|
||||
if (hdlr == NULL) return(-1);
|
||||
if (version == 2) {
|
||||
hdlr->startElement = NULL;
|
||||
hdlr->endElement = NULL;
|
||||
hdlr->startElementNs = xmlSAX2StartElementNs;
|
||||
hdlr->endElementNs = xmlSAX2EndElementNs;
|
||||
hdlr->serror = NULL;
|
||||
hdlr->initialized = XML_SAX2_MAGIC;
|
||||
#ifdef LIBXML_SAX1_ENABLED
|
||||
} else if (version == 1) {
|
||||
hdlr->startElement = xmlSAX2StartElement;
|
||||
hdlr->endElement = xmlSAX2EndElement;
|
||||
hdlr->initialized = 1;
|
||||
#endif /* LIBXML_SAX1_ENABLED */
|
||||
} else
|
||||
return(-1);
|
||||
#ifdef LIBXML_SAX1_ENABLED
|
||||
hdlr->startElement = xmlSAX2StartElement;
|
||||
hdlr->endElement = xmlSAX2EndElement;
|
||||
#else
|
||||
hdlr->startElement = NULL;
|
||||
hdlr->endElement = NULL;
|
||||
#endif /* LIBXML_SAX1_ENABLED */
|
||||
hdlr->internalSubset = xmlSAX2InternalSubset;
|
||||
hdlr->externalSubset = xmlSAX2ExternalSubset;
|
||||
hdlr->isStandalone = xmlSAX2IsStandalone;
|
||||
@@ -2925,7 +2774,7 @@ xmlSAX2InitDefaultSAXHandler(xmlSAXHandler *hdlr, int warning)
|
||||
/**
|
||||
* xmlDefaultSAXHandlerInit:
|
||||
*
|
||||
* DEPRECATED: This function will be made private. Call xmlInitParser to
|
||||
* DEPRECATED: This function is a no-op. Call xmlInitParser to
|
||||
* initialize the library.
|
||||
*
|
||||
* Initialize the default SAX2 handler
|
||||
@@ -2933,9 +2782,6 @@ xmlSAX2InitDefaultSAXHandler(xmlSAXHandler *hdlr, int warning)
|
||||
void
|
||||
xmlDefaultSAXHandlerInit(void)
|
||||
{
|
||||
#ifdef LIBXML_SAX1_ENABLED
|
||||
xmlSAXVersion((xmlSAXHandlerPtr) &xmlDefaultSAXHandler, 1);
|
||||
#endif /* LIBXML_SAX1_ENABLED */
|
||||
}
|
||||
|
||||
#ifdef LIBXML_HTML_ENABLED
|
||||
@@ -2986,15 +2832,12 @@ xmlSAX2InitHtmlDefaultSAXHandler(xmlSAXHandler *hdlr)
|
||||
/**
|
||||
* htmlDefaultSAXHandlerInit:
|
||||
*
|
||||
* DEPRECATED: This function will be made private. Call xmlInitParser to
|
||||
* DEPRECATED: This function is a no-op. Call xmlInitParser to
|
||||
* initialize the library.
|
||||
*
|
||||
* Initialize the default SAX handler
|
||||
*/
|
||||
void
|
||||
htmlDefaultSAXHandlerInit(void)
|
||||
{
|
||||
xmlSAX2InitHtmlDefaultSAXHandler((xmlSAXHandlerPtr) &htmlDefaultSAXHandler);
|
||||
}
|
||||
|
||||
#endif /* LIBXML_HTML_ENABLED */
|
||||
|
||||
Vendored
-276
@@ -1,276 +0,0 @@
|
||||
124907 HTML parse buffer problem when parsing larse in-memory docs
|
||||
124110 DTD validation && wrong namespace
|
||||
123564 xmllint --html --format
|
||||
|
||||
TODO for the XML parser and stuff:
|
||||
==================================
|
||||
|
||||
this tend to be outdated :-\ ...
|
||||
|
||||
DOCS:
|
||||
=====
|
||||
|
||||
- use case of using XInclude to load for example a description.
|
||||
order document + product base -(XSLT)-> quote with XIncludes
|
||||
|
|
||||
HTML output with description of parts <---(XSLT)--
|
||||
|
||||
TODO:
|
||||
=====
|
||||
- XInclude at the SAX level (libSRVG)
|
||||
- fix the C code prototype to bring back doc/libxml-undocumented.txt
|
||||
to a reasonable level
|
||||
- Computation of base when HTTP redirect occurs, might affect HTTP
|
||||
interfaces.
|
||||
- Computation of base in XInclude. Relativization of URIs.
|
||||
- listing all attributes in a node.
|
||||
- Better checking of external parsed entities TAG 1234
|
||||
- Go through erratas and do the cleanup.
|
||||
http://www.w3.org/XML/xml-19980210-errata ... started ...
|
||||
- jamesh suggestion: SAX like functions to save a document ie. call a
|
||||
function to open a new element with given attributes, write character
|
||||
data, close last element, etc
|
||||
+ inversted SAX, initial patch in April 2002 archives.
|
||||
- htmlParseDoc has parameter encoding which is not used.
|
||||
Function htmlCreateDocParserCtxt ignore it.
|
||||
- fix realloc() usage.
|
||||
- Stricten the UTF8 conformance (Martin Duerst):
|
||||
http://www.w3.org/2001/06/utf-8-test/.
|
||||
The bad files are in http://www.w3.org/2001/06/utf-8-wrong/.
|
||||
- xml:id normalized value
|
||||
|
||||
TODO:
|
||||
=====
|
||||
|
||||
- move all string manipulation functions (xmlStrdup, xmlStrlen, etc.) to
|
||||
global.c. Bjorn noted that the following files depends on parser.o solely
|
||||
because of these string functions: entities.o, global.o, hash.o, tree.o,
|
||||
xmlIO.o, and xpath.o.
|
||||
|
||||
- Optimization of tag strings allocation ?
|
||||
|
||||
- maintain coherency of namespace when doing cut'n paste operations
|
||||
=> the functions are coded, but need testing
|
||||
|
||||
- function to rebuild the ID table
|
||||
- functions to rebuild the DTD hash tables (after DTD changes).
|
||||
|
||||
|
||||
EXTENSIONS:
|
||||
===========
|
||||
|
||||
- Tools to produce man pages from the SGML docs.
|
||||
|
||||
- Add Xpointer recognition/API
|
||||
|
||||
- Add Xlink recognition/API
|
||||
=> started adding an xlink.[ch] with a unified API for XML and HTML.
|
||||
it's crap :-(
|
||||
|
||||
- Implement XSchemas
|
||||
=> Really need to be done <grin/>
|
||||
- datatype are complete, but structure support is very limited.
|
||||
|
||||
- extend the shell with:
|
||||
- edit
|
||||
- load/save
|
||||
- mv (yum, yum, but it's harder because directories are ordered in
|
||||
our case, mvup and mvdown would be required)
|
||||
|
||||
|
||||
Done:
|
||||
=====
|
||||
|
||||
- Add HTML validation using the XHTML DTD
|
||||
- problem: do we want to keep and maintain the code for handling
|
||||
DTD/System ID cache directly in libxml ?
|
||||
=> not really done that way, but there are new APIs to check elements
|
||||
or attributes. Otherwise XHTML validation directly ...
|
||||
|
||||
- XML Schemas datatypes except Base64 and BinHex
|
||||
|
||||
- Relax NG validation
|
||||
|
||||
- XmlTextReader streaming API + validation
|
||||
|
||||
- Add a DTD cache prefilled with xhtml DTDs and entities and a program to
|
||||
manage them -> like the /usr/bin/install-catalog from SGML
|
||||
right place seems $datadir/xmldtds
|
||||
Maybe this is better left to user apps
|
||||
=> use a catalog instead , and xhtml1-dtd package
|
||||
|
||||
- Add output to XHTML
|
||||
=> XML serializer automatically recognize the DTd and apply the specific
|
||||
rules.
|
||||
|
||||
- Fix output of <tst val="x
y"/>
|
||||
|
||||
- compliance to XML-Namespace checking, see section 6 of
|
||||
http://www.w3.org/TR/REC-xml-names/
|
||||
|
||||
- Correct standalone checking/emitting (hard)
|
||||
2.9 Standalone Document Declaration
|
||||
|
||||
- Implement OASIS XML Catalog support
|
||||
http://www.oasis-open.org/committees/entity/
|
||||
|
||||
- Get OASIS testsuite to a more friendly result, check all the results
|
||||
once stable. the check-xml-test-suite.py script does this
|
||||
|
||||
- Implement XSLT
|
||||
=> libxslt
|
||||
|
||||
- Finish XPath
|
||||
=> attributes addressing troubles
|
||||
=> defaulted attributes handling
|
||||
=> namespace axis ?
|
||||
done as XSLT got debugged
|
||||
|
||||
- bug reported by Michael Meallin on validation problems
|
||||
=> Actually means I need to add support (and warn) for non-deterministic
|
||||
content model.
|
||||
- Handle undefined namespaces in entity contents better ... at least
|
||||
issue a warning
|
||||
- DOM needs
|
||||
int xmlPruneProp(xmlNodePtr node, xmlAtttrPtr attr);
|
||||
=> done it's actually xmlRemoveProp xmlUnsetProp xmlUnsetNsProp
|
||||
|
||||
- HTML: handling of Script and style data elements, need special code in
|
||||
the parser and saving functions (handling of < > " ' ...):
|
||||
http://www.w3.org/TR/html4/types.html#type-script
|
||||
Attributes are no problems since entities are accepted.
|
||||
- DOM needs
|
||||
xmlAttrPtr xmlNewDocProp(xmlDocPtr doc, const xmlChar *name, const xmlChar *value)
|
||||
- problem when parsing hrefs with & with the HTML parser (IRC ac)
|
||||
- If the internal encoding is not UTF8 saving to a given encoding doesn't
|
||||
work => fix to force UTF8 encoding ...
|
||||
done, added documentation too
|
||||
- Add an ASCII I/O encoder (asciiToUTF8 and UTF8Toascii)
|
||||
- Issue warning when using non-absolute namespaces URI.
|
||||
- the html parser should add <head> and <body> if they don't exist
|
||||
started, not finished.
|
||||
Done, the automatic closing is added and 3 testcases were inserted
|
||||
- Command to force the parser to stop parsing and ignore the rest of the file.
|
||||
xmlStopParser() should allow this, mostly untested
|
||||
- support for HTML empty attributes like <hr noshade>
|
||||
- plugged iconv() in for support of a large set of encodings.
|
||||
- xmlSwitchToEncoding() rewrite done
|
||||
- URI checkings (no fragments) rfc2396.txt
|
||||
- Added a clean mechanism for overload or added input methods:
|
||||
xmlRegisterInputCallbacks()
|
||||
- dynamically adapt the alloc entry point to use g_alloc()/g_free()
|
||||
if the programmer wants it:
|
||||
- use xmlMemSetup() to reset the routines used.
|
||||
- Check attribute normalization especially xmlGetProp()
|
||||
- Validity checking problems for NOTATIONS attributes
|
||||
- Validity checking problems for ENTITY ENTITIES attributes
|
||||
- Parsing of a well balanced chunk xmlParseBalancedChunkMemory()
|
||||
- URI module: validation, base, etc ... see uri.[ch]
|
||||
- turn tester into a generic program xmllint installed with libxml
|
||||
- extend validity checks to go through entities content instead of
|
||||
just labelling them PCDATA
|
||||
- Save Dtds using the children list instead of dumping the tables,
|
||||
order is preserved as well as comments and PIs
|
||||
- Wrote a notice of changes requires to go from 1.x to 2.x
|
||||
- make sure that all SAX callbacks are disabled if a WF error is detected
|
||||
- checking/handling of newline normalization
|
||||
http://localhost/www.xml.com/axml/target.html#sec-line-ends
|
||||
- correct checking of '&' '%' on entities content.
|
||||
- checking of PE/Nesting on entities declaration
|
||||
- checking/handling of xml:space
|
||||
- checking done.
|
||||
- handling done, not well tested
|
||||
- Language identification code, productions [33] to [38]
|
||||
=> done, the check has been added and report WFness errors
|
||||
- Conditional sections in DTDs [61] to [65]
|
||||
=> should this crap be really implemented ???
|
||||
=> Yep OASIS testsuite uses them
|
||||
- Allow parsed entities defined in the internal subset to override
|
||||
the ones defined in the external subset (DtD customization).
|
||||
=> This mean that the entity content should be computed only at
|
||||
use time, i.e. keep the orig string only at parse time and expand
|
||||
only when referenced from the external subset :-(
|
||||
Needed for complete use of most DTD from Eve Maler
|
||||
- Add regression tests for all WFC errors
|
||||
=> did some in test/WFC
|
||||
=> added OASIS testsuite routines
|
||||
http://xmlsoft.org/conf/result.html
|
||||
|
||||
- I18N: http://wap.trondheim.com/vaer/index.phtml is not XML and accepted
|
||||
by the XML parser, UTF-8 should be checked when there is no "encoding"
|
||||
declared !
|
||||
- Support for UTF-8 and UTF-16 encoding
|
||||
=> added some conversion routines provided by Martin Durst
|
||||
patched them, got fixes from @@@
|
||||
I plan to keep everything internally as UTF-8 (or ISO-Latin-X)
|
||||
this is slightly more costly but more compact, and recent processors
|
||||
efficiency is cache related. The key for good performances is keeping
|
||||
the data set small, so will I.
|
||||
=> the new progressive reading routines call the detection code
|
||||
is enabled, tested the ISO->UTF-8 stuff
|
||||
- External entities loading:
|
||||
- allow override by client code
|
||||
- make sure it is called for all external entities referenced
|
||||
Done, client code should use xmlSetExternalEntityLoader() to set
|
||||
the default loading routine. It will be called each time an external
|
||||
entity entity resolution is triggered.
|
||||
- maintain ID coherency when removing/changing attributes
|
||||
The function used to deallocate attributes now check for it being an
|
||||
ID and removes it from the table.
|
||||
- push mode parsing i.e. non-blocking state based parser
|
||||
done, both for XML and HTML parsers. Use xmlCreatePushParserCtxt()
|
||||
and xmlParseChunk() and html counterparts.
|
||||
The tester program now has a --push option to select that parser
|
||||
front-end. Douplicated tests to use both and check results are similar.
|
||||
|
||||
- Most of XPath, still see some troubles and occasionnal memleaks.
|
||||
- an XML shell, allowing to traverse/manipulate an XML document with
|
||||
a shell like interface, and using XPath for the anming syntax
|
||||
- use of readline and history added when available
|
||||
- the shell interface has been cleanly separated and moved to debugXML.c
|
||||
- HTML parser, should be fairly stable now
|
||||
- API to search the lang of an attribute
|
||||
- Collect IDs at parsing and maintain a table.
|
||||
PBM: maintain the table coherency
|
||||
PBM: how to detect ID types in absence of DtD !
|
||||
- Use it for XPath ID support
|
||||
- Add validity checking
|
||||
Should be finished now !
|
||||
- Add regression tests with entity substitutions
|
||||
|
||||
- External Parsed entities, either XML or external Subset [78] and [79]
|
||||
parsing the xmllang DtD now works, so it should be sufficient for
|
||||
most cases !
|
||||
|
||||
- progressive reading. The entity support is a first step toward
|
||||
abstraction of an input stream. A large part of the context is still
|
||||
located on the stack, moving to a state machine and putting everything
|
||||
in the parsing context should provide an adequate solution.
|
||||
=> Rather than progressive parsing, give more power to the SAX-like
|
||||
interface. Currently the DOM-like representation is built but
|
||||
=> it should be possible to define that only as a set of SAX callbacks
|
||||
and remove the tree creation from the parser code.
|
||||
DONE
|
||||
|
||||
- DOM support, instead of using a proprietary in memory
|
||||
format for the document representation, the parser should
|
||||
call a DOM API to actually build the resulting document.
|
||||
Then the parser becomes independent of the in-memory
|
||||
representation of the document. Even better using RPC's
|
||||
the parser can actually build the document in another
|
||||
program.
|
||||
=> Work started, now the internal representation is by default
|
||||
very near a direct DOM implementation. The DOM glue is implemented
|
||||
as a separate module. See the GNOME gdome module.
|
||||
|
||||
- C++ support : John Ehresman <[email protected]>
|
||||
- Updated code to follow more recent specs, added compatibility flag
|
||||
- Better error handling, use a dedicated, overridable error
|
||||
handling function.
|
||||
- Support for CDATA.
|
||||
- Keep track of line numbers for better error reporting.
|
||||
- Support for PI (SAX one).
|
||||
- Support for Comments (bad, should be in ASAP, they are parsed
|
||||
but not stored), should be configurable.
|
||||
- Improve the support of entities on save (+SAX).
|
||||
|
||||
-31
@@ -1,31 +0,0 @@
|
||||
- implement counted transitions at the automata level
|
||||
|
||||
- Unicode:
|
||||
+ upgrade to 3.2
|
||||
+ improve the python script to generate better test
|
||||
expressions to check the list of ranges.
|
||||
|
||||
- Implement the interface at the SAX level
|
||||
|
||||
- Implement the missing parts in the Structure part
|
||||
+ all content model
|
||||
+ enumerations
|
||||
+ countless others c.f. the TODO scattered in the code
|
||||
|
||||
- Complete the Built-In datatype collections and Facets implementations
|
||||
|
||||
- Regression tests based on
|
||||
+ the primer:
|
||||
http://www.w3.org/TR/xmlschema-0/
|
||||
+ the Schemas Test Collection:
|
||||
http://www.w3.org/2001/05/xmlschema-test-collection/
|
||||
+ archives of the schemas-dev list
|
||||
|
||||
- Integrity constraints:
|
||||
+ what's that ? How need to read about it
|
||||
|
||||
- "formal" checking, i.e. go through the full Structure spec and
|
||||
bind code and associated parts of the Schemas spec
|
||||
|
||||
- go though the erratas
|
||||
http://www.w3.org/2001/05/xmlschema-errata
|
||||
Vendored
+47
-145
@@ -20,11 +20,11 @@
|
||||
#include <ctype.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <libxml/tree.h>
|
||||
#include <libxml/globals.h>
|
||||
#include <libxml/tree.h>
|
||||
#include <libxml/parserInternals.h> /* for XML_MAX_TEXT_LENGTH */
|
||||
#include "buf.h"
|
||||
|
||||
#include "private/buf.h"
|
||||
#include "private/error.h"
|
||||
|
||||
#ifndef SIZE_MAX
|
||||
#define SIZE_MAX ((size_t) -1)
|
||||
@@ -133,7 +133,7 @@ xmlBufCreate(void) {
|
||||
ret->size = xmlDefaultBufferSize;
|
||||
UPDATE_COMPAT(ret);
|
||||
ret->alloc = xmlBufferAllocScheme;
|
||||
ret->content = (xmlChar *) xmlMallocAtomic(ret->size * sizeof(xmlChar));
|
||||
ret->content = (xmlChar *) xmlMallocAtomic(ret->size);
|
||||
if (ret->content == NULL) {
|
||||
xmlBufMemoryError(ret, "creating buffer");
|
||||
xmlFree(ret);
|
||||
@@ -169,7 +169,7 @@ xmlBufCreateSize(size_t size) {
|
||||
ret->size = (size ? size + 1 : 0); /* +1 for ending null */
|
||||
UPDATE_COMPAT(ret);
|
||||
if (ret->size){
|
||||
ret->content = (xmlChar *) xmlMallocAtomic(ret->size * sizeof(xmlChar));
|
||||
ret->content = (xmlChar *) xmlMallocAtomic(ret->size);
|
||||
if (ret->content == NULL) {
|
||||
xmlBufMemoryError(ret, "creating buffer");
|
||||
xmlFree(ret);
|
||||
@@ -198,8 +198,6 @@ xmlBufDetach(xmlBufPtr buf) {
|
||||
|
||||
if (buf == NULL)
|
||||
return(NULL);
|
||||
if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE)
|
||||
return(NULL);
|
||||
if (buf->buffer != NULL)
|
||||
return(NULL);
|
||||
if (buf->error)
|
||||
@@ -214,40 +212,6 @@ xmlBufDetach(xmlBufPtr buf) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* xmlBufCreateStatic:
|
||||
* @mem: the memory area
|
||||
* @size: the size in byte
|
||||
*
|
||||
* routine to create an XML buffer from an immutable memory area.
|
||||
* The area won't be modified nor copied, and is expected to be
|
||||
* present until the end of the buffer lifetime.
|
||||
*
|
||||
* returns the new structure.
|
||||
*/
|
||||
xmlBufPtr
|
||||
xmlBufCreateStatic(void *mem, size_t size) {
|
||||
xmlBufPtr ret;
|
||||
|
||||
if (mem == NULL)
|
||||
return(NULL);
|
||||
|
||||
ret = (xmlBufPtr) xmlMalloc(sizeof(xmlBuf));
|
||||
if (ret == NULL) {
|
||||
xmlBufMemoryError(NULL, "creating buffer");
|
||||
return(NULL);
|
||||
}
|
||||
ret->use = size;
|
||||
ret->size = size;
|
||||
UPDATE_COMPAT(ret);
|
||||
ret->alloc = XML_BUFFER_ALLOC_IMMUTABLE;
|
||||
ret->content = (xmlChar *) mem;
|
||||
ret->error = 0;
|
||||
ret->buffer = NULL;
|
||||
return(ret);
|
||||
}
|
||||
|
||||
/**
|
||||
* xmlBufGetAllocationScheme:
|
||||
* @buf: the buffer
|
||||
@@ -259,10 +223,6 @@ xmlBufCreateStatic(void *mem, size_t size) {
|
||||
int
|
||||
xmlBufGetAllocationScheme(xmlBufPtr buf) {
|
||||
if (buf == NULL) {
|
||||
#ifdef DEBUG_BUFFER
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"xmlBufGetAllocationScheme: buf == NULL\n");
|
||||
#endif
|
||||
return(-1);
|
||||
}
|
||||
return(buf->alloc);
|
||||
@@ -281,19 +241,13 @@ int
|
||||
xmlBufSetAllocationScheme(xmlBufPtr buf,
|
||||
xmlBufferAllocationScheme scheme) {
|
||||
if ((buf == NULL) || (buf->error != 0)) {
|
||||
#ifdef DEBUG_BUFFER
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"xmlBufSetAllocationScheme: buf == NULL or in error\n");
|
||||
#endif
|
||||
return(-1);
|
||||
}
|
||||
if ((buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) ||
|
||||
(buf->alloc == XML_BUFFER_ALLOC_IO))
|
||||
if (buf->alloc == XML_BUFFER_ALLOC_IO)
|
||||
return(-1);
|
||||
if ((scheme == XML_BUFFER_ALLOC_DOUBLEIT) ||
|
||||
(scheme == XML_BUFFER_ALLOC_EXACT) ||
|
||||
(scheme == XML_BUFFER_ALLOC_HYBRID) ||
|
||||
(scheme == XML_BUFFER_ALLOC_IMMUTABLE) ||
|
||||
(scheme == XML_BUFFER_ALLOC_BOUNDED)) {
|
||||
buf->alloc = scheme;
|
||||
if (buf->buffer)
|
||||
@@ -321,18 +275,13 @@ xmlBufSetAllocationScheme(xmlBufPtr buf,
|
||||
void
|
||||
xmlBufFree(xmlBufPtr buf) {
|
||||
if (buf == NULL) {
|
||||
#ifdef DEBUG_BUFFER
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"xmlBufFree: buf == NULL\n");
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
if ((buf->alloc == XML_BUFFER_ALLOC_IO) &&
|
||||
(buf->contentIO != NULL)) {
|
||||
xmlFree(buf->contentIO);
|
||||
} else if ((buf->content != NULL) &&
|
||||
(buf->alloc != XML_BUFFER_ALLOC_IMMUTABLE)) {
|
||||
} else if (buf->content != NULL) {
|
||||
xmlFree(buf->content);
|
||||
}
|
||||
xmlFree(buf);
|
||||
@@ -350,9 +299,7 @@ xmlBufEmpty(xmlBufPtr buf) {
|
||||
if (buf->content == NULL) return;
|
||||
CHECK_COMPAT(buf)
|
||||
buf->use = 0;
|
||||
if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) {
|
||||
buf->content = BAD_CAST "";
|
||||
} else if ((buf->alloc == XML_BUFFER_ALLOC_IO) &&
|
||||
if ((buf->alloc == XML_BUFFER_ALLOC_IO) &&
|
||||
(buf->contentIO != NULL)) {
|
||||
size_t start_buf = buf->content - buf->contentIO;
|
||||
|
||||
@@ -385,8 +332,7 @@ xmlBufShrink(xmlBufPtr buf, size_t len) {
|
||||
if (len > buf->use) return(0);
|
||||
|
||||
buf->use -= len;
|
||||
if ((buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) ||
|
||||
((buf->alloc == XML_BUFFER_ALLOC_IO) && (buf->contentIO != NULL))) {
|
||||
if ((buf->alloc == XML_BUFFER_ALLOC_IO) && (buf->contentIO != NULL)) {
|
||||
/*
|
||||
* we just move the content pointer, but also make sure
|
||||
* the perceived buffer size has shrunk accordingly
|
||||
@@ -434,7 +380,6 @@ xmlBufGrowInternal(xmlBufPtr buf, size_t len) {
|
||||
if ((buf == NULL) || (buf->error != 0)) return(0);
|
||||
CHECK_COMPAT(buf)
|
||||
|
||||
if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) return(0);
|
||||
if (len < buf->size - buf->use)
|
||||
return(buf->size - buf->use - 1);
|
||||
if (len >= SIZE_MAX - buf->use) {
|
||||
@@ -504,7 +449,7 @@ xmlBufGrow(xmlBufPtr buf, int len) {
|
||||
ret = xmlBufGrowInternal(buf, len);
|
||||
if (buf->error != 0)
|
||||
return(-1);
|
||||
return((int) ret);
|
||||
return(ret > INT_MAX ? INT_MAX : ret);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -520,23 +465,15 @@ xmlBufDump(FILE *file, xmlBufPtr buf) {
|
||||
size_t ret;
|
||||
|
||||
if ((buf == NULL) || (buf->error != 0)) {
|
||||
#ifdef DEBUG_BUFFER
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"xmlBufDump: buf == NULL or in error\n");
|
||||
#endif
|
||||
return(0);
|
||||
}
|
||||
if (buf->content == NULL) {
|
||||
#ifdef DEBUG_BUFFER
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"xmlBufDump: buf->content == NULL\n");
|
||||
#endif
|
||||
return(0);
|
||||
}
|
||||
CHECK_COMPAT(buf)
|
||||
if (file == NULL)
|
||||
file = stdout;
|
||||
ret = fwrite(buf->content, sizeof(xmlChar), buf->use, file);
|
||||
ret = fwrite(buf->content, 1, buf->use, file);
|
||||
return(ret);
|
||||
}
|
||||
|
||||
@@ -699,7 +636,6 @@ xmlBufResize(xmlBufPtr buf, size_t size)
|
||||
return(0);
|
||||
CHECK_COMPAT(buf)
|
||||
|
||||
if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) return(0);
|
||||
if (buf->alloc == XML_BUFFER_ALLOC_BOUNDED) {
|
||||
/*
|
||||
* Used to provide parsing limits
|
||||
@@ -777,7 +713,8 @@ xmlBufResize(xmlBufPtr buf, size_t size)
|
||||
if (buf->content == NULL) {
|
||||
rebuf = (xmlChar *) xmlMallocAtomic(newSize);
|
||||
buf->use = 0;
|
||||
rebuf[buf->use] = 0;
|
||||
if (rebuf != NULL)
|
||||
rebuf[buf->use] = 0;
|
||||
} else if (buf->size - buf->use < 100) {
|
||||
rebuf = (xmlChar *) xmlRealloc(buf->content, newSize);
|
||||
} else {
|
||||
@@ -825,12 +762,7 @@ xmlBufAdd(xmlBufPtr buf, const xmlChar *str, int len) {
|
||||
return -1;
|
||||
CHECK_COMPAT(buf)
|
||||
|
||||
if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) return -1;
|
||||
if (len < -1) {
|
||||
#ifdef DEBUG_BUFFER
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"xmlBufAdd: len < 0\n");
|
||||
#endif
|
||||
return -1;
|
||||
}
|
||||
if (len == 0) return 0;
|
||||
@@ -863,7 +795,7 @@ xmlBufAdd(xmlBufPtr buf, const xmlChar *str, int len) {
|
||||
}
|
||||
}
|
||||
|
||||
memmove(&buf->content[buf->use], str, len*sizeof(xmlChar));
|
||||
memmove(&buf->content[buf->use], str, len);
|
||||
buf->use += len;
|
||||
buf->content[buf->use] = 0;
|
||||
UPDATE_COMPAT(buf)
|
||||
@@ -885,7 +817,6 @@ xmlBufCat(xmlBufPtr buf, const xmlChar *str) {
|
||||
if ((buf == NULL) || (buf->error))
|
||||
return(-1);
|
||||
CHECK_COMPAT(buf)
|
||||
if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) return -1;
|
||||
if (str == NULL) return -1;
|
||||
return xmlBufAdd(buf, str, -1);
|
||||
}
|
||||
@@ -923,14 +854,8 @@ xmlBufWriteQuotedString(xmlBufPtr buf, const xmlChar *string) {
|
||||
if ((buf == NULL) || (buf->error))
|
||||
return(-1);
|
||||
CHECK_COMPAT(buf)
|
||||
if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE)
|
||||
return(-1);
|
||||
if (xmlStrchr(string, '\"')) {
|
||||
if (xmlStrchr(string, '\'')) {
|
||||
#ifdef DEBUG_BUFFER
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"xmlBufWriteQuotedString: string contains quote and double-quotes !\n");
|
||||
#endif
|
||||
xmlBufCCat(buf, "\"");
|
||||
base = cur = string;
|
||||
while(*cur != 0){
|
||||
@@ -1042,11 +967,11 @@ xmlBufBackToBuffer(xmlBufPtr buf) {
|
||||
* Keep the buffer but provide a truncated size value.
|
||||
*/
|
||||
xmlBufOverflowError(buf, "Allocated size too big for xmlBuffer");
|
||||
ret->use = (int) buf->use;
|
||||
ret->use = buf->use;
|
||||
ret->size = INT_MAX;
|
||||
} else {
|
||||
ret->use = (int) buf->use;
|
||||
ret->size = (int) buf->size;
|
||||
ret->use = buf->use;
|
||||
ret->size = buf->size;
|
||||
}
|
||||
ret->alloc = buf->alloc;
|
||||
ret->content = buf->content;
|
||||
@@ -1092,57 +1017,6 @@ xmlBufMergeBuffer(xmlBufPtr buf, xmlBufferPtr buffer) {
|
||||
*/
|
||||
int
|
||||
xmlBufResetInput(xmlBufPtr buf, xmlParserInputPtr input) {
|
||||
if ((input == NULL) || (buf == NULL) || (buf->error))
|
||||
return(-1);
|
||||
CHECK_COMPAT(buf)
|
||||
input->base = input->cur = buf->content;
|
||||
input->end = &buf->content[buf->use];
|
||||
return(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* xmlBufGetInputBase:
|
||||
* @buf: an xmlBufPtr
|
||||
* @input: an xmlParserInputPtr
|
||||
*
|
||||
* Get the base of the @input relative to the beginning of the buffer
|
||||
*
|
||||
* Returns the size_t corresponding to the displacement
|
||||
*/
|
||||
size_t
|
||||
xmlBufGetInputBase(xmlBufPtr buf, xmlParserInputPtr input) {
|
||||
size_t base;
|
||||
|
||||
if ((input == NULL) || (buf == NULL) || (buf->error))
|
||||
return(-1);
|
||||
CHECK_COMPAT(buf)
|
||||
base = input->base - buf->content;
|
||||
/*
|
||||
* We could do some pointer arithmetic checks but that's probably
|
||||
* sufficient.
|
||||
*/
|
||||
if (base > buf->size) {
|
||||
xmlBufOverflowError(buf, "Input reference outside of the buffer");
|
||||
base = 0;
|
||||
}
|
||||
return(base);
|
||||
}
|
||||
|
||||
/**
|
||||
* xmlBufSetInputBaseCur:
|
||||
* @buf: an xmlBufPtr
|
||||
* @input: an xmlParserInputPtr
|
||||
* @base: the base value relative to the beginning of the buffer
|
||||
* @cur: the cur value relative to the beginning of the buffer
|
||||
*
|
||||
* Update the input to use the base and cur relative to the buffer
|
||||
* after a possible reallocation of its content
|
||||
*
|
||||
* Returns -1 in case of error, 0 otherwise
|
||||
*/
|
||||
int
|
||||
xmlBufSetInputBaseCur(xmlBufPtr buf, xmlParserInputPtr input,
|
||||
size_t base, size_t cur) {
|
||||
if (input == NULL)
|
||||
return(-1);
|
||||
if ((buf == NULL) || (buf->error)) {
|
||||
@@ -1150,9 +1024,37 @@ xmlBufSetInputBaseCur(xmlBufPtr buf, xmlParserInputPtr input,
|
||||
return(-1);
|
||||
}
|
||||
CHECK_COMPAT(buf)
|
||||
input->base = &buf->content[base];
|
||||
input->cur = input->base + cur;
|
||||
input->base = input->cur = buf->content;
|
||||
input->end = &buf->content[buf->use];
|
||||
return(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* xmlBufUpdateInput:
|
||||
* @buf: an xmlBufPtr
|
||||
* @input: an xmlParserInputPtr
|
||||
* @pos: the cur value relative to the beginning of the buffer
|
||||
*
|
||||
* Update the input to use the base and cur relative to the buffer
|
||||
* after a possible reallocation of its content
|
||||
*
|
||||
* Returns -1 in case of error, 0 otherwise
|
||||
*/
|
||||
int
|
||||
xmlBufUpdateInput(xmlBufPtr buf, xmlParserInputPtr input, size_t pos) {
|
||||
if (input == NULL)
|
||||
return(-1);
|
||||
/*
|
||||
* TODO: It might be safer to keep using the buffer content if there
|
||||
* was an error.
|
||||
*/
|
||||
if ((buf == NULL) || (buf->error)) {
|
||||
input->base = input->cur = input->end = BAD_CAST "";
|
||||
return(-1);
|
||||
}
|
||||
CHECK_COMPAT(buf)
|
||||
input->base = buf->content;
|
||||
input->cur = input->base + pos;
|
||||
input->end = &buf->content[buf->use];
|
||||
return(0);
|
||||
}
|
||||
|
||||
Vendored
-67
@@ -1,67 +0,0 @@
|
||||
/*
|
||||
* Summary: Internal Interfaces for memory buffers in libxml2
|
||||
* Description: this module describes most of the new xmlBuf buffer
|
||||
* entry points, those are private routines, with a
|
||||
* few exceptions exported in tree.h. This was added
|
||||
* in 2.9.0.
|
||||
*
|
||||
* Copy: See Copyright for the status of this software.
|
||||
*
|
||||
* Author: Daniel Veillard
|
||||
*/
|
||||
|
||||
#ifndef __XML_BUF_H__
|
||||
#define __XML_BUF_H__
|
||||
|
||||
#include <libxml/tree.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
xmlBufPtr xmlBufCreate(void);
|
||||
xmlBufPtr xmlBufCreateSize(size_t size);
|
||||
xmlBufPtr xmlBufCreateStatic(void *mem, size_t size);
|
||||
|
||||
int xmlBufSetAllocationScheme(xmlBufPtr buf,
|
||||
xmlBufferAllocationScheme scheme);
|
||||
int xmlBufGetAllocationScheme(xmlBufPtr buf);
|
||||
|
||||
void xmlBufFree(xmlBufPtr buf);
|
||||
void xmlBufEmpty(xmlBufPtr buf);
|
||||
|
||||
/* size_t xmlBufShrink(xmlBufPtr buf, size_t len); */
|
||||
int xmlBufGrow(xmlBufPtr buf, int len);
|
||||
int xmlBufResize(xmlBufPtr buf, size_t len);
|
||||
|
||||
int xmlBufAdd(xmlBufPtr buf, const xmlChar *str, int len);
|
||||
int xmlBufCat(xmlBufPtr buf, const xmlChar *str);
|
||||
int xmlBufCCat(xmlBufPtr buf, const char *str);
|
||||
int xmlBufWriteQuotedString(xmlBufPtr buf, const xmlChar *string);
|
||||
|
||||
size_t xmlBufAvail(const xmlBufPtr buf);
|
||||
size_t xmlBufLength(const xmlBufPtr buf);
|
||||
/* size_t xmlBufUse(const xmlBufPtr buf); */
|
||||
int xmlBufIsEmpty(const xmlBufPtr buf);
|
||||
int xmlBufAddLen(xmlBufPtr buf, size_t len);
|
||||
|
||||
/* const xmlChar * xmlBufContent(const xmlBuf *buf); */
|
||||
/* const xmlChar * xmlBufEnd(xmlBufPtr buf); */
|
||||
|
||||
xmlChar * xmlBufDetach(xmlBufPtr buf);
|
||||
|
||||
size_t xmlBufDump(FILE *file, xmlBufPtr buf);
|
||||
|
||||
xmlBufPtr xmlBufFromBuffer(xmlBufferPtr buffer);
|
||||
xmlBufferPtr xmlBufBackToBuffer(xmlBufPtr buf);
|
||||
int xmlBufMergeBuffer(xmlBufPtr buf, xmlBufferPtr buffer);
|
||||
|
||||
int xmlBufResetInput(xmlBufPtr buf, xmlParserInputPtr input);
|
||||
size_t xmlBufGetInputBase(xmlBufPtr buf, xmlParserInputPtr input);
|
||||
int xmlBufSetInputBaseCur(xmlBufPtr buf, xmlParserInputPtr input,
|
||||
size_t base, size_t cur);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* __XML_BUF_H__ */
|
||||
|
||||
Vendored
-2228
File diff suppressed because it is too large
Load Diff
Vendored
+10
-15
@@ -18,14 +18,13 @@
|
||||
#ifdef LIBXML_CATALOG_ENABLED
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_STAT_H
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#elif defined (_WIN32)
|
||||
#include <io.h>
|
||||
#endif
|
||||
#ifdef HAVE_FCNTL_H
|
||||
#include <fcntl.h>
|
||||
@@ -37,9 +36,9 @@
|
||||
#include <libxml/catalog.h>
|
||||
#include <libxml/xmlerror.h>
|
||||
#include <libxml/threads.h>
|
||||
#include <libxml/globals.h>
|
||||
|
||||
#include "buf.h"
|
||||
#include "private/buf.h"
|
||||
#include "private/error.h"
|
||||
|
||||
#define MAX_DELEGATE 50
|
||||
#define MAX_CATAL_DEPTH 50
|
||||
@@ -891,11 +890,7 @@ xmlParseCatalogFile(const char *filename) {
|
||||
|
||||
ctxt = xmlNewParserCtxt();
|
||||
if (ctxt == NULL) {
|
||||
#ifdef LIBXML_SAX1_ENABLED
|
||||
if (xmlDefaultSAXHandler.error != NULL) {
|
||||
xmlDefaultSAXHandler.error(NULL, "out of memory\n");
|
||||
}
|
||||
#endif
|
||||
xmlCatalogErrMemory("allocating parser context");
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
@@ -2177,7 +2172,6 @@ xmlParseSGMLCatalogPubid(const xmlChar *cur, xmlChar **id) {
|
||||
int len = 0;
|
||||
int size = 50;
|
||||
xmlChar stop;
|
||||
int count = 0;
|
||||
|
||||
*id = NULL;
|
||||
|
||||
@@ -2190,7 +2184,7 @@ xmlParseSGMLCatalogPubid(const xmlChar *cur, xmlChar **id) {
|
||||
} else {
|
||||
stop = ' ';
|
||||
}
|
||||
buf = (xmlChar *) xmlMallocAtomic(size * sizeof(xmlChar));
|
||||
buf = (xmlChar *) xmlMallocAtomic(size);
|
||||
if (buf == NULL) {
|
||||
xmlCatalogErrMemory("allocating public ID");
|
||||
return(NULL);
|
||||
@@ -2202,7 +2196,7 @@ xmlParseSGMLCatalogPubid(const xmlChar *cur, xmlChar **id) {
|
||||
break;
|
||||
if (len + 1 >= size) {
|
||||
size *= 2;
|
||||
tmp = (xmlChar *) xmlRealloc(buf, size * sizeof(xmlChar));
|
||||
tmp = (xmlChar *) xmlRealloc(buf, size);
|
||||
if (tmp == NULL) {
|
||||
xmlCatalogErrMemory("allocating public ID");
|
||||
xmlFree(buf);
|
||||
@@ -2211,7 +2205,6 @@ xmlParseSGMLCatalogPubid(const xmlChar *cur, xmlChar **id) {
|
||||
buf = tmp;
|
||||
}
|
||||
buf[len++] = *cur;
|
||||
count++;
|
||||
NEXT;
|
||||
}
|
||||
buf[len] = 0;
|
||||
@@ -2975,6 +2968,8 @@ xmlACatalogAdd(xmlCatalogPtr catal, const xmlChar * type,
|
||||
if (catal->sgml == NULL)
|
||||
catal->sgml = xmlHashCreate(10);
|
||||
res = xmlHashAddEntry(catal->sgml, orig, entry);
|
||||
if (res < 0)
|
||||
xmlFreeCatalogEntry(entry, NULL);
|
||||
}
|
||||
}
|
||||
return (res);
|
||||
@@ -3135,7 +3130,7 @@ xmlInitializeCatalog(void) {
|
||||
strncpy(p, "\\..\\etc\\catalog", 255 - (p - buf));
|
||||
uri = xmlCanonicPath((const xmlChar*)buf);
|
||||
if (uri != NULL) {
|
||||
strncpy(XML_XML_DEFAULT_CATALOG, uri, 255);
|
||||
strncpy(XML_XML_DEFAULT_CATALOG, (char* )uri, 255);
|
||||
xmlFree(uri);
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+2
@@ -14,6 +14,8 @@
|
||||
#include "libxml.h"
|
||||
#include <libxml/chvalid.h>
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
/*
|
||||
* The initial tables ({func_name}_tab) are used to validate whether a
|
||||
* single-byte character is within the specified group. Each table
|
||||
|
||||
Vendored
-217
@@ -1,217 +0,0 @@
|
||||
/* config.h. Generated from config.h.in by configure. */
|
||||
/* config.h.in. Generated from configure.in by autoheader. */
|
||||
|
||||
/* A form that will not confuse apibuild.py */
|
||||
/* #undef ATTRIBUTE_DESTRUCTOR */
|
||||
|
||||
/* Type cast for the gethostbyname() argument */
|
||||
#define GETHOSTBYNAME_ARG_CAST
|
||||
|
||||
/* Define to 1 if you have the <arpa/inet.h> header file. */
|
||||
/* #undef HAVE_ARPA_INET_H */
|
||||
|
||||
/* Define to 1 if you have the <arpa/nameser.h> header file. */
|
||||
/* #undef HAVE_ARPA_NAMESER_H */
|
||||
|
||||
/* Define if __attribute__((destructor)) is accepted */
|
||||
/* #undef HAVE_ATTRIBUTE_DESTRUCTOR */
|
||||
|
||||
/* Whether struct sockaddr::__ss_family exists */
|
||||
/* #undef HAVE_BROKEN_SS_FAMILY */
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
/* #undef HAVE_DLFCN_H */
|
||||
|
||||
/* Have dlopen based dso */
|
||||
/* #undef HAVE_DLOPEN */
|
||||
|
||||
/* Define to 1 if you have the <dl.h> header file. */
|
||||
/* #undef HAVE_DL_H */
|
||||
|
||||
/* Define to 1 if you have the <fcntl.h> header file. */
|
||||
#define HAVE_FCNTL_H 1
|
||||
|
||||
/* Define to 1 if you have the `ftime' function. */
|
||||
#define HAVE_FTIME 1
|
||||
|
||||
/* Define if getaddrinfo is there */
|
||||
/* #undef HAVE_GETADDRINFO */
|
||||
|
||||
/* Define to 1 if you have the `gettimeofday' function. */
|
||||
/* #undef HAVE_GETTIMEOFDAY */
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#define HAVE_INTTYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the `isascii' function. */
|
||||
/* #undef HAVE_ISASCII */
|
||||
|
||||
/* Define if history library is there (-lhistory) */
|
||||
/* #undef HAVE_LIBHISTORY */
|
||||
|
||||
/* Define if readline library is there (-lreadline) */
|
||||
/* #undef HAVE_LIBREADLINE */
|
||||
|
||||
/* Define to 1 if you have the <lzma.h> header file. */
|
||||
/* #undef HAVE_LZMA_H */
|
||||
|
||||
/* Define to 1 if you have the `mmap' function. */
|
||||
/* #undef HAVE_MMAP */
|
||||
|
||||
/* Define to 1 if you have the `munmap' function. */
|
||||
/* #undef HAVE_MUNMAP */
|
||||
|
||||
/* mmap() is no good without munmap() */
|
||||
#if defined(HAVE_MMAP) && !defined(HAVE_MUNMAP)
|
||||
# undef /**/ HAVE_MMAP
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the <netdb.h> header file. */
|
||||
/* #undef HAVE_NETDB_H */
|
||||
|
||||
/* Define to 1 if you have the <netinet/in.h> header file. */
|
||||
/* #undef HAVE_NETINET_IN_H */
|
||||
|
||||
/* Define to 1 if you have the <poll.h> header file. */
|
||||
/* #undef HAVE_POLL_H */
|
||||
|
||||
/* Define if <pthread.h> is there */
|
||||
/* #undef HAVE_PTHREAD_H */
|
||||
|
||||
/* Define to 1 if you have the `putenv' function. */
|
||||
/* #undef HAVE_PUTENV */
|
||||
|
||||
/* Define to 1 if you have the `rand_r' function. */
|
||||
/* #undef HAVE_RAND_R */
|
||||
|
||||
/* Define to 1 if you have the <resolv.h> header file. */
|
||||
/* #undef HAVE_RESOLV_H */
|
||||
|
||||
/* Have shl_load based dso */
|
||||
/* #undef HAVE_SHLLOAD */
|
||||
|
||||
/* Define to 1 if you have the `snprintf' function. */
|
||||
#define HAVE_SNPRINTF 1
|
||||
|
||||
/* Define to 1 if you have the `stat' function. */
|
||||
#define HAVE_STAT 1
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#define HAVE_STDINT_H 1
|
||||
|
||||
/* Define to 1 if you have the <stdio.h> header file. */
|
||||
#define HAVE_STDIO_H 1
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#define HAVE_STDLIB_H 1
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#define HAVE_STRINGS_H 1
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#define HAVE_STRING_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/mman.h> header file. */
|
||||
/* #undef HAVE_SYS_MMAN_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/select.h> header file. */
|
||||
/* #undef HAVE_SYS_SELECT_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/socket.h> header file. */
|
||||
/* #undef HAVE_SYS_SOCKET_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#define HAVE_SYS_STAT_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/timeb.h> header file. */
|
||||
#define HAVE_SYS_TIMEB_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/time.h> header file. */
|
||||
//#define HAVE_SYS_TIME_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#define HAVE_UNISTD_H 1
|
||||
|
||||
/* Whether va_copy() is available */
|
||||
#define HAVE_VA_COPY 1
|
||||
|
||||
/* Define to 1 if you have the `vsnprintf' function. */
|
||||
#define HAVE_VSNPRINTF 1
|
||||
|
||||
/* Define to 1 if you have the <zlib.h> header file. */
|
||||
#define HAVE_ZLIB_H 1
|
||||
|
||||
/* Whether __va_copy() is available */
|
||||
#define HAVE___VA_COPY 1
|
||||
|
||||
/* Define to the sub-directory where libtool stores uninstalled libraries. */
|
||||
/* #undef LT_OBJDIR */
|
||||
|
||||
/* Name of package */
|
||||
#define PACKAGE "libxml2"
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#define PACKAGE_BUGREPORT ""
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#define PACKAGE_NAME ""
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#define PACKAGE_STRING ""
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#define PACKAGE_TARNAME ""
|
||||
|
||||
/* Define to the home page for this package. */
|
||||
#define PACKAGE_URL ""
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#define PACKAGE_VERSION ""
|
||||
|
||||
/* Type cast for the send() function 2nd arg */
|
||||
#define SEND_ARG2_CAST
|
||||
|
||||
/* Define to 1 if all of the C90 standard headers exist (not just the ones
|
||||
required in a freestanding environment). This macro is provided for
|
||||
backward compatibility; new code need not use it. */
|
||||
#define STDC_HEADERS 1
|
||||
|
||||
/* Support for IPv6 */
|
||||
/* #undef SUPPORT_IP6 */
|
||||
|
||||
/* Define if va_list is an array type */
|
||||
/* #undef VA_LIST_IS_ARRAY */
|
||||
|
||||
/* Version number of package */
|
||||
#define VERSION "2.10.3"
|
||||
|
||||
/* Determine what socket length (socklen_t) data type is */
|
||||
#define XML_SOCKLEN_T int
|
||||
|
||||
/* Define for Solaris 2.5.1 so the uint32_t typedef from <sys/synch.h>,
|
||||
<pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
|
||||
#define below would cause a syntax error. */
|
||||
/* #undef _UINT32_T */
|
||||
|
||||
/* ss_family is not defined here, use __ss_family instead */
|
||||
/* #undef ss_family */
|
||||
|
||||
/* Define to the type of an unsigned integer type of width exactly 32 bits if
|
||||
such a type exists and the standard includes do not define it. */
|
||||
/* #undef uint32_t */
|
||||
|
||||
#ifdef __REACTOS__
|
||||
#if defined(__MINGW32__)
|
||||
//#include <windows.h>
|
||||
#define WIN32_NO_STATUS
|
||||
#define _WINDOWS_
|
||||
#define _INC_WINDOWS
|
||||
#define COM_NO_WINDOWS_H
|
||||
#include <stdarg.h>
|
||||
#include <windef.h>
|
||||
#include <winbase.h>
|
||||
#endif
|
||||
#endif
|
||||
Vendored
+3
-3
@@ -18,18 +18,18 @@
|
||||
#include <libxml/tree.h>
|
||||
#include <libxml/parser.h>
|
||||
#include <libxml/parserInternals.h>
|
||||
#include <libxml/valid.h>
|
||||
#include <libxml/debugXML.h>
|
||||
#include <libxml/HTMLtree.h>
|
||||
#include <libxml/HTMLparser.h>
|
||||
#include <libxml/xmlerror.h>
|
||||
#include <libxml/globals.h>
|
||||
#include <libxml/xpathInternals.h>
|
||||
#include <libxml/uri.h>
|
||||
#ifdef LIBXML_SCHEMAS_ENABLED
|
||||
#include <libxml/relaxng.h>
|
||||
#endif
|
||||
|
||||
#include "private/error.h"
|
||||
|
||||
#define DUMP_TEXT_TYPE 1
|
||||
|
||||
typedef struct _xmlDebugCtxt xmlDebugCtxt;
|
||||
@@ -2633,7 +2633,7 @@ xmlShellValidate(xmlShellCtxtPtr ctxt, char *dtd,
|
||||
int res = -1;
|
||||
|
||||
if ((ctxt == NULL) || (ctxt->doc == NULL)) return(-1);
|
||||
vctxt.userData = NULL;
|
||||
memset(&vctxt, 0, sizeof(vctxt));
|
||||
vctxt.error = xmlGenericError;
|
||||
vctxt.warning = xmlGenericError;
|
||||
|
||||
|
||||
Vendored
+590
-917
File diff suppressed because it is too large
Load Diff
Vendored
-32
@@ -1,32 +0,0 @@
|
||||
/*
|
||||
* Summary: Internal Interfaces for encoding in libxml2
|
||||
* Description: this module describes a few interfaces which were
|
||||
* added along with the API changes in 2.9.0
|
||||
* those are private routines at this point
|
||||
*
|
||||
* Copy: See Copyright for the status of this software.
|
||||
*
|
||||
* Author: Daniel Veillard
|
||||
*/
|
||||
|
||||
#ifndef __XML_ENC_H__
|
||||
#define __XML_ENC_H__
|
||||
|
||||
#include <libxml/tree.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int xmlCharEncFirstLineInt(xmlCharEncodingHandler *handler, xmlBufferPtr out,
|
||||
xmlBufferPtr in, int len);
|
||||
int xmlCharEncFirstLineInput(xmlParserInputBufferPtr input, int len);
|
||||
int xmlCharEncInput(xmlParserInputBufferPtr input, int flush);
|
||||
int xmlCharEncOutput(xmlOutputBufferPtr output, int init);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* __XML_ENC_H__ */
|
||||
|
||||
|
||||
Vendored
+500
-872
File diff suppressed because it is too large
Load Diff
Vendored
+10
-16
@@ -23,10 +23,10 @@
|
||||
#include <libxml/parser.h>
|
||||
#include <libxml/parserInternals.h>
|
||||
#include <libxml/xmlerror.h>
|
||||
#include <libxml/globals.h>
|
||||
#include <libxml/dict.h>
|
||||
|
||||
#include "save.h"
|
||||
#include "private/entities.h"
|
||||
#include "private/error.h"
|
||||
|
||||
/*
|
||||
* The XML predefined entities.
|
||||
@@ -37,35 +37,35 @@ static xmlEntity xmlEntityLt = {
|
||||
NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
BAD_CAST "<", BAD_CAST "<", 1,
|
||||
XML_INTERNAL_PREDEFINED_ENTITY,
|
||||
NULL, NULL, NULL, NULL, 0, 1
|
||||
NULL, NULL, NULL, NULL, 0, 0, 0
|
||||
};
|
||||
static xmlEntity xmlEntityGt = {
|
||||
NULL, XML_ENTITY_DECL, BAD_CAST "gt",
|
||||
NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
BAD_CAST ">", BAD_CAST ">", 1,
|
||||
XML_INTERNAL_PREDEFINED_ENTITY,
|
||||
NULL, NULL, NULL, NULL, 0, 1
|
||||
NULL, NULL, NULL, NULL, 0, 0, 0
|
||||
};
|
||||
static xmlEntity xmlEntityAmp = {
|
||||
NULL, XML_ENTITY_DECL, BAD_CAST "amp",
|
||||
NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
BAD_CAST "&", BAD_CAST "&", 1,
|
||||
XML_INTERNAL_PREDEFINED_ENTITY,
|
||||
NULL, NULL, NULL, NULL, 0, 1
|
||||
NULL, NULL, NULL, NULL, 0, 0, 0
|
||||
};
|
||||
static xmlEntity xmlEntityQuot = {
|
||||
NULL, XML_ENTITY_DECL, BAD_CAST "quot",
|
||||
NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
BAD_CAST "\"", BAD_CAST "\"", 1,
|
||||
XML_INTERNAL_PREDEFINED_ENTITY,
|
||||
NULL, NULL, NULL, NULL, 0, 1
|
||||
NULL, NULL, NULL, NULL, 0, 0, 0
|
||||
};
|
||||
static xmlEntity xmlEntityApos = {
|
||||
NULL, XML_ENTITY_DECL, BAD_CAST "apos",
|
||||
NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
BAD_CAST "'", BAD_CAST "'", 1,
|
||||
XML_INTERNAL_PREDEFINED_ENTITY,
|
||||
NULL, NULL, NULL, NULL, 0, 1
|
||||
NULL, NULL, NULL, NULL, 0, 0, 0
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -113,7 +113,7 @@ xmlEntitiesWarn(xmlParserErrors code, const char *msg, const xmlChar *str1)
|
||||
/*
|
||||
* xmlFreeEntity : clean-up an entity record.
|
||||
*/
|
||||
static void
|
||||
void
|
||||
xmlFreeEntity(xmlEntityPtr entity)
|
||||
{
|
||||
xmlDictPtr dict = NULL;
|
||||
@@ -162,7 +162,6 @@ xmlCreateEntity(xmlDictPtr dict, const xmlChar *name, int type,
|
||||
}
|
||||
memset(ret, 0, sizeof(xmlEntity));
|
||||
ret->type = XML_ENTITY_DECL;
|
||||
ret->checked = 0;
|
||||
|
||||
/*
|
||||
* fill the structure.
|
||||
@@ -604,7 +603,7 @@ xmlEncodeEntitiesInternal(xmlDocPtr doc, const xmlChar *input, int attr) {
|
||||
* allocate an translation buffer.
|
||||
*/
|
||||
buffer_size = 1000;
|
||||
buffer = (xmlChar *) xmlMalloc(buffer_size * sizeof(xmlChar));
|
||||
buffer = (xmlChar *) xmlMalloc(buffer_size);
|
||||
if (buffer == NULL) {
|
||||
xmlEntitiesErrMemory("xmlEncodeEntities: malloc failed");
|
||||
return(NULL);
|
||||
@@ -718,8 +717,6 @@ xmlEncodeEntitiesInternal(xmlDocPtr doc, const xmlChar *input, int attr) {
|
||||
(((cur[0] & 0xF8) == 0xF8))) {
|
||||
xmlEntitiesErr(XML_CHECK_NOT_UTF8,
|
||||
"xmlEncodeEntities: input not UTF-8");
|
||||
if (doc != NULL)
|
||||
doc->encoding = xmlStrdup(BAD_CAST "ISO-8859-1");
|
||||
snprintf(buf, sizeof(buf), "&#%d;", *cur);
|
||||
buf[sizeof(buf) - 1] = 0;
|
||||
ptr = buf;
|
||||
@@ -751,8 +748,6 @@ xmlEncodeEntitiesInternal(xmlDocPtr doc, const xmlChar *input, int attr) {
|
||||
if ((l == 1) || (!IS_CHAR(val))) {
|
||||
xmlEntitiesErr(XML_ERR_INVALID_CHAR,
|
||||
"xmlEncodeEntities: char out of range\n");
|
||||
if (doc != NULL)
|
||||
doc->encoding = xmlStrdup(BAD_CAST "ISO-8859-1");
|
||||
snprintf(buf, sizeof(buf), "&#%d;", *cur);
|
||||
buf[sizeof(buf) - 1] = 0;
|
||||
ptr = buf;
|
||||
@@ -844,7 +839,7 @@ xmlEncodeSpecialChars(const xmlDoc *doc ATTRIBUTE_UNUSED, const xmlChar *input)
|
||||
* allocate an translation buffer.
|
||||
*/
|
||||
buffer_size = 1000;
|
||||
buffer = (xmlChar *) xmlMalloc(buffer_size * sizeof(xmlChar));
|
||||
buffer = (xmlChar *) xmlMalloc(buffer_size);
|
||||
if (buffer == NULL) {
|
||||
xmlEntitiesErrMemory("xmlEncodeSpecialChars: malloc failed");
|
||||
return(NULL);
|
||||
@@ -1010,7 +1005,6 @@ xmlCopyEntitiesTable(xmlEntitiesTablePtr table) {
|
||||
*/
|
||||
static void
|
||||
xmlDumpEntityContent(xmlBufferPtr buf, const xmlChar *content) {
|
||||
if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) return;
|
||||
if (xmlStrchr(content, '%')) {
|
||||
const xmlChar * base, *cur;
|
||||
|
||||
|
||||
Vendored
+58
-32
@@ -14,11 +14,10 @@
|
||||
#include <libxml/parser.h>
|
||||
#include <libxml/xmlerror.h>
|
||||
#include <libxml/xmlmemory.h>
|
||||
#include <libxml/globals.h>
|
||||
|
||||
void XMLCDECL xmlGenericErrorDefaultFunc (void *ctx ATTRIBUTE_UNUSED,
|
||||
const char *msg,
|
||||
...) LIBXML_ATTR_FORMAT(2,3);
|
||||
#include "private/error.h"
|
||||
|
||||
#define XML_MAX_ERRORS 100
|
||||
|
||||
#define XML_GET_VAR_STR(msg, str) { \
|
||||
int size, prev_size = -1; \
|
||||
@@ -67,7 +66,7 @@ void XMLCDECL xmlGenericErrorDefaultFunc (void *ctx ATTRIBUTE_UNUSED,
|
||||
*
|
||||
* Default handler for out of context error messages.
|
||||
*/
|
||||
void XMLCDECL
|
||||
void
|
||||
xmlGenericErrorDefaultFunc(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...) {
|
||||
va_list args;
|
||||
|
||||
@@ -83,6 +82,8 @@ xmlGenericErrorDefaultFunc(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...) {
|
||||
* initGenericErrorDefaultFunc:
|
||||
* @handler: the handler
|
||||
*
|
||||
* DEPRECATED: Use xmlSetGenericErrorFunc.
|
||||
*
|
||||
* Set or reset (if NULL) the default handler for generic errors
|
||||
* to the builtin error function.
|
||||
*/
|
||||
@@ -163,7 +164,7 @@ xmlParserPrintFileInfo(xmlParserInputPtr input) {
|
||||
}
|
||||
|
||||
/**
|
||||
* xmlParserPrintFileContext:
|
||||
* xmlParserPrintFileContextInternal:
|
||||
* @input: an xmlParserInputPtr input
|
||||
*
|
||||
* Displays current context within the input content for error tracking
|
||||
@@ -172,7 +173,7 @@ xmlParserPrintFileInfo(xmlParserInputPtr input) {
|
||||
static void
|
||||
xmlParserPrintFileContextInternal(xmlParserInputPtr input ,
|
||||
xmlGenericErrorFunc channel, void *data ) {
|
||||
const xmlChar *cur, *base;
|
||||
const xmlChar *cur, *base, *start;
|
||||
unsigned int n, col; /* GCC warns if signed, because compared with sizeof() */
|
||||
xmlChar content[81]; /* space for 80 chars + line terminator */
|
||||
xmlChar *ctnt;
|
||||
@@ -188,22 +189,35 @@ xmlParserPrintFileContextInternal(xmlParserInputPtr input ,
|
||||
}
|
||||
n = 0;
|
||||
/* search backwards for beginning-of-line (to max buff size) */
|
||||
while ((n++ < (sizeof(content)-1)) && (cur > base) &&
|
||||
(*(cur) != '\n') && (*(cur) != '\r'))
|
||||
while ((n < sizeof(content) - 1) && (cur > base) &&
|
||||
(*cur != '\n') && (*cur != '\r')) {
|
||||
cur--;
|
||||
if ((*(cur) == '\n') || (*(cur) == '\r')) cur++;
|
||||
n++;
|
||||
}
|
||||
if ((n > 0) && ((*cur == '\n') || (*cur == '\r'))) {
|
||||
cur++;
|
||||
} else {
|
||||
/* skip over continuation bytes */
|
||||
while ((cur < input->cur) && ((*cur & 0xC0) == 0x80))
|
||||
cur++;
|
||||
}
|
||||
/* calculate the error position in terms of the current position */
|
||||
col = input->cur - cur;
|
||||
/* search forward for end-of-line (to max buff size) */
|
||||
n = 0;
|
||||
ctnt = content;
|
||||
start = cur;
|
||||
/* copy selected text to our buffer */
|
||||
while ((*cur != 0) && (*(cur) != '\n') &&
|
||||
(*(cur) != '\r') && (n < sizeof(content)-1)) {
|
||||
*ctnt++ = *cur++;
|
||||
n++;
|
||||
while ((*cur != 0) && (*(cur) != '\n') && (*(cur) != '\r')) {
|
||||
int len = input->end - cur;
|
||||
int c = xmlGetUTF8Char(cur, &len);
|
||||
|
||||
if ((c < 0) || (n + len > sizeof(content)-1))
|
||||
break;
|
||||
cur += len;
|
||||
n += len;
|
||||
}
|
||||
*ctnt = 0;
|
||||
memcpy(content, start, n);
|
||||
content[n] = 0;
|
||||
/* print out the selected text */
|
||||
channel(data ,"%s\n", content);
|
||||
/* create blank line with problem pointer */
|
||||
@@ -451,7 +465,7 @@ xmlReportError(xmlErrorPtr err, xmlParserCtxtPtr ctxt, const char *str,
|
||||
* then forward the error message down the parser or generic
|
||||
* error callback handler
|
||||
*/
|
||||
void XMLCDECL
|
||||
void
|
||||
__xmlRaiseError(xmlStructuredErrorFunc schannel,
|
||||
xmlGenericErrorFunc channel, void *data, void *ctx,
|
||||
void *nod, int domain, int code, xmlErrorLevel level,
|
||||
@@ -474,12 +488,25 @@ __xmlRaiseError(xmlStructuredErrorFunc schannel,
|
||||
(domain == XML_FROM_DTD) || (domain == XML_FROM_NAMESPACE) ||
|
||||
(domain == XML_FROM_IO) || (domain == XML_FROM_VALID)) {
|
||||
ctxt = (xmlParserCtxtPtr) ctx;
|
||||
if ((schannel == NULL) && (ctxt != NULL) && (ctxt->sax != NULL) &&
|
||||
(ctxt->sax->initialized == XML_SAX2_MAGIC) &&
|
||||
(ctxt->sax->serror != NULL)) {
|
||||
schannel = ctxt->sax->serror;
|
||||
data = ctxt->userData;
|
||||
}
|
||||
|
||||
if (ctxt != NULL) {
|
||||
if (level == XML_ERR_WARNING) {
|
||||
if (ctxt->nbWarnings >= XML_MAX_ERRORS)
|
||||
return;
|
||||
ctxt->nbWarnings += 1;
|
||||
} else {
|
||||
if (ctxt->nbErrors >= XML_MAX_ERRORS)
|
||||
return;
|
||||
ctxt->nbErrors += 1;
|
||||
}
|
||||
|
||||
if ((schannel == NULL) && (ctxt->sax != NULL) &&
|
||||
(ctxt->sax->initialized == XML_SAX2_MAGIC) &&
|
||||
(ctxt->sax->serror != NULL)) {
|
||||
schannel = ctxt->sax->serror;
|
||||
data = ctxt->userData;
|
||||
}
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Check if structured error handler set
|
||||
@@ -677,7 +704,7 @@ __xmlSimpleError(int domain, int code, xmlNodePtr node,
|
||||
* Display and format an error messages, gives file, line, position and
|
||||
* extra parameters.
|
||||
*/
|
||||
void XMLCDECL
|
||||
void
|
||||
xmlParserError(void *ctx, const char *msg, ...)
|
||||
{
|
||||
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
|
||||
@@ -720,7 +747,7 @@ xmlParserError(void *ctx, const char *msg, ...)
|
||||
* Display and format a warning messages, gives file, line, position and
|
||||
* extra parameters.
|
||||
*/
|
||||
void XMLCDECL
|
||||
void
|
||||
xmlParserWarning(void *ctx, const char *msg, ...)
|
||||
{
|
||||
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
|
||||
@@ -769,7 +796,7 @@ xmlParserWarning(void *ctx, const char *msg, ...)
|
||||
* Display and format an validity error messages, gives file,
|
||||
* line, position and extra parameters.
|
||||
*/
|
||||
void XMLCDECL
|
||||
void
|
||||
xmlParserValidityError(void *ctx, const char *msg, ...)
|
||||
{
|
||||
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
|
||||
@@ -813,7 +840,7 @@ xmlParserValidityError(void *ctx, const char *msg, ...)
|
||||
* Display and format a validity warning messages, gives file, line,
|
||||
* position and extra parameters.
|
||||
*/
|
||||
void XMLCDECL
|
||||
void
|
||||
xmlParserValidityWarning(void *ctx, const char *msg, ...)
|
||||
{
|
||||
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
|
||||
@@ -853,9 +880,9 @@ xmlParserValidityWarning(void *ctx, const char *msg, ...)
|
||||
* Get the last global error registered. This is per thread if compiled
|
||||
* with thread support.
|
||||
*
|
||||
* Returns NULL if no error occurred or a pointer to the error
|
||||
* Returns a pointer to the error
|
||||
*/
|
||||
xmlErrorPtr
|
||||
const xmlError *
|
||||
xmlGetLastError(void)
|
||||
{
|
||||
if (xmlLastError.code == XML_ERR_OK)
|
||||
@@ -912,7 +939,7 @@ xmlResetLastError(void)
|
||||
*
|
||||
* Returns NULL if no error occurred or a pointer to the error
|
||||
*/
|
||||
xmlErrorPtr
|
||||
const xmlError *
|
||||
xmlCtxtGetLastError(void *ctx)
|
||||
{
|
||||
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
|
||||
@@ -954,7 +981,7 @@ xmlCtxtResetLastError(void *ctx)
|
||||
* Returns 0 in case of success and -1 in case of error.
|
||||
*/
|
||||
int
|
||||
xmlCopyError(xmlErrorPtr from, xmlErrorPtr to) {
|
||||
xmlCopyError(const xmlError *from, xmlErrorPtr to) {
|
||||
char *message, *file, *str1, *str2, *str3;
|
||||
|
||||
if ((from == NULL) || (to == NULL))
|
||||
@@ -993,4 +1020,3 @@ xmlCopyError(xmlErrorPtr from, xmlErrorPtr to) {
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Vendored
+748
-619
File diff suppressed because it is too large
Load Diff
Vendored
+942
-867
File diff suppressed because it is too large
Load Diff
Vendored
+75
-38
@@ -80,90 +80,121 @@ struct _htmlEntityDesc {
|
||||
const char *desc; /* the description */
|
||||
};
|
||||
|
||||
/** DOC_DISABLE */
|
||||
#ifdef LIBXML_SAX1_ENABLED
|
||||
#define XML_GLOBALS_HTML \
|
||||
XML_OP(htmlDefaultSAXHandler, xmlSAXHandlerV1, XML_DEPRECATED)
|
||||
#else
|
||||
#define XML_GLOBALS_HTML
|
||||
#endif
|
||||
|
||||
#define XML_OP XML_DECLARE_GLOBAL
|
||||
XML_GLOBALS_HTML
|
||||
#undef XML_OP
|
||||
|
||||
#if defined(LIBXML_THREAD_ENABLED) && !defined(XML_GLOBALS_NO_REDEFINITION)
|
||||
#define htmlDefaultSAXHandler XML_GLOBAL_MACRO(htmlDefaultSAXHandler)
|
||||
#endif
|
||||
/** DOC_ENABLE */
|
||||
|
||||
/*
|
||||
* There is only few public functions.
|
||||
*/
|
||||
XMLPUBFUN const htmlElemDesc * XMLCALL
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
htmlInitAutoClose (void);
|
||||
XMLPUBFUN const htmlElemDesc *
|
||||
htmlTagLookup (const xmlChar *tag);
|
||||
XMLPUBFUN const htmlEntityDesc * XMLCALL
|
||||
XMLPUBFUN const htmlEntityDesc *
|
||||
htmlEntityLookup(const xmlChar *name);
|
||||
XMLPUBFUN const htmlEntityDesc * XMLCALL
|
||||
XMLPUBFUN const htmlEntityDesc *
|
||||
htmlEntityValueLookup(unsigned int value);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
htmlIsAutoClosed(htmlDocPtr doc,
|
||||
htmlNodePtr elem);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
htmlAutoCloseTag(htmlDocPtr doc,
|
||||
const xmlChar *name,
|
||||
htmlNodePtr elem);
|
||||
XMLPUBFUN const htmlEntityDesc * XMLCALL
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN const htmlEntityDesc *
|
||||
htmlParseEntityRef(htmlParserCtxtPtr ctxt,
|
||||
const xmlChar **str);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
htmlParseCharRef(htmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
htmlParseElement(htmlParserCtxtPtr ctxt);
|
||||
|
||||
XMLPUBFUN htmlParserCtxtPtr XMLCALL
|
||||
XMLPUBFUN htmlParserCtxtPtr
|
||||
htmlNewParserCtxt(void);
|
||||
XMLPUBFUN htmlParserCtxtPtr
|
||||
htmlNewSAXParserCtxt(const htmlSAXHandler *sax,
|
||||
void *userData);
|
||||
|
||||
XMLPUBFUN htmlParserCtxtPtr XMLCALL
|
||||
XMLPUBFUN htmlParserCtxtPtr
|
||||
htmlCreateMemoryParserCtxt(const char *buffer,
|
||||
int size);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
htmlParseDocument(htmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN htmlDocPtr XMLCALL
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN htmlDocPtr
|
||||
htmlSAXParseDoc (const xmlChar *cur,
|
||||
const char *encoding,
|
||||
htmlSAXHandlerPtr sax,
|
||||
void *userData);
|
||||
XMLPUBFUN htmlDocPtr XMLCALL
|
||||
XMLPUBFUN htmlDocPtr
|
||||
htmlParseDoc (const xmlChar *cur,
|
||||
const char *encoding);
|
||||
XMLPUBFUN htmlDocPtr XMLCALL
|
||||
XMLPUBFUN htmlParserCtxtPtr
|
||||
htmlCreateFileParserCtxt(const char *filename,
|
||||
const char *encoding);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN htmlDocPtr
|
||||
htmlSAXParseFile(const char *filename,
|
||||
const char *encoding,
|
||||
htmlSAXHandlerPtr sax,
|
||||
void *userData);
|
||||
XMLPUBFUN htmlDocPtr XMLCALL
|
||||
XMLPUBFUN htmlDocPtr
|
||||
htmlParseFile (const char *filename,
|
||||
const char *encoding);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
UTF8ToHtml (unsigned char *out,
|
||||
int *outlen,
|
||||
const unsigned char *in,
|
||||
int *inlen);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
htmlEncodeEntities(unsigned char *out,
|
||||
int *outlen,
|
||||
const unsigned char *in,
|
||||
int *inlen, int quoteChar);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
htmlIsScriptAttribute(const xmlChar *name);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
htmlHandleOmittedElem(int val);
|
||||
|
||||
#ifdef LIBXML_PUSH_ENABLED
|
||||
/**
|
||||
* Interfaces for the Push mode.
|
||||
*/
|
||||
XMLPUBFUN htmlParserCtxtPtr XMLCALL
|
||||
XMLPUBFUN htmlParserCtxtPtr
|
||||
htmlCreatePushParserCtxt(htmlSAXHandlerPtr sax,
|
||||
void *user_data,
|
||||
const char *chunk,
|
||||
int size,
|
||||
const char *filename,
|
||||
xmlCharEncoding enc);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
htmlParseChunk (htmlParserCtxtPtr ctxt,
|
||||
const char *chunk,
|
||||
int size,
|
||||
int terminate);
|
||||
#endif /* LIBXML_PUSH_ENABLED */
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
htmlFreeParserCtxt (htmlParserCtxtPtr ctxt);
|
||||
|
||||
/*
|
||||
@@ -188,63 +219,63 @@ typedef enum {
|
||||
HTML_PARSE_IGNORE_ENC=1<<21 /* ignore internal document encoding hint */
|
||||
} htmlParserOption;
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
htmlCtxtReset (htmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
htmlCtxtUseOptions (htmlParserCtxtPtr ctxt,
|
||||
int options);
|
||||
XMLPUBFUN htmlDocPtr XMLCALL
|
||||
XMLPUBFUN htmlDocPtr
|
||||
htmlReadDoc (const xmlChar *cur,
|
||||
const char *URL,
|
||||
const char *encoding,
|
||||
int options);
|
||||
XMLPUBFUN htmlDocPtr XMLCALL
|
||||
XMLPUBFUN htmlDocPtr
|
||||
htmlReadFile (const char *URL,
|
||||
const char *encoding,
|
||||
int options);
|
||||
XMLPUBFUN htmlDocPtr XMLCALL
|
||||
XMLPUBFUN htmlDocPtr
|
||||
htmlReadMemory (const char *buffer,
|
||||
int size,
|
||||
const char *URL,
|
||||
const char *encoding,
|
||||
int options);
|
||||
XMLPUBFUN htmlDocPtr XMLCALL
|
||||
XMLPUBFUN htmlDocPtr
|
||||
htmlReadFd (int fd,
|
||||
const char *URL,
|
||||
const char *encoding,
|
||||
int options);
|
||||
XMLPUBFUN htmlDocPtr XMLCALL
|
||||
XMLPUBFUN htmlDocPtr
|
||||
htmlReadIO (xmlInputReadCallback ioread,
|
||||
xmlInputCloseCallback ioclose,
|
||||
void *ioctx,
|
||||
const char *URL,
|
||||
const char *encoding,
|
||||
int options);
|
||||
XMLPUBFUN htmlDocPtr XMLCALL
|
||||
XMLPUBFUN htmlDocPtr
|
||||
htmlCtxtReadDoc (xmlParserCtxtPtr ctxt,
|
||||
const xmlChar *cur,
|
||||
const char *URL,
|
||||
const char *encoding,
|
||||
int options);
|
||||
XMLPUBFUN htmlDocPtr XMLCALL
|
||||
XMLPUBFUN htmlDocPtr
|
||||
htmlCtxtReadFile (xmlParserCtxtPtr ctxt,
|
||||
const char *filename,
|
||||
const char *encoding,
|
||||
int options);
|
||||
XMLPUBFUN htmlDocPtr XMLCALL
|
||||
XMLPUBFUN htmlDocPtr
|
||||
htmlCtxtReadMemory (xmlParserCtxtPtr ctxt,
|
||||
const char *buffer,
|
||||
int size,
|
||||
const char *URL,
|
||||
const char *encoding,
|
||||
int options);
|
||||
XMLPUBFUN htmlDocPtr XMLCALL
|
||||
XMLPUBFUN htmlDocPtr
|
||||
htmlCtxtReadFd (xmlParserCtxtPtr ctxt,
|
||||
int fd,
|
||||
const char *URL,
|
||||
const char *encoding,
|
||||
int options);
|
||||
XMLPUBFUN htmlDocPtr XMLCALL
|
||||
XMLPUBFUN htmlDocPtr
|
||||
htmlCtxtReadIO (xmlParserCtxtPtr ctxt,
|
||||
xmlInputReadCallback ioread,
|
||||
xmlInputCloseCallback ioclose,
|
||||
@@ -266,10 +297,10 @@ typedef enum {
|
||||
/* Using htmlElemDesc rather than name here, to emphasise the fact
|
||||
that otherwise there's a lookup overhead
|
||||
*/
|
||||
XMLPUBFUN htmlStatus XMLCALL htmlAttrAllowed(const htmlElemDesc*, const xmlChar*, int) ;
|
||||
XMLPUBFUN int XMLCALL htmlElementAllowedHere(const htmlElemDesc*, const xmlChar*) ;
|
||||
XMLPUBFUN htmlStatus XMLCALL htmlElementStatusHere(const htmlElemDesc*, const htmlElemDesc*) ;
|
||||
XMLPUBFUN htmlStatus XMLCALL htmlNodeStatus(const htmlNodePtr, int) ;
|
||||
XMLPUBFUN htmlStatus htmlAttrAllowed(const htmlElemDesc*, const xmlChar*, int) ;
|
||||
XMLPUBFUN int htmlElementAllowedHere(const htmlElemDesc*, const xmlChar*) ;
|
||||
XMLPUBFUN htmlStatus htmlElementStatusHere(const htmlElemDesc*, const htmlElemDesc*) ;
|
||||
XMLPUBFUN htmlStatus htmlNodeStatus(const htmlNodePtr, int) ;
|
||||
/**
|
||||
* htmlDefaultSubelement:
|
||||
* @elt: HTML element
|
||||
@@ -302,5 +333,11 @@ XMLPUBFUN htmlStatus XMLCALL htmlNodeStatus(const htmlNodePtr, int) ;
|
||||
}
|
||||
#endif
|
||||
|
||||
#else /* LIBXML_HTML_ENABLED */
|
||||
|
||||
/** DOC_DISABLE */
|
||||
#define XML_GLOBALS_HTML
|
||||
/** DOC_ENABLE */
|
||||
|
||||
#endif /* LIBXML_HTML_ENABLED */
|
||||
#endif /* __HTML_PARSER_H__ */
|
||||
Vendored
+18
-18
@@ -59,73 +59,73 @@ extern "C" {
|
||||
*/
|
||||
#define HTML_PI_NODE XML_PI_NODE
|
||||
|
||||
XMLPUBFUN htmlDocPtr XMLCALL
|
||||
XMLPUBFUN htmlDocPtr
|
||||
htmlNewDoc (const xmlChar *URI,
|
||||
const xmlChar *ExternalID);
|
||||
XMLPUBFUN htmlDocPtr XMLCALL
|
||||
XMLPUBFUN htmlDocPtr
|
||||
htmlNewDocNoDtD (const xmlChar *URI,
|
||||
const xmlChar *ExternalID);
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
XMLPUBFUN const xmlChar *
|
||||
htmlGetMetaEncoding (htmlDocPtr doc);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
htmlSetMetaEncoding (htmlDocPtr doc,
|
||||
const xmlChar *encoding);
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
htmlDocDumpMemory (xmlDocPtr cur,
|
||||
xmlChar **mem,
|
||||
int *size);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
htmlDocDumpMemoryFormat (xmlDocPtr cur,
|
||||
xmlChar **mem,
|
||||
int *size,
|
||||
int format);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
htmlDocDump (FILE *f,
|
||||
xmlDocPtr cur);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
htmlSaveFile (const char *filename,
|
||||
xmlDocPtr cur);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
htmlNodeDump (xmlBufferPtr buf,
|
||||
xmlDocPtr doc,
|
||||
xmlNodePtr cur);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
htmlNodeDumpFile (FILE *out,
|
||||
xmlDocPtr doc,
|
||||
xmlNodePtr cur);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
htmlNodeDumpFileFormat (FILE *out,
|
||||
xmlDocPtr doc,
|
||||
xmlNodePtr cur,
|
||||
const char *encoding,
|
||||
int format);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
htmlSaveFileEnc (const char *filename,
|
||||
xmlDocPtr cur,
|
||||
const char *encoding);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
htmlSaveFileFormat (const char *filename,
|
||||
xmlDocPtr cur,
|
||||
const char *encoding,
|
||||
int format);
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf,
|
||||
xmlDocPtr doc,
|
||||
xmlNodePtr cur,
|
||||
const char *encoding,
|
||||
int format);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
htmlDocContentDumpOutput(xmlOutputBufferPtr buf,
|
||||
xmlDocPtr cur,
|
||||
const char *encoding);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
htmlDocContentDumpFormatOutput(xmlOutputBufferPtr buf,
|
||||
xmlDocPtr cur,
|
||||
const char *encoding,
|
||||
int format);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
htmlNodeDumpOutput (xmlOutputBufferPtr buf,
|
||||
xmlDocPtr doc,
|
||||
xmlNodePtr cur,
|
||||
@@ -133,7 +133,7 @@ XMLPUBFUN void XMLCALL
|
||||
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
htmlIsBooleanAttr (const xmlChar *name);
|
||||
|
||||
|
||||
+36
-38
@@ -12,8 +12,6 @@
|
||||
#ifndef __XML_SAX_H__
|
||||
#define __XML_SAX_H__
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <libxml/xmlversion.h>
|
||||
#include <libxml/parser.h>
|
||||
|
||||
@@ -23,61 +21,61 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
XMLPUBFUN const xmlChar *
|
||||
getPublicId (void *ctx);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
XMLPUBFUN const xmlChar *
|
||||
getSystemId (void *ctx);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
setDocumentLocator (void *ctx,
|
||||
xmlSAXLocatorPtr loc);
|
||||
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
getLineNumber (void *ctx);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
getColumnNumber (void *ctx);
|
||||
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
isStandalone (void *ctx);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
hasInternalSubset (void *ctx);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
hasExternalSubset (void *ctx);
|
||||
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
internalSubset (void *ctx,
|
||||
const xmlChar *name,
|
||||
const xmlChar *ExternalID,
|
||||
const xmlChar *SystemID);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
externalSubset (void *ctx,
|
||||
const xmlChar *name,
|
||||
const xmlChar *ExternalID,
|
||||
const xmlChar *SystemID);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlEntityPtr XMLCALL
|
||||
XMLPUBFUN xmlEntityPtr
|
||||
getEntity (void *ctx,
|
||||
const xmlChar *name);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlEntityPtr XMLCALL
|
||||
XMLPUBFUN xmlEntityPtr
|
||||
getParameterEntity (void *ctx,
|
||||
const xmlChar *name);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlParserInputPtr XMLCALL
|
||||
XMLPUBFUN xmlParserInputPtr
|
||||
resolveEntity (void *ctx,
|
||||
const xmlChar *publicId,
|
||||
const xmlChar *systemId);
|
||||
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
entityDecl (void *ctx,
|
||||
const xmlChar *name,
|
||||
int type,
|
||||
@@ -85,7 +83,7 @@ XMLPUBFUN void XMLCALL
|
||||
const xmlChar *systemId,
|
||||
xmlChar *content);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
attributeDecl (void *ctx,
|
||||
const xmlChar *elem,
|
||||
const xmlChar *fullname,
|
||||
@@ -94,19 +92,19 @@ XMLPUBFUN void XMLCALL
|
||||
const xmlChar *defaultValue,
|
||||
xmlEnumerationPtr tree);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
elementDecl (void *ctx,
|
||||
const xmlChar *name,
|
||||
int type,
|
||||
xmlElementContentPtr content);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
notationDecl (void *ctx,
|
||||
const xmlChar *name,
|
||||
const xmlChar *publicId,
|
||||
const xmlChar *systemId);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
unparsedEntityDecl (void *ctx,
|
||||
const xmlChar *name,
|
||||
const xmlChar *publicId,
|
||||
@@ -114,83 +112,83 @@ XMLPUBFUN void XMLCALL
|
||||
const xmlChar *notationName);
|
||||
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
startDocument (void *ctx);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
endDocument (void *ctx);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
attribute (void *ctx,
|
||||
const xmlChar *fullname,
|
||||
const xmlChar *value);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
startElement (void *ctx,
|
||||
const xmlChar *fullname,
|
||||
const xmlChar **atts);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
endElement (void *ctx,
|
||||
const xmlChar *name);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
reference (void *ctx,
|
||||
const xmlChar *name);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
characters (void *ctx,
|
||||
const xmlChar *ch,
|
||||
int len);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
ignorableWhitespace (void *ctx,
|
||||
const xmlChar *ch,
|
||||
int len);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
processingInstruction (void *ctx,
|
||||
const xmlChar *target,
|
||||
const xmlChar *data);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
globalNamespace (void *ctx,
|
||||
const xmlChar *href,
|
||||
const xmlChar *prefix);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
setNamespace (void *ctx,
|
||||
const xmlChar *name);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlNsPtr XMLCALL
|
||||
XMLPUBFUN xmlNsPtr
|
||||
getNamespace (void *ctx);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
checkNamespace (void *ctx,
|
||||
xmlChar *nameSpace);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
namespaceDecl (void *ctx,
|
||||
const xmlChar *href,
|
||||
const xmlChar *prefix);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
comment (void *ctx,
|
||||
const xmlChar *value);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
cdataBlock (void *ctx,
|
||||
const xmlChar *value,
|
||||
int len);
|
||||
|
||||
#ifdef LIBXML_SAX1_ENABLED
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
initxmlDefaultSAXHandler (xmlSAXHandlerV1 *hdlr,
|
||||
int warning);
|
||||
#ifdef LIBXML_HTML_ENABLED
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
inithtmlDefaultSAXHandler (xmlSAXHandlerV1 *hdlr);
|
||||
#endif
|
||||
#endif /* LIBXML_SAX1_ENABLED */
|
||||
+37
-38
@@ -12,63 +12,61 @@
|
||||
#ifndef __XML_SAX2_H__
|
||||
#define __XML_SAX2_H__
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <libxml/xmlversion.h>
|
||||
#include <libxml/parser.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
XMLPUBFUN const xmlChar *
|
||||
xmlSAX2GetPublicId (void *ctx);
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
XMLPUBFUN const xmlChar *
|
||||
xmlSAX2GetSystemId (void *ctx);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlSAX2SetDocumentLocator (void *ctx,
|
||||
xmlSAXLocatorPtr loc);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlSAX2GetLineNumber (void *ctx);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlSAX2GetColumnNumber (void *ctx);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlSAX2IsStandalone (void *ctx);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlSAX2HasInternalSubset (void *ctx);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlSAX2HasExternalSubset (void *ctx);
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlSAX2InternalSubset (void *ctx,
|
||||
const xmlChar *name,
|
||||
const xmlChar *ExternalID,
|
||||
const xmlChar *SystemID);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlSAX2ExternalSubset (void *ctx,
|
||||
const xmlChar *name,
|
||||
const xmlChar *ExternalID,
|
||||
const xmlChar *SystemID);
|
||||
XMLPUBFUN xmlEntityPtr XMLCALL
|
||||
XMLPUBFUN xmlEntityPtr
|
||||
xmlSAX2GetEntity (void *ctx,
|
||||
const xmlChar *name);
|
||||
XMLPUBFUN xmlEntityPtr XMLCALL
|
||||
XMLPUBFUN xmlEntityPtr
|
||||
xmlSAX2GetParameterEntity (void *ctx,
|
||||
const xmlChar *name);
|
||||
XMLPUBFUN xmlParserInputPtr XMLCALL
|
||||
XMLPUBFUN xmlParserInputPtr
|
||||
xmlSAX2ResolveEntity (void *ctx,
|
||||
const xmlChar *publicId,
|
||||
const xmlChar *systemId);
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlSAX2EntityDecl (void *ctx,
|
||||
const xmlChar *name,
|
||||
int type,
|
||||
const xmlChar *publicId,
|
||||
const xmlChar *systemId,
|
||||
xmlChar *content);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlSAX2AttributeDecl (void *ctx,
|
||||
const xmlChar *elem,
|
||||
const xmlChar *fullname,
|
||||
@@ -76,38 +74,38 @@ XMLPUBFUN void XMLCALL
|
||||
int def,
|
||||
const xmlChar *defaultValue,
|
||||
xmlEnumerationPtr tree);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlSAX2ElementDecl (void *ctx,
|
||||
const xmlChar *name,
|
||||
int type,
|
||||
xmlElementContentPtr content);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlSAX2NotationDecl (void *ctx,
|
||||
const xmlChar *name,
|
||||
const xmlChar *publicId,
|
||||
const xmlChar *systemId);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlSAX2UnparsedEntityDecl (void *ctx,
|
||||
const xmlChar *name,
|
||||
const xmlChar *publicId,
|
||||
const xmlChar *systemId,
|
||||
const xmlChar *notationName);
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlSAX2StartDocument (void *ctx);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlSAX2EndDocument (void *ctx);
|
||||
#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || \
|
||||
defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_LEGACY_ENABLED)
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlSAX2StartElement (void *ctx,
|
||||
const xmlChar *fullname,
|
||||
const xmlChar **atts);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlSAX2EndElement (void *ctx,
|
||||
const xmlChar *name);
|
||||
#endif /* LIBXML_SAX1_ENABLED or LIBXML_HTML_ENABLED or LIBXML_LEGACY_ENABLED */
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlSAX2StartElementNs (void *ctx,
|
||||
const xmlChar *localname,
|
||||
const xmlChar *prefix,
|
||||
@@ -117,54 +115,55 @@ XMLPUBFUN void XMLCALL
|
||||
int nb_attributes,
|
||||
int nb_defaulted,
|
||||
const xmlChar **attributes);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlSAX2EndElementNs (void *ctx,
|
||||
const xmlChar *localname,
|
||||
const xmlChar *prefix,
|
||||
const xmlChar *URI);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlSAX2Reference (void *ctx,
|
||||
const xmlChar *name);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlSAX2Characters (void *ctx,
|
||||
const xmlChar *ch,
|
||||
int len);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlSAX2IgnorableWhitespace (void *ctx,
|
||||
const xmlChar *ch,
|
||||
int len);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlSAX2ProcessingInstruction (void *ctx,
|
||||
const xmlChar *target,
|
||||
const xmlChar *data);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlSAX2Comment (void *ctx,
|
||||
const xmlChar *value);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlSAX2CDataBlock (void *ctx,
|
||||
const xmlChar *value,
|
||||
int len);
|
||||
|
||||
#ifdef LIBXML_SAX1_ENABLED
|
||||
XMLPUBFUN int XMLCALL
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlSAXDefaultVersion (int version);
|
||||
#endif /* LIBXML_SAX1_ENABLED */
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlSAXVersion (xmlSAXHandler *hdlr,
|
||||
int version);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlSAX2InitDefaultSAXHandler (xmlSAXHandler *hdlr,
|
||||
int warning);
|
||||
#ifdef LIBXML_HTML_ENABLED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlSAX2InitHtmlDefaultSAXHandler(xmlSAXHandler *hdlr);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
htmlDefaultSAXHandlerInit (void);
|
||||
#endif
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlDefaultSAXHandlerInit (void);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
Vendored
+36
-36
@@ -66,113 +66,113 @@ typedef xmlCatalog *xmlCatalogPtr;
|
||||
/*
|
||||
* Operations on a given catalog.
|
||||
*/
|
||||
XMLPUBFUN xmlCatalogPtr XMLCALL
|
||||
XMLPUBFUN xmlCatalogPtr
|
||||
xmlNewCatalog (int sgml);
|
||||
XMLPUBFUN xmlCatalogPtr XMLCALL
|
||||
XMLPUBFUN xmlCatalogPtr
|
||||
xmlLoadACatalog (const char *filename);
|
||||
XMLPUBFUN xmlCatalogPtr XMLCALL
|
||||
XMLPUBFUN xmlCatalogPtr
|
||||
xmlLoadSGMLSuperCatalog (const char *filename);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlConvertSGMLCatalog (xmlCatalogPtr catal);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlACatalogAdd (xmlCatalogPtr catal,
|
||||
const xmlChar *type,
|
||||
const xmlChar *orig,
|
||||
const xmlChar *replace);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlACatalogRemove (xmlCatalogPtr catal,
|
||||
const xmlChar *value);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlACatalogResolve (xmlCatalogPtr catal,
|
||||
const xmlChar *pubID,
|
||||
const xmlChar *sysID);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlACatalogResolveSystem(xmlCatalogPtr catal,
|
||||
const xmlChar *sysID);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlACatalogResolvePublic(xmlCatalogPtr catal,
|
||||
const xmlChar *pubID);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlACatalogResolveURI (xmlCatalogPtr catal,
|
||||
const xmlChar *URI);
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlACatalogDump (xmlCatalogPtr catal,
|
||||
FILE *out);
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlFreeCatalog (xmlCatalogPtr catal);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlCatalogIsEmpty (xmlCatalogPtr catal);
|
||||
|
||||
/*
|
||||
* Global operations.
|
||||
*/
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlInitializeCatalog (void);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlLoadCatalog (const char *filename);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlLoadCatalogs (const char *paths);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlCatalogCleanup (void);
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlCatalogDump (FILE *out);
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlCatalogResolve (const xmlChar *pubID,
|
||||
const xmlChar *sysID);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlCatalogResolveSystem (const xmlChar *sysID);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlCatalogResolvePublic (const xmlChar *pubID);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlCatalogResolveURI (const xmlChar *URI);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlCatalogAdd (const xmlChar *type,
|
||||
const xmlChar *orig,
|
||||
const xmlChar *replace);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlCatalogRemove (const xmlChar *value);
|
||||
XMLPUBFUN xmlDocPtr XMLCALL
|
||||
XMLPUBFUN xmlDocPtr
|
||||
xmlParseCatalogFile (const char *filename);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlCatalogConvert (void);
|
||||
|
||||
/*
|
||||
* Strictly minimal interfaces for per-document catalogs used
|
||||
* by the parser.
|
||||
*/
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlCatalogFreeLocal (void *catalogs);
|
||||
XMLPUBFUN void * XMLCALL
|
||||
XMLPUBFUN void *
|
||||
xmlCatalogAddLocal (void *catalogs,
|
||||
const xmlChar *URL);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlCatalogLocalResolve (void *catalogs,
|
||||
const xmlChar *pubID,
|
||||
const xmlChar *sysID);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlCatalogLocalResolveURI(void *catalogs,
|
||||
const xmlChar *URI);
|
||||
/*
|
||||
* Preference settings.
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlCatalogSetDebug (int level);
|
||||
XMLPUBFUN xmlCatalogPrefer XMLCALL
|
||||
XMLPUBFUN xmlCatalogPrefer
|
||||
xmlCatalogSetDefaultPrefer(xmlCatalogPrefer prefer);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlCatalogSetDefaults (xmlCatalogAllow allow);
|
||||
XMLPUBFUN xmlCatalogAllow XMLCALL
|
||||
XMLPUBFUN xmlCatalogAllow
|
||||
xmlCatalogGetDefaults (void);
|
||||
|
||||
|
||||
/* DEPRECATED interfaces */
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
XMLPUBFUN const xmlChar *
|
||||
xmlCatalogGetSystem (const xmlChar *sysID);
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
XMLPUBFUN const xmlChar *
|
||||
xmlCatalogGetPublic (const xmlChar *pubID);
|
||||
|
||||
#ifdef __cplusplus
|
||||
Vendored
+9
-9
@@ -51,7 +51,7 @@ struct _xmlChRangeGroup {
|
||||
/**
|
||||
* Range checking routine
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlCharInRange(unsigned int val, const xmlChRangeGroup *group);
|
||||
|
||||
|
||||
@@ -207,21 +207,21 @@ XMLPUBVAR const unsigned char xmlIsPubidChar_tab[256];
|
||||
#define xmlIsPubidCharQ(c) (((c) < 0x100) ? \
|
||||
xmlIsPubidChar_ch((c)) : 0)
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlIsBaseChar(unsigned int ch);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlIsBlank(unsigned int ch);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlIsChar(unsigned int ch);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlIsCombining(unsigned int ch);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlIsDigit(unsigned int ch);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlIsExtender(unsigned int ch);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlIsIdeographic(unsigned int ch);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlIsPubidChar(unsigned int ch);
|
||||
|
||||
#ifdef __cplusplus
|
||||
Vendored
+28
-28
@@ -25,39 +25,39 @@ extern "C" {
|
||||
/*
|
||||
* The standard Dump routines.
|
||||
*/
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlDebugDumpString (FILE *output,
|
||||
const xmlChar *str);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlDebugDumpAttr (FILE *output,
|
||||
xmlAttrPtr attr,
|
||||
int depth);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlDebugDumpAttrList (FILE *output,
|
||||
xmlAttrPtr attr,
|
||||
int depth);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlDebugDumpOneNode (FILE *output,
|
||||
xmlNodePtr node,
|
||||
int depth);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlDebugDumpNode (FILE *output,
|
||||
xmlNodePtr node,
|
||||
int depth);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlDebugDumpNodeList (FILE *output,
|
||||
xmlNodePtr node,
|
||||
int depth);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlDebugDumpDocumentHead(FILE *output,
|
||||
xmlDocPtr doc);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlDebugDumpDocument (FILE *output,
|
||||
xmlDocPtr doc);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlDebugDumpDTD (FILE *output,
|
||||
xmlDtdPtr dtd);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlDebugDumpEntities (FILE *output,
|
||||
xmlDocPtr doc);
|
||||
|
||||
@@ -67,7 +67,7 @@ XMLPUBFUN void XMLCALL
|
||||
* *
|
||||
****************************************************************/
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlDebugCheckDocument (FILE * output,
|
||||
xmlDocPtr doc);
|
||||
|
||||
@@ -77,12 +77,12 @@ XMLPUBFUN int XMLCALL
|
||||
* *
|
||||
****************************************************************/
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlLsOneNode (FILE *output, xmlNodePtr node);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlLsCountNode (xmlNodePtr node);
|
||||
|
||||
XMLPUBFUN const char * XMLCALL
|
||||
XMLPUBFUN const char *
|
||||
xmlBoolToText (int boolval);
|
||||
|
||||
/****************************************************************
|
||||
@@ -136,63 +136,63 @@ typedef int (* xmlShellCmd) (xmlShellCtxtPtr ctxt,
|
||||
xmlNodePtr node,
|
||||
xmlNodePtr node2);
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlShellPrintXPathError (int errorType,
|
||||
const char *arg);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlShellPrintXPathResult(xmlXPathObjectPtr list);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlShellList (xmlShellCtxtPtr ctxt,
|
||||
char *arg,
|
||||
xmlNodePtr node,
|
||||
xmlNodePtr node2);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlShellBase (xmlShellCtxtPtr ctxt,
|
||||
char *arg,
|
||||
xmlNodePtr node,
|
||||
xmlNodePtr node2);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlShellDir (xmlShellCtxtPtr ctxt,
|
||||
char *arg,
|
||||
xmlNodePtr node,
|
||||
xmlNodePtr node2);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlShellLoad (xmlShellCtxtPtr ctxt,
|
||||
char *filename,
|
||||
xmlNodePtr node,
|
||||
xmlNodePtr node2);
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlShellPrintNode (xmlNodePtr node);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlShellCat (xmlShellCtxtPtr ctxt,
|
||||
char *arg,
|
||||
xmlNodePtr node,
|
||||
xmlNodePtr node2);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlShellWrite (xmlShellCtxtPtr ctxt,
|
||||
char *filename,
|
||||
xmlNodePtr node,
|
||||
xmlNodePtr node2);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlShellSave (xmlShellCtxtPtr ctxt,
|
||||
char *filename,
|
||||
xmlNodePtr node,
|
||||
xmlNodePtr node2);
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
#ifdef LIBXML_VALID_ENABLED
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlShellValidate (xmlShellCtxtPtr ctxt,
|
||||
char *dtd,
|
||||
xmlNodePtr node,
|
||||
xmlNodePtr node2);
|
||||
#endif /* LIBXML_VALID_ENABLED */
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlShellDu (xmlShellCtxtPtr ctxt,
|
||||
char *arg,
|
||||
xmlNodePtr tree,
|
||||
xmlNodePtr node2);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlShellPwd (xmlShellCtxtPtr ctxt,
|
||||
char *buffer,
|
||||
xmlNodePtr node,
|
||||
@@ -201,7 +201,7 @@ XMLPUBFUN int XMLCALL
|
||||
/*
|
||||
* The Shell interface.
|
||||
*/
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlShell (xmlDocPtr doc,
|
||||
char *filename,
|
||||
xmlShellReadlineFunc input,
|
||||
+14
-13
@@ -13,6 +13,7 @@
|
||||
|
||||
#include <stddef.h>
|
||||
#include <libxml/xmlversion.h>
|
||||
#include <libxml/xmlstring.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -28,51 +29,51 @@ typedef xmlDict *xmlDictPtr;
|
||||
* Initializer
|
||||
*/
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int XMLCALL xmlInitializeDict(void);
|
||||
XMLPUBFUN int xmlInitializeDict(void);
|
||||
|
||||
/*
|
||||
* Constructor and destructor.
|
||||
*/
|
||||
XMLPUBFUN xmlDictPtr XMLCALL
|
||||
XMLPUBFUN xmlDictPtr
|
||||
xmlDictCreate (void);
|
||||
XMLPUBFUN size_t XMLCALL
|
||||
XMLPUBFUN size_t
|
||||
xmlDictSetLimit (xmlDictPtr dict,
|
||||
size_t limit);
|
||||
XMLPUBFUN size_t XMLCALL
|
||||
XMLPUBFUN size_t
|
||||
xmlDictGetUsage (xmlDictPtr dict);
|
||||
XMLPUBFUN xmlDictPtr XMLCALL
|
||||
XMLPUBFUN xmlDictPtr
|
||||
xmlDictCreateSub(xmlDictPtr sub);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlDictReference(xmlDictPtr dict);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlDictFree (xmlDictPtr dict);
|
||||
|
||||
/*
|
||||
* Lookup of entry in the dictionary.
|
||||
*/
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
XMLPUBFUN const xmlChar *
|
||||
xmlDictLookup (xmlDictPtr dict,
|
||||
const xmlChar *name,
|
||||
int len);
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
XMLPUBFUN const xmlChar *
|
||||
xmlDictExists (xmlDictPtr dict,
|
||||
const xmlChar *name,
|
||||
int len);
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
XMLPUBFUN const xmlChar *
|
||||
xmlDictQLookup (xmlDictPtr dict,
|
||||
const xmlChar *prefix,
|
||||
const xmlChar *name);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlDictOwns (xmlDictPtr dict,
|
||||
const xmlChar *str);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlDictSize (xmlDictPtr dict);
|
||||
|
||||
/*
|
||||
* Cleanup function
|
||||
*/
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlDictCleanup (void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
Vendored
+36
-33
@@ -32,6 +32,15 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef enum {
|
||||
XML_ENC_ERR_SUCCESS = 0,
|
||||
XML_ENC_ERR_SPACE = -1,
|
||||
XML_ENC_ERR_INPUT = -2,
|
||||
XML_ENC_ERR_PARTIAL = -3,
|
||||
XML_ENC_ERR_INTERNAL = -4,
|
||||
XML_ENC_ERR_MEMORY = -5
|
||||
} xmlCharEncError;
|
||||
|
||||
/*
|
||||
* xmlCharEncoding:
|
||||
*
|
||||
@@ -142,30 +151,22 @@ struct _xmlCharEncodingHandler {
|
||||
#endif /* LIBXML_ICU_ENABLED */
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include <libxml/tree.h>
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Interfaces for encoding handlers.
|
||||
*/
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlInitCharEncodingHandlers (void);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlCleanupCharEncodingHandlers (void);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlRegisterCharEncodingHandler (xmlCharEncodingHandlerPtr handler);
|
||||
XMLPUBFUN xmlCharEncodingHandlerPtr XMLCALL
|
||||
XMLPUBFUN xmlCharEncodingHandlerPtr
|
||||
xmlGetCharEncodingHandler (xmlCharEncoding enc);
|
||||
XMLPUBFUN xmlCharEncodingHandlerPtr XMLCALL
|
||||
XMLPUBFUN xmlCharEncodingHandlerPtr
|
||||
xmlFindCharEncodingHandler (const char *name);
|
||||
XMLPUBFUN xmlCharEncodingHandlerPtr XMLCALL
|
||||
XMLPUBFUN xmlCharEncodingHandlerPtr
|
||||
xmlNewCharEncodingHandler (const char *name,
|
||||
xmlCharEncodingInputFunc input,
|
||||
xmlCharEncodingOutputFunc output);
|
||||
@@ -173,54 +174,56 @@ XMLPUBFUN xmlCharEncodingHandlerPtr XMLCALL
|
||||
/*
|
||||
* Interfaces for encoding names and aliases.
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlAddEncodingAlias (const char *name,
|
||||
const char *alias);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlDelEncodingAlias (const char *alias);
|
||||
XMLPUBFUN const char * XMLCALL
|
||||
XMLPUBFUN const char *
|
||||
xmlGetEncodingAlias (const char *alias);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlCleanupEncodingAliases (void);
|
||||
XMLPUBFUN xmlCharEncoding XMLCALL
|
||||
XMLPUBFUN xmlCharEncoding
|
||||
xmlParseCharEncoding (const char *name);
|
||||
XMLPUBFUN const char * XMLCALL
|
||||
XMLPUBFUN const char *
|
||||
xmlGetCharEncodingName (xmlCharEncoding enc);
|
||||
|
||||
/*
|
||||
* Interfaces directly used by the parsers.
|
||||
*/
|
||||
XMLPUBFUN xmlCharEncoding XMLCALL
|
||||
XMLPUBFUN xmlCharEncoding
|
||||
xmlDetectCharEncoding (const unsigned char *in,
|
||||
int len);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
struct _xmlBuffer;
|
||||
XMLPUBFUN int
|
||||
xmlCharEncOutFunc (xmlCharEncodingHandler *handler,
|
||||
xmlBufferPtr out,
|
||||
xmlBufferPtr in);
|
||||
struct _xmlBuffer *out,
|
||||
struct _xmlBuffer *in);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlCharEncInFunc (xmlCharEncodingHandler *handler,
|
||||
xmlBufferPtr out,
|
||||
xmlBufferPtr in);
|
||||
XMLPUBFUN int XMLCALL
|
||||
struct _xmlBuffer *out,
|
||||
struct _xmlBuffer *in);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlCharEncFirstLine (xmlCharEncodingHandler *handler,
|
||||
xmlBufferPtr out,
|
||||
xmlBufferPtr in);
|
||||
XMLPUBFUN int XMLCALL
|
||||
struct _xmlBuffer *out,
|
||||
struct _xmlBuffer *in);
|
||||
XMLPUBFUN int
|
||||
xmlCharEncCloseFunc (xmlCharEncodingHandler *handler);
|
||||
|
||||
/*
|
||||
* Export a few useful functions
|
||||
*/
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
UTF8Toisolat1 (unsigned char *out,
|
||||
int *outlen,
|
||||
const unsigned char *in,
|
||||
int *inlen);
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
isolat1ToUTF8 (unsigned char *out,
|
||||
int *outlen,
|
||||
const unsigned char *in,
|
||||
Vendored
+23
-21
@@ -12,7 +12,9 @@
|
||||
#define __XML_ENTITIES_H__
|
||||
|
||||
#include <libxml/xmlversion.h>
|
||||
#define XML_TREE_INTERNALS
|
||||
#include <libxml/tree.h>
|
||||
#undef XML_TREE_INTERNALS
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -56,10 +58,8 @@ struct _xmlEntity {
|
||||
struct _xmlEntity *nexte; /* unused */
|
||||
const xmlChar *URI; /* the full URI as computed */
|
||||
int owner; /* does the entity own the childrens */
|
||||
int checked; /* was the entity content checked */
|
||||
/* this is also used to count entities
|
||||
* references done from that entity
|
||||
* and if it contains '<' */
|
||||
int flags; /* various flags */
|
||||
unsigned long expandedSize; /* expanded size */
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -76,72 +76,74 @@ typedef xmlEntitiesTable *xmlEntitiesTablePtr;
|
||||
|
||||
#ifdef LIBXML_LEGACY_ENABLED
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlInitializePredefinedEntities (void);
|
||||
#endif /* LIBXML_LEGACY_ENABLED */
|
||||
|
||||
XMLPUBFUN xmlEntityPtr XMLCALL
|
||||
XMLPUBFUN xmlEntityPtr
|
||||
xmlNewEntity (xmlDocPtr doc,
|
||||
const xmlChar *name,
|
||||
int type,
|
||||
const xmlChar *ExternalID,
|
||||
const xmlChar *SystemID,
|
||||
const xmlChar *content);
|
||||
XMLPUBFUN xmlEntityPtr XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlFreeEntity (xmlEntityPtr entity);
|
||||
XMLPUBFUN xmlEntityPtr
|
||||
xmlAddDocEntity (xmlDocPtr doc,
|
||||
const xmlChar *name,
|
||||
int type,
|
||||
const xmlChar *ExternalID,
|
||||
const xmlChar *SystemID,
|
||||
const xmlChar *content);
|
||||
XMLPUBFUN xmlEntityPtr XMLCALL
|
||||
XMLPUBFUN xmlEntityPtr
|
||||
xmlAddDtdEntity (xmlDocPtr doc,
|
||||
const xmlChar *name,
|
||||
int type,
|
||||
const xmlChar *ExternalID,
|
||||
const xmlChar *SystemID,
|
||||
const xmlChar *content);
|
||||
XMLPUBFUN xmlEntityPtr XMLCALL
|
||||
XMLPUBFUN xmlEntityPtr
|
||||
xmlGetPredefinedEntity (const xmlChar *name);
|
||||
XMLPUBFUN xmlEntityPtr XMLCALL
|
||||
XMLPUBFUN xmlEntityPtr
|
||||
xmlGetDocEntity (const xmlDoc *doc,
|
||||
const xmlChar *name);
|
||||
XMLPUBFUN xmlEntityPtr XMLCALL
|
||||
XMLPUBFUN xmlEntityPtr
|
||||
xmlGetDtdEntity (xmlDocPtr doc,
|
||||
const xmlChar *name);
|
||||
XMLPUBFUN xmlEntityPtr XMLCALL
|
||||
XMLPUBFUN xmlEntityPtr
|
||||
xmlGetParameterEntity (xmlDocPtr doc,
|
||||
const xmlChar *name);
|
||||
#ifdef LIBXML_LEGACY_ENABLED
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
XMLPUBFUN const xmlChar *
|
||||
xmlEncodeEntities (xmlDocPtr doc,
|
||||
const xmlChar *input);
|
||||
#endif /* LIBXML_LEGACY_ENABLED */
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlEncodeEntitiesReentrant(xmlDocPtr doc,
|
||||
const xmlChar *input);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlEncodeSpecialChars (const xmlDoc *doc,
|
||||
const xmlChar *input);
|
||||
XMLPUBFUN xmlEntitiesTablePtr XMLCALL
|
||||
XMLPUBFUN xmlEntitiesTablePtr
|
||||
xmlCreateEntitiesTable (void);
|
||||
#ifdef LIBXML_TREE_ENABLED
|
||||
XMLPUBFUN xmlEntitiesTablePtr XMLCALL
|
||||
XMLPUBFUN xmlEntitiesTablePtr
|
||||
xmlCopyEntitiesTable (xmlEntitiesTablePtr table);
|
||||
#endif /* LIBXML_TREE_ENABLED */
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlFreeEntitiesTable (xmlEntitiesTablePtr table);
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlDumpEntitiesTable (xmlBufferPtr buf,
|
||||
xmlEntitiesTablePtr table);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlDumpEntityDecl (xmlBufferPtr buf,
|
||||
xmlEntityPtr ent);
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
#ifdef LIBXML_LEGACY_ENABLED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlCleanupPredefinedEntities(void);
|
||||
#endif /* LIBXML_LEGACY_ENABLED */
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* Summary: interface for all global variables of the library
|
||||
* Description: Deprecated, don't use
|
||||
*
|
||||
* Copy: See Copyright for the status of this software.
|
||||
*/
|
||||
|
||||
#ifndef __XML_GLOBALS_H
|
||||
#define __XML_GLOBALS_H
|
||||
|
||||
#include <libxml/xmlversion.h>
|
||||
|
||||
/*
|
||||
* This file was required to access global variables until version v2.12.0.
|
||||
*
|
||||
* These includes are for backward compatibility.
|
||||
*/
|
||||
#include <libxml/HTMLparser.h>
|
||||
#include <libxml/parser.h>
|
||||
#include <libxml/xmlerror.h>
|
||||
#include <libxml/xmlIO.h>
|
||||
#include <libxml/xmlsave.h>
|
||||
#include <libxml/threads.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct _xmlGlobalState xmlGlobalState;
|
||||
typedef xmlGlobalState *xmlGlobalStatePtr;
|
||||
|
||||
XML_DEPRECATED XMLPUBFUN void
|
||||
xmlInitializeGlobalState(xmlGlobalStatePtr gs);
|
||||
XML_DEPRECATED XMLPUBFUN
|
||||
xmlGlobalStatePtr xmlGetGlobalState(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __XML_GLOBALS_H */
|
||||
+82
-86
@@ -11,6 +11,10 @@
|
||||
#ifndef __XML_HASH_H__
|
||||
#define __XML_HASH_H__
|
||||
|
||||
#include <libxml/xmlversion.h>
|
||||
#include <libxml/dict.h>
|
||||
#include <libxml/xmlstring.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@@ -21,18 +25,6 @@ extern "C" {
|
||||
typedef struct _xmlHashTable xmlHashTable;
|
||||
typedef xmlHashTable *xmlHashTablePtr;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#include <libxml/xmlversion.h>
|
||||
#include <libxml/parser.h>
|
||||
#include <libxml/dict.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Recent version of gcc produce a warning when a function pointer is assigned
|
||||
* to an object pointer, or vice versa. The following macro is a dirty hack
|
||||
@@ -55,7 +47,6 @@ extern "C" {
|
||||
|
||||
#define XML_CAST_FPTR(fptr) fptr
|
||||
|
||||
|
||||
/*
|
||||
* function types:
|
||||
*/
|
||||
@@ -103,132 +94,137 @@ typedef void (*xmlHashScannerFull)(void *payload, void *data,
|
||||
/*
|
||||
* Constructor and destructor.
|
||||
*/
|
||||
XMLPUBFUN xmlHashTablePtr XMLCALL
|
||||
xmlHashCreate (int size);
|
||||
XMLPUBFUN xmlHashTablePtr XMLCALL
|
||||
xmlHashCreateDict(int size,
|
||||
XMLPUBFUN xmlHashTablePtr
|
||||
xmlHashCreate (int size);
|
||||
XMLPUBFUN xmlHashTablePtr
|
||||
xmlHashCreateDict (int size,
|
||||
xmlDictPtr dict);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlHashFree (xmlHashTablePtr table,
|
||||
xmlHashDeallocator f);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlHashDefaultDeallocator(void *entry,
|
||||
XMLPUBFUN void
|
||||
xmlHashFree (xmlHashTablePtr hash,
|
||||
xmlHashDeallocator dealloc);
|
||||
XMLPUBFUN void
|
||||
xmlHashDefaultDeallocator(void *entry,
|
||||
const xmlChar *name);
|
||||
|
||||
/*
|
||||
* Add a new entry to the hash table.
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlHashAddEntry (xmlHashTablePtr table,
|
||||
XMLPUBFUN int
|
||||
xmlHashAddEntry (xmlHashTablePtr hash,
|
||||
const xmlChar *name,
|
||||
void *userdata);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlHashUpdateEntry(xmlHashTablePtr table,
|
||||
XMLPUBFUN int
|
||||
xmlHashUpdateEntry (xmlHashTablePtr hash,
|
||||
const xmlChar *name,
|
||||
void *userdata,
|
||||
xmlHashDeallocator f);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlHashAddEntry2(xmlHashTablePtr table,
|
||||
xmlHashDeallocator dealloc);
|
||||
XMLPUBFUN int
|
||||
xmlHashAddEntry2 (xmlHashTablePtr hash,
|
||||
const xmlChar *name,
|
||||
const xmlChar *name2,
|
||||
void *userdata);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlHashUpdateEntry2(xmlHashTablePtr table,
|
||||
XMLPUBFUN int
|
||||
xmlHashUpdateEntry2 (xmlHashTablePtr hash,
|
||||
const xmlChar *name,
|
||||
const xmlChar *name2,
|
||||
void *userdata,
|
||||
xmlHashDeallocator f);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlHashAddEntry3(xmlHashTablePtr table,
|
||||
xmlHashDeallocator dealloc);
|
||||
XMLPUBFUN int
|
||||
xmlHashAddEntry3 (xmlHashTablePtr hash,
|
||||
const xmlChar *name,
|
||||
const xmlChar *name2,
|
||||
const xmlChar *name3,
|
||||
void *userdata);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlHashUpdateEntry3(xmlHashTablePtr table,
|
||||
XMLPUBFUN int
|
||||
xmlHashUpdateEntry3 (xmlHashTablePtr hash,
|
||||
const xmlChar *name,
|
||||
const xmlChar *name2,
|
||||
const xmlChar *name3,
|
||||
void *userdata,
|
||||
xmlHashDeallocator f);
|
||||
xmlHashDeallocator dealloc);
|
||||
|
||||
/*
|
||||
* Remove an entry from the hash table.
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlHashRemoveEntry(xmlHashTablePtr table, const xmlChar *name,
|
||||
xmlHashDeallocator f);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlHashRemoveEntry2(xmlHashTablePtr table, const xmlChar *name,
|
||||
const xmlChar *name2, xmlHashDeallocator f);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlHashRemoveEntry3(xmlHashTablePtr table, const xmlChar *name,
|
||||
const xmlChar *name2, const xmlChar *name3,
|
||||
xmlHashDeallocator f);
|
||||
XMLPUBFUN int
|
||||
xmlHashRemoveEntry (xmlHashTablePtr hash,
|
||||
const xmlChar *name,
|
||||
xmlHashDeallocator dealloc);
|
||||
XMLPUBFUN int
|
||||
xmlHashRemoveEntry2 (xmlHashTablePtr hash,
|
||||
const xmlChar *name,
|
||||
const xmlChar *name2,
|
||||
xmlHashDeallocator dealloc);
|
||||
XMLPUBFUN int
|
||||
xmlHashRemoveEntry3 (xmlHashTablePtr hash,
|
||||
const xmlChar *name,
|
||||
const xmlChar *name2,
|
||||
const xmlChar *name3,
|
||||
xmlHashDeallocator dealloc);
|
||||
|
||||
/*
|
||||
* Retrieve the userdata.
|
||||
* Retrieve the payload.
|
||||
*/
|
||||
XMLPUBFUN void * XMLCALL
|
||||
xmlHashLookup (xmlHashTablePtr table,
|
||||
XMLPUBFUN void *
|
||||
xmlHashLookup (xmlHashTablePtr hash,
|
||||
const xmlChar *name);
|
||||
XMLPUBFUN void * XMLCALL
|
||||
xmlHashLookup2 (xmlHashTablePtr table,
|
||||
XMLPUBFUN void *
|
||||
xmlHashLookup2 (xmlHashTablePtr hash,
|
||||
const xmlChar *name,
|
||||
const xmlChar *name2);
|
||||
XMLPUBFUN void * XMLCALL
|
||||
xmlHashLookup3 (xmlHashTablePtr table,
|
||||
XMLPUBFUN void *
|
||||
xmlHashLookup3 (xmlHashTablePtr hash,
|
||||
const xmlChar *name,
|
||||
const xmlChar *name2,
|
||||
const xmlChar *name3);
|
||||
XMLPUBFUN void * XMLCALL
|
||||
xmlHashQLookup (xmlHashTablePtr table,
|
||||
const xmlChar *name,
|
||||
const xmlChar *prefix);
|
||||
XMLPUBFUN void * XMLCALL
|
||||
xmlHashQLookup2 (xmlHashTablePtr table,
|
||||
const xmlChar *name,
|
||||
XMLPUBFUN void *
|
||||
xmlHashQLookup (xmlHashTablePtr hash,
|
||||
const xmlChar *prefix,
|
||||
const xmlChar *name2,
|
||||
const xmlChar *prefix2);
|
||||
XMLPUBFUN void * XMLCALL
|
||||
xmlHashQLookup3 (xmlHashTablePtr table,
|
||||
const xmlChar *name,
|
||||
const xmlChar *name);
|
||||
XMLPUBFUN void *
|
||||
xmlHashQLookup2 (xmlHashTablePtr hash,
|
||||
const xmlChar *prefix,
|
||||
const xmlChar *name2,
|
||||
const xmlChar *name,
|
||||
const xmlChar *prefix2,
|
||||
const xmlChar *name3,
|
||||
const xmlChar *prefix3);
|
||||
const xmlChar *name2);
|
||||
XMLPUBFUN void *
|
||||
xmlHashQLookup3 (xmlHashTablePtr hash,
|
||||
const xmlChar *prefix,
|
||||
const xmlChar *name,
|
||||
const xmlChar *prefix2,
|
||||
const xmlChar *name2,
|
||||
const xmlChar *prefix3,
|
||||
const xmlChar *name3);
|
||||
|
||||
/*
|
||||
* Helpers.
|
||||
*/
|
||||
XMLPUBFUN xmlHashTablePtr XMLCALL
|
||||
xmlHashCopy (xmlHashTablePtr table,
|
||||
xmlHashCopier f);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlHashSize (xmlHashTablePtr table);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlHashScan (xmlHashTablePtr table,
|
||||
xmlHashScanner f,
|
||||
XMLPUBFUN xmlHashTablePtr
|
||||
xmlHashCopy (xmlHashTablePtr hash,
|
||||
xmlHashCopier copy);
|
||||
XMLPUBFUN int
|
||||
xmlHashSize (xmlHashTablePtr hash);
|
||||
XMLPUBFUN void
|
||||
xmlHashScan (xmlHashTablePtr hash,
|
||||
xmlHashScanner scan,
|
||||
void *data);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlHashScan3 (xmlHashTablePtr table,
|
||||
XMLPUBFUN void
|
||||
xmlHashScan3 (xmlHashTablePtr hash,
|
||||
const xmlChar *name,
|
||||
const xmlChar *name2,
|
||||
const xmlChar *name3,
|
||||
xmlHashScanner f,
|
||||
xmlHashScanner scan,
|
||||
void *data);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlHashScanFull (xmlHashTablePtr table,
|
||||
xmlHashScannerFull f,
|
||||
XMLPUBFUN void
|
||||
xmlHashScanFull (xmlHashTablePtr hash,
|
||||
xmlHashScannerFull scan,
|
||||
void *data);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlHashScanFull3(xmlHashTablePtr table,
|
||||
XMLPUBFUN void
|
||||
xmlHashScanFull3 (xmlHashTablePtr hash,
|
||||
const xmlChar *name,
|
||||
const xmlChar *name2,
|
||||
const xmlChar *name3,
|
||||
xmlHashScannerFull f,
|
||||
xmlHashScannerFull scan,
|
||||
void *data);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
+26
-26
@@ -52,79 +52,79 @@ typedef int (*xmlListDataCompare) (const void *data0, const void *data1);
|
||||
typedef int (*xmlListWalker) (const void *data, void *user);
|
||||
|
||||
/* Creation/Deletion */
|
||||
XMLPUBFUN xmlListPtr XMLCALL
|
||||
XMLPUBFUN xmlListPtr
|
||||
xmlListCreate (xmlListDeallocator deallocator,
|
||||
xmlListDataCompare compare);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlListDelete (xmlListPtr l);
|
||||
|
||||
/* Basic Operators */
|
||||
XMLPUBFUN void * XMLCALL
|
||||
XMLPUBFUN void *
|
||||
xmlListSearch (xmlListPtr l,
|
||||
void *data);
|
||||
XMLPUBFUN void * XMLCALL
|
||||
XMLPUBFUN void *
|
||||
xmlListReverseSearch (xmlListPtr l,
|
||||
void *data);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlListInsert (xmlListPtr l,
|
||||
void *data) ;
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlListAppend (xmlListPtr l,
|
||||
void *data) ;
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlListRemoveFirst (xmlListPtr l,
|
||||
void *data);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlListRemoveLast (xmlListPtr l,
|
||||
void *data);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlListRemoveAll (xmlListPtr l,
|
||||
void *data);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlListClear (xmlListPtr l);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlListEmpty (xmlListPtr l);
|
||||
XMLPUBFUN xmlLinkPtr XMLCALL
|
||||
XMLPUBFUN xmlLinkPtr
|
||||
xmlListFront (xmlListPtr l);
|
||||
XMLPUBFUN xmlLinkPtr XMLCALL
|
||||
XMLPUBFUN xmlLinkPtr
|
||||
xmlListEnd (xmlListPtr l);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlListSize (xmlListPtr l);
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlListPopFront (xmlListPtr l);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlListPopBack (xmlListPtr l);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlListPushFront (xmlListPtr l,
|
||||
void *data);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlListPushBack (xmlListPtr l,
|
||||
void *data);
|
||||
|
||||
/* Advanced Operators */
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlListReverse (xmlListPtr l);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlListSort (xmlListPtr l);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlListWalk (xmlListPtr l,
|
||||
xmlListWalker walker,
|
||||
void *user);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlListReverseWalk (xmlListPtr l,
|
||||
xmlListWalker walker,
|
||||
void *user);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlListMerge (xmlListPtr l1,
|
||||
xmlListPtr l2);
|
||||
XMLPUBFUN xmlListPtr XMLCALL
|
||||
XMLPUBFUN xmlListPtr
|
||||
xmlListDup (const xmlListPtr old);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlListCopy (xmlListPtr cur,
|
||||
const xmlListPtr old);
|
||||
/* Link operators */
|
||||
XMLPUBFUN void * XMLCALL
|
||||
XMLPUBFUN void *
|
||||
xmlLinkGetData (xmlLinkPtr lk);
|
||||
|
||||
/* xmlListUnique() */
|
||||
Vendored
+24
-24
@@ -14,7 +14,7 @@
|
||||
|
||||
#include <libxml/xmlversion.h>
|
||||
|
||||
#ifdef LIBXML_FTP_ENABLED
|
||||
#if defined(LIBXML_FTP_ENABLED)
|
||||
|
||||
/* Needed for portability to Windows 64 bits */
|
||||
#if defined(_WIN32)
|
||||
@@ -80,52 +80,52 @@ typedef void (*ftpDataCallback) (void *userData,
|
||||
* Init
|
||||
*/
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlNanoFTPInit (void);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlNanoFTPCleanup (void);
|
||||
|
||||
/*
|
||||
* Creating/freeing contexts.
|
||||
*/
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void * XMLCALL
|
||||
XMLPUBFUN void *
|
||||
xmlNanoFTPNewCtxt (const char *URL);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlNanoFTPFreeCtxt (void * ctx);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void * XMLCALL
|
||||
XMLPUBFUN void *
|
||||
xmlNanoFTPConnectTo (const char *server,
|
||||
int port);
|
||||
/*
|
||||
* Opening/closing session connections.
|
||||
*/
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void * XMLCALL
|
||||
XMLPUBFUN void *
|
||||
xmlNanoFTPOpen (const char *URL);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlNanoFTPConnect (void *ctx);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlNanoFTPClose (void *ctx);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlNanoFTPQuit (void *ctx);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlNanoFTPScanProxy (const char *URL);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlNanoFTPProxy (const char *host,
|
||||
int port,
|
||||
const char *user,
|
||||
const char *passwd,
|
||||
int type);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlNanoFTPUpdateURL (void *ctx,
|
||||
const char *URL);
|
||||
|
||||
@@ -133,48 +133,48 @@ XMLPUBFUN int XMLCALL
|
||||
* Rather internal commands.
|
||||
*/
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlNanoFTPGetResponse (void *ctx);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlNanoFTPCheckResponse (void *ctx);
|
||||
|
||||
/*
|
||||
* CD/DIR/GET handlers.
|
||||
*/
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlNanoFTPCwd (void *ctx,
|
||||
const char *directory);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlNanoFTPDele (void *ctx,
|
||||
const char *file);
|
||||
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN SOCKET XMLCALL
|
||||
XMLPUBFUN SOCKET
|
||||
xmlNanoFTPGetConnection (void *ctx);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlNanoFTPCloseConnection(void *ctx);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlNanoFTPList (void *ctx,
|
||||
ftpListCallback callback,
|
||||
void *userData,
|
||||
const char *filename);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN SOCKET XMLCALL
|
||||
XMLPUBFUN SOCKET
|
||||
xmlNanoFTPGetSocket (void *ctx,
|
||||
const char *filename);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlNanoFTPGet (void *ctx,
|
||||
ftpDataCallback callback,
|
||||
void *userData,
|
||||
const char *filename);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlNanoFTPRead (void *ctx,
|
||||
void *dest,
|
||||
int len);
|
||||
@@ -182,5 +182,5 @@ XMLPUBFUN int XMLCALL
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* LIBXML_FTP_ENABLED */
|
||||
#endif /* defined(LIBXML_FTP_ENABLED) || defined(LIBXML_LEGACY_ENABLED) */
|
||||
#endif /* __NANO_FTP_H__ */
|
||||
Vendored
+17
-17
@@ -18,24 +18,24 @@
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlNanoHTTPInit (void);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlNanoHTTPCleanup (void);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlNanoHTTPScanProxy (const char *URL);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlNanoHTTPFetch (const char *URL,
|
||||
const char *filename,
|
||||
char **contentType);
|
||||
XMLPUBFUN void * XMLCALL
|
||||
XMLPUBFUN void *
|
||||
xmlNanoHTTPMethod (const char *URL,
|
||||
const char *method,
|
||||
const char *input,
|
||||
char **contentType,
|
||||
const char *headers,
|
||||
int ilen);
|
||||
XMLPUBFUN void * XMLCALL
|
||||
XMLPUBFUN void *
|
||||
xmlNanoHTTPMethodRedir (const char *URL,
|
||||
const char *method,
|
||||
const char *input,
|
||||
@@ -43,35 +43,35 @@ XMLPUBFUN void * XMLCALL
|
||||
char **redir,
|
||||
const char *headers,
|
||||
int ilen);
|
||||
XMLPUBFUN void * XMLCALL
|
||||
XMLPUBFUN void *
|
||||
xmlNanoHTTPOpen (const char *URL,
|
||||
char **contentType);
|
||||
XMLPUBFUN void * XMLCALL
|
||||
XMLPUBFUN void *
|
||||
xmlNanoHTTPOpenRedir (const char *URL,
|
||||
char **contentType,
|
||||
char **redir);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlNanoHTTPReturnCode (void *ctx);
|
||||
XMLPUBFUN const char * XMLCALL
|
||||
XMLPUBFUN const char *
|
||||
xmlNanoHTTPAuthHeader (void *ctx);
|
||||
XMLPUBFUN const char * XMLCALL
|
||||
XMLPUBFUN const char *
|
||||
xmlNanoHTTPRedir (void *ctx);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlNanoHTTPContentLength( void * ctx );
|
||||
XMLPUBFUN const char * XMLCALL
|
||||
XMLPUBFUN const char *
|
||||
xmlNanoHTTPEncoding (void *ctx);
|
||||
XMLPUBFUN const char * XMLCALL
|
||||
XMLPUBFUN const char *
|
||||
xmlNanoHTTPMimeType (void *ctx);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlNanoHTTPRead (void *ctx,
|
||||
void *dest,
|
||||
int len);
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlNanoHTTPSave (void *ctxt,
|
||||
const char *filename);
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlNanoHTTPClose (void *ctx);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
Vendored
+233
-93
@@ -11,13 +11,21 @@
|
||||
#define __XML_PARSER_H__
|
||||
|
||||
#include <libxml/xmlversion.h>
|
||||
#define XML_TREE_INTERNALS
|
||||
#include <libxml/tree.h>
|
||||
#undef XML_TREE_INTERNALS
|
||||
#include <libxml/dict.h>
|
||||
#include <libxml/hash.h>
|
||||
#include <libxml/valid.h>
|
||||
#include <libxml/entities.h>
|
||||
#include <libxml/xmlerror.h>
|
||||
#include <libxml/xmlstring.h>
|
||||
#include <libxml/xmlmemory.h>
|
||||
#include <libxml/encoding.h>
|
||||
#include <libxml/xmlIO.h>
|
||||
/* for compatibility */
|
||||
#include <libxml/SAX2.h>
|
||||
#include <libxml/threads.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -61,17 +69,14 @@ struct _xmlParserInput {
|
||||
int length; /* length if known */
|
||||
int line; /* Current line */
|
||||
int col; /* Current column */
|
||||
/*
|
||||
* NOTE: consumed is only tested for equality in the parser code,
|
||||
* so even if there is an overflow this should not give troubles
|
||||
* for parsing very large instances.
|
||||
*/
|
||||
unsigned long consumed; /* How many xmlChars already consumed */
|
||||
xmlParserInputDeallocate free; /* function to deallocate the base */
|
||||
const xmlChar *encoding; /* the encoding string for entity */
|
||||
const xmlChar *encoding; /* unused */
|
||||
const xmlChar *version; /* the version string for entity */
|
||||
int standalone; /* Was that entity marked standalone */
|
||||
int flags; /* Flags */
|
||||
int id; /* an unique identifier for the entity */
|
||||
unsigned long parentConsumed; /* consumed bytes from parents */
|
||||
xmlEntityPtr entity; /* entity, if any */
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -125,7 +130,8 @@ typedef enum {
|
||||
XML_PARSER_SYSTEM_LITERAL, /* within a SYSTEM value */
|
||||
XML_PARSER_EPILOG, /* the Misc* after the last end tag */
|
||||
XML_PARSER_IGNORE, /* within an IGNORED section */
|
||||
XML_PARSER_PUBLIC_LITERAL /* within a PUBLIC value */
|
||||
XML_PARSER_PUBLIC_LITERAL, /* within a PUBLIC value */
|
||||
XML_PARSER_XML_DECL /* before XML decl (but after BOM) */
|
||||
} xmlParserInputState;
|
||||
|
||||
/**
|
||||
@@ -168,6 +174,8 @@ typedef enum {
|
||||
} xmlParserMode;
|
||||
|
||||
typedef struct _xmlStartTag xmlStartTag;
|
||||
typedef struct _xmlParserNsData xmlParserNsData;
|
||||
typedef struct _xmlAttrHashBucket xmlAttrHashBucket;
|
||||
|
||||
/**
|
||||
* xmlParserCtxt:
|
||||
@@ -248,8 +256,7 @@ struct _xmlParserCtxt {
|
||||
|
||||
int depth; /* to prevent entity substitution loops */
|
||||
xmlParserInputPtr entity; /* used to check entities boundaries */
|
||||
int charset; /* encoding of the in-memory content
|
||||
actually an xmlCharEncoding */
|
||||
int charset; /* unused */
|
||||
int nodelen; /* Those two fields are there to */
|
||||
int nodemem; /* Speed up large node parsing */
|
||||
int pedantic; /* signal pedantic warnings */
|
||||
@@ -279,7 +286,7 @@ struct _xmlParserCtxt {
|
||||
int nsNr; /* the number of inherited namespaces */
|
||||
int nsMax; /* the size of the arrays */
|
||||
const xmlChar * *nsTab; /* the array of prefix/namespace name */
|
||||
int *attallocs; /* which attribute were allocated */
|
||||
unsigned *attallocs; /* which attribute were allocated */
|
||||
xmlStartTag *pushTab; /* array of data for push */
|
||||
xmlHashTablePtr attsDefault; /* defaulted attributes if any */
|
||||
xmlHashTablePtr attsSpecial; /* non-CDATA attributes if any */
|
||||
@@ -300,7 +307,7 @@ struct _xmlParserCtxt {
|
||||
*/
|
||||
xmlError lastError;
|
||||
xmlParserMode parseMode; /* the parser mode */
|
||||
unsigned long nbentities; /* number of entities references */
|
||||
unsigned long nbentities; /* unused */
|
||||
unsigned long sizeentities; /* size of parsed entities */
|
||||
|
||||
/* for use by HTML non-recursive parser */
|
||||
@@ -311,6 +318,15 @@ struct _xmlParserCtxt {
|
||||
|
||||
int input_id; /* we need to label inputs */
|
||||
unsigned long sizeentcopy; /* volume of entity copy */
|
||||
|
||||
int endCheckState; /* quote state for push parser */
|
||||
unsigned short nbErrors; /* number of errors */
|
||||
unsigned short nbWarnings; /* number of warnings */
|
||||
unsigned maxAmpl; /* maximum amplification factor */
|
||||
|
||||
xmlParserNsData *nsdb; /* namespace database */
|
||||
unsigned attrHashMax; /* allocated size */
|
||||
xmlAttrHashBucket *attrHash; /* atttribute hash table */
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -605,7 +621,7 @@ typedef void (*cdataBlockSAXFunc) (
|
||||
*
|
||||
* Display and format a warning messages, callback.
|
||||
*/
|
||||
typedef void (XMLCDECL *warningSAXFunc) (void *ctx,
|
||||
typedef void (*warningSAXFunc) (void *ctx,
|
||||
const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
|
||||
/**
|
||||
* errorSAXFunc:
|
||||
@@ -615,7 +631,7 @@ typedef void (XMLCDECL *warningSAXFunc) (void *ctx,
|
||||
*
|
||||
* Display and format an error messages, callback.
|
||||
*/
|
||||
typedef void (XMLCDECL *errorSAXFunc) (void *ctx,
|
||||
typedef void (*errorSAXFunc) (void *ctx,
|
||||
const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
|
||||
/**
|
||||
* fatalErrorSAXFunc:
|
||||
@@ -627,7 +643,7 @@ typedef void (XMLCDECL *errorSAXFunc) (void *ctx,
|
||||
* Note: so far fatalError() SAX callbacks are not used, error()
|
||||
* get all the callbacks for errors.
|
||||
*/
|
||||
typedef void (XMLCDECL *fatalErrorSAXFunc) (void *ctx,
|
||||
typedef void (*fatalErrorSAXFunc) (void *ctx,
|
||||
const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
|
||||
/**
|
||||
* isStandaloneSAXFunc:
|
||||
@@ -731,6 +747,19 @@ struct _xmlSAXHandler {
|
||||
setDocumentLocatorSAXFunc setDocumentLocator;
|
||||
startDocumentSAXFunc startDocument;
|
||||
endDocumentSAXFunc endDocument;
|
||||
/*
|
||||
* `startElement` and `endElement` are only used by the legacy SAX1
|
||||
* interface and should not be used in new software. If you really
|
||||
* have to enable SAX1, the preferred way is set the `initialized`
|
||||
* member to 1 instead of XML_SAX2_MAGIC.
|
||||
*
|
||||
* For backward compatibility, it's also possible to set the
|
||||
* `startElementNs` and `endElementNs` handlers to NULL.
|
||||
*
|
||||
* You can also set the XML_PARSE_SAX1 parser option, but versions
|
||||
* older than 2.12.0 will probably crash if this option is provided
|
||||
* together with custom SAX callbacks.
|
||||
*/
|
||||
startElementSAXFunc startElement;
|
||||
endElementSAXFunc endElement;
|
||||
referenceSAXFunc reference;
|
||||
@@ -744,8 +773,14 @@ struct _xmlSAXHandler {
|
||||
getParameterEntitySAXFunc getParameterEntity;
|
||||
cdataBlockSAXFunc cdataBlock;
|
||||
externalSubsetSAXFunc externalSubset;
|
||||
/*
|
||||
* `initialized` should always be set to XML_SAX2_MAGIC to enable the
|
||||
* modern SAX2 interface.
|
||||
*/
|
||||
unsigned int initialized;
|
||||
/* The following fields are extensions available only on version 2 */
|
||||
/*
|
||||
* The following members are only used by the SAX2 interface.
|
||||
*/
|
||||
void *_private;
|
||||
startElementNsSAX2Func startElementNs;
|
||||
endElementNsSAX2Func endElementNs;
|
||||
@@ -803,34 +838,102 @@ typedef xmlParserInputPtr (*xmlExternalEntityLoader) (const char *URL,
|
||||
const char *ID,
|
||||
xmlParserCtxtPtr context);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
/*
|
||||
* Variables
|
||||
*/
|
||||
|
||||
XMLPUBVAR const char *const xmlParserVersion;
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
/* backward compatibility */
|
||||
XMLPUBFUN const char *const *__xmlParserVersion(void);
|
||||
#endif
|
||||
|
||||
#include <libxml/encoding.h>
|
||||
#include <libxml/xmlIO.h>
|
||||
#include <libxml/globals.h>
|
||||
/** DOC_DISABLE */
|
||||
#define XML_GLOBALS_PARSER_CORE \
|
||||
XML_OP(oldXMLWDcompatibility, int, XML_DEPRECATED) \
|
||||
XML_OP(xmlDefaultSAXLocator, xmlSAXLocator, XML_DEPRECATED) \
|
||||
XML_OP(xmlDoValidityCheckingDefaultValue, int, XML_DEPRECATED) \
|
||||
XML_OP(xmlGetWarningsDefaultValue, int, XML_DEPRECATED) \
|
||||
XML_OP(xmlKeepBlanksDefaultValue, int, XML_DEPRECATED) \
|
||||
XML_OP(xmlLineNumbersDefaultValue, int, XML_DEPRECATED) \
|
||||
XML_OP(xmlLoadExtDtdDefaultValue, int, XML_DEPRECATED) \
|
||||
XML_OP(xmlParserDebugEntities, int, XML_DEPRECATED) \
|
||||
XML_OP(xmlPedanticParserDefaultValue, int, XML_DEPRECATED) \
|
||||
XML_OP(xmlSubstituteEntitiesDefaultValue, int, XML_DEPRECATED)
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
#define XML_GLOBALS_PARSER_OUTPUT \
|
||||
XML_OP(xmlIndentTreeOutput, int, XML_NO_ATTR) \
|
||||
XML_OP(xmlTreeIndentString, const char *, XML_NO_ATTR) \
|
||||
XML_OP(xmlSaveNoEmptyTags, int, XML_NO_ATTR)
|
||||
#else
|
||||
#define XML_GLOBALS_PARSER_OUTPUT
|
||||
#endif
|
||||
|
||||
#ifdef LIBXML_SAX1_ENABLED
|
||||
#define XML_GLOBALS_PARSER_SAX1 \
|
||||
XML_OP(xmlDefaultSAXHandler, xmlSAXHandlerV1, XML_DEPRECATED)
|
||||
#else
|
||||
#define XML_GLOBALS_PARSER_SAX1
|
||||
#endif
|
||||
|
||||
#define XML_GLOBALS_PARSER \
|
||||
XML_GLOBALS_PARSER_CORE \
|
||||
XML_GLOBALS_PARSER_OUTPUT \
|
||||
XML_GLOBALS_PARSER_SAX1
|
||||
|
||||
#define XML_OP XML_DECLARE_GLOBAL
|
||||
XML_GLOBALS_PARSER
|
||||
#undef XML_OP
|
||||
|
||||
#if defined(LIBXML_THREAD_ENABLED) && !defined(XML_GLOBALS_NO_REDEFINITION)
|
||||
#define oldXMLWDcompatibility XML_GLOBAL_MACRO(oldXMLWDcompatibility)
|
||||
#define xmlDefaultSAXHandler XML_GLOBAL_MACRO(xmlDefaultSAXHandler)
|
||||
#define xmlDefaultSAXLocator XML_GLOBAL_MACRO(xmlDefaultSAXLocator)
|
||||
#define xmlDoValidityCheckingDefaultValue \
|
||||
XML_GLOBAL_MACRO(xmlDoValidityCheckingDefaultValue)
|
||||
#define xmlGetWarningsDefaultValue \
|
||||
XML_GLOBAL_MACRO(xmlGetWarningsDefaultValue)
|
||||
#define xmlKeepBlanksDefaultValue XML_GLOBAL_MACRO(xmlKeepBlanksDefaultValue)
|
||||
#define xmlLineNumbersDefaultValue \
|
||||
XML_GLOBAL_MACRO(xmlLineNumbersDefaultValue)
|
||||
#define xmlLoadExtDtdDefaultValue XML_GLOBAL_MACRO(xmlLoadExtDtdDefaultValue)
|
||||
#define xmlParserDebugEntities XML_GLOBAL_MACRO(xmlParserDebugEntities)
|
||||
#define xmlPedanticParserDefaultValue \
|
||||
XML_GLOBAL_MACRO(xmlPedanticParserDefaultValue)
|
||||
#define xmlSubstituteEntitiesDefaultValue \
|
||||
XML_GLOBAL_MACRO(xmlSubstituteEntitiesDefaultValue)
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
#define xmlIndentTreeOutput XML_GLOBAL_MACRO(xmlIndentTreeOutput)
|
||||
#define xmlTreeIndentString XML_GLOBAL_MACRO(xmlTreeIndentString)
|
||||
#define xmlSaveNoEmptyTags XML_GLOBAL_MACRO(xmlSaveNoEmptyTags)
|
||||
#endif
|
||||
#endif
|
||||
/** DOC_ENABLE */
|
||||
|
||||
/*
|
||||
* Init/Cleanup
|
||||
*/
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlInitParser (void);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlCleanupParser (void);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
xmlInitGlobals (void);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
xmlCleanupGlobals (void);
|
||||
|
||||
/*
|
||||
* Input functions
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlParserInputRead (xmlParserInputPtr in,
|
||||
int len);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlParserInputGrow (xmlParserInputPtr in,
|
||||
int len);
|
||||
|
||||
@@ -838,101 +941,130 @@ XMLPUBFUN int XMLCALL
|
||||
* Basic parsing Interfaces
|
||||
*/
|
||||
#ifdef LIBXML_SAX1_ENABLED
|
||||
XMLPUBFUN xmlDocPtr XMLCALL
|
||||
XMLPUBFUN xmlDocPtr
|
||||
xmlParseDoc (const xmlChar *cur);
|
||||
XMLPUBFUN xmlDocPtr XMLCALL
|
||||
XMLPUBFUN xmlDocPtr
|
||||
xmlParseFile (const char *filename);
|
||||
XMLPUBFUN xmlDocPtr XMLCALL
|
||||
XMLPUBFUN xmlDocPtr
|
||||
xmlParseMemory (const char *buffer,
|
||||
int size);
|
||||
#endif /* LIBXML_SAX1_ENABLED */
|
||||
XMLPUBFUN int XMLCALL
|
||||
XML_DEPRECATED XMLPUBFUN int
|
||||
xmlSubstituteEntitiesDefault(int val);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XML_DEPRECATED XMLPUBFUN int
|
||||
xmlThrDefSubstituteEntitiesDefaultValue(int v);
|
||||
XML_DEPRECATED XMLPUBFUN int
|
||||
xmlKeepBlanksDefault (int val);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XML_DEPRECATED XMLPUBFUN int
|
||||
xmlThrDefKeepBlanksDefaultValue(int v);
|
||||
XMLPUBFUN void
|
||||
xmlStopParser (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XML_DEPRECATED XMLPUBFUN int
|
||||
xmlPedanticParserDefault(int val);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XML_DEPRECATED XMLPUBFUN int
|
||||
xmlThrDefPedanticParserDefaultValue(int v);
|
||||
XML_DEPRECATED XMLPUBFUN int
|
||||
xmlLineNumbersDefault (int val);
|
||||
XML_DEPRECATED XMLPUBFUN int
|
||||
xmlThrDefLineNumbersDefaultValue(int v);
|
||||
XML_DEPRECATED XMLPUBFUN int
|
||||
xmlThrDefDoValidityCheckingDefaultValue(int v);
|
||||
XML_DEPRECATED XMLPUBFUN int
|
||||
xmlThrDefGetWarningsDefaultValue(int v);
|
||||
XML_DEPRECATED XMLPUBFUN int
|
||||
xmlThrDefLoadExtDtdDefaultValue(int v);
|
||||
XML_DEPRECATED XMLPUBFUN int
|
||||
xmlThrDefParserDebugEntities(int v);
|
||||
|
||||
#ifdef LIBXML_SAX1_ENABLED
|
||||
/*
|
||||
* Recovery mode
|
||||
*/
|
||||
XMLPUBFUN xmlDocPtr XMLCALL
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlDocPtr
|
||||
xmlRecoverDoc (const xmlChar *cur);
|
||||
XMLPUBFUN xmlDocPtr XMLCALL
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlDocPtr
|
||||
xmlRecoverMemory (const char *buffer,
|
||||
int size);
|
||||
XMLPUBFUN xmlDocPtr XMLCALL
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlDocPtr
|
||||
xmlRecoverFile (const char *filename);
|
||||
#endif /* LIBXML_SAX1_ENABLED */
|
||||
|
||||
/*
|
||||
* Less common routines and SAX interfaces
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlParseDocument (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlParseExtParsedEnt (xmlParserCtxtPtr ctxt);
|
||||
#ifdef LIBXML_SAX1_ENABLED
|
||||
XMLPUBFUN int XMLCALL
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlSAXUserParseFile (xmlSAXHandlerPtr sax,
|
||||
void *user_data,
|
||||
const char *filename);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlSAXUserParseMemory (xmlSAXHandlerPtr sax,
|
||||
void *user_data,
|
||||
const char *buffer,
|
||||
int size);
|
||||
XMLPUBFUN xmlDocPtr XMLCALL
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlDocPtr
|
||||
xmlSAXParseDoc (xmlSAXHandlerPtr sax,
|
||||
const xmlChar *cur,
|
||||
int recovery);
|
||||
XMLPUBFUN xmlDocPtr XMLCALL
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlDocPtr
|
||||
xmlSAXParseMemory (xmlSAXHandlerPtr sax,
|
||||
const char *buffer,
|
||||
int size,
|
||||
int recovery);
|
||||
XMLPUBFUN xmlDocPtr XMLCALL
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlDocPtr
|
||||
xmlSAXParseMemoryWithData (xmlSAXHandlerPtr sax,
|
||||
const char *buffer,
|
||||
int size,
|
||||
int recovery,
|
||||
void *data);
|
||||
XMLPUBFUN xmlDocPtr XMLCALL
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlDocPtr
|
||||
xmlSAXParseFile (xmlSAXHandlerPtr sax,
|
||||
const char *filename,
|
||||
int recovery);
|
||||
XMLPUBFUN xmlDocPtr XMLCALL
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlDocPtr
|
||||
xmlSAXParseFileWithData (xmlSAXHandlerPtr sax,
|
||||
const char *filename,
|
||||
int recovery,
|
||||
void *data);
|
||||
XMLPUBFUN xmlDocPtr XMLCALL
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlDocPtr
|
||||
xmlSAXParseEntity (xmlSAXHandlerPtr sax,
|
||||
const char *filename);
|
||||
XMLPUBFUN xmlDocPtr XMLCALL
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlDocPtr
|
||||
xmlParseEntity (const char *filename);
|
||||
#endif /* LIBXML_SAX1_ENABLED */
|
||||
|
||||
#ifdef LIBXML_VALID_ENABLED
|
||||
XMLPUBFUN xmlDtdPtr XMLCALL
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlDtdPtr
|
||||
xmlSAXParseDTD (xmlSAXHandlerPtr sax,
|
||||
const xmlChar *ExternalID,
|
||||
const xmlChar *SystemID);
|
||||
XMLPUBFUN xmlDtdPtr XMLCALL
|
||||
XMLPUBFUN xmlDtdPtr
|
||||
xmlParseDTD (const xmlChar *ExternalID,
|
||||
const xmlChar *SystemID);
|
||||
XMLPUBFUN xmlDtdPtr XMLCALL
|
||||
XMLPUBFUN xmlDtdPtr
|
||||
xmlIOParseDTD (xmlSAXHandlerPtr sax,
|
||||
xmlParserInputBufferPtr input,
|
||||
xmlCharEncoding enc);
|
||||
#endif /* LIBXML_VALID_ENABLE */
|
||||
#ifdef LIBXML_SAX1_ENABLED
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlParseBalancedChunkMemory(xmlDocPtr doc,
|
||||
xmlSAXHandlerPtr sax,
|
||||
void *user_data,
|
||||
@@ -940,14 +1072,14 @@ XMLPUBFUN int XMLCALL
|
||||
const xmlChar *string,
|
||||
xmlNodePtr *lst);
|
||||
#endif /* LIBXML_SAX1_ENABLED */
|
||||
XMLPUBFUN xmlParserErrors XMLCALL
|
||||
XMLPUBFUN xmlParserErrors
|
||||
xmlParseInNodeContext (xmlNodePtr node,
|
||||
const char *data,
|
||||
int datalen,
|
||||
int options,
|
||||
xmlNodePtr *lst);
|
||||
#ifdef LIBXML_SAX1_ENABLED
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlParseBalancedChunkMemoryRecover(xmlDocPtr doc,
|
||||
xmlSAXHandlerPtr sax,
|
||||
void *user_data,
|
||||
@@ -955,7 +1087,8 @@ XMLPUBFUN int XMLCALL
|
||||
const xmlChar *string,
|
||||
xmlNodePtr *lst,
|
||||
int recover);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlParseExternalEntity (xmlDocPtr doc,
|
||||
xmlSAXHandlerPtr sax,
|
||||
void *user_data,
|
||||
@@ -964,7 +1097,7 @@ XMLPUBFUN int XMLCALL
|
||||
const xmlChar *ID,
|
||||
xmlNodePtr *lst);
|
||||
#endif /* LIBXML_SAX1_ENABLED */
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlParseCtxtExternalEntity(xmlParserCtxtPtr ctx,
|
||||
const xmlChar *URL,
|
||||
const xmlChar *ID,
|
||||
@@ -973,21 +1106,25 @@ XMLPUBFUN int XMLCALL
|
||||
/*
|
||||
* Parser contexts handling.
|
||||
*/
|
||||
XMLPUBFUN xmlParserCtxtPtr XMLCALL
|
||||
XMLPUBFUN xmlParserCtxtPtr
|
||||
xmlNewParserCtxt (void);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN xmlParserCtxtPtr
|
||||
xmlNewSAXParserCtxt (const xmlSAXHandler *sax,
|
||||
void *userData);
|
||||
XMLPUBFUN int
|
||||
xmlInitParserCtxt (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlClearParserCtxt (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlFreeParserCtxt (xmlParserCtxtPtr ctxt);
|
||||
#ifdef LIBXML_SAX1_ENABLED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
xmlSetupParserForBuffer (xmlParserCtxtPtr ctxt,
|
||||
const xmlChar* buffer,
|
||||
const char *filename);
|
||||
#endif /* LIBXML_SAX1_ENABLED */
|
||||
XMLPUBFUN xmlParserCtxtPtr XMLCALL
|
||||
XMLPUBFUN xmlParserCtxtPtr
|
||||
xmlCreateDocParserCtxt (const xmlChar *cur);
|
||||
|
||||
#ifdef LIBXML_LEGACY_ENABLED
|
||||
@@ -995,16 +1132,16 @@ XMLPUBFUN xmlParserCtxtPtr XMLCALL
|
||||
* Reading/setting optional parsing features.
|
||||
*/
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlGetFeaturesList (int *len,
|
||||
const char **result);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlGetFeature (xmlParserCtxtPtr ctxt,
|
||||
const char *name,
|
||||
void *result);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlSetFeature (xmlParserCtxtPtr ctxt,
|
||||
const char *name,
|
||||
void *value);
|
||||
@@ -1014,13 +1151,13 @@ XMLPUBFUN int XMLCALL
|
||||
/*
|
||||
* Interfaces for the Push mode.
|
||||
*/
|
||||
XMLPUBFUN xmlParserCtxtPtr XMLCALL
|
||||
XMLPUBFUN xmlParserCtxtPtr
|
||||
xmlCreatePushParserCtxt(xmlSAXHandlerPtr sax,
|
||||
void *user_data,
|
||||
const char *chunk,
|
||||
int size,
|
||||
const char *filename);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlParseChunk (xmlParserCtxtPtr ctxt,
|
||||
const char *chunk,
|
||||
int size,
|
||||
@@ -1031,7 +1168,7 @@ XMLPUBFUN int XMLCALL
|
||||
* Special I/O mode.
|
||||
*/
|
||||
|
||||
XMLPUBFUN xmlParserCtxtPtr XMLCALL
|
||||
XMLPUBFUN xmlParserCtxtPtr
|
||||
xmlCreateIOParserCtxt (xmlSAXHandlerPtr sax,
|
||||
void *user_data,
|
||||
xmlInputReadCallback ioread,
|
||||
@@ -1039,7 +1176,7 @@ XMLPUBFUN xmlParserCtxtPtr XMLCALL
|
||||
void *ioctx,
|
||||
xmlCharEncoding enc);
|
||||
|
||||
XMLPUBFUN xmlParserInputPtr XMLCALL
|
||||
XMLPUBFUN xmlParserInputPtr
|
||||
xmlNewIOInputStream (xmlParserCtxtPtr ctxt,
|
||||
xmlParserInputBufferPtr input,
|
||||
xmlCharEncoding enc);
|
||||
@@ -1047,17 +1184,17 @@ XMLPUBFUN xmlParserInputPtr XMLCALL
|
||||
/*
|
||||
* Node infos.
|
||||
*/
|
||||
XMLPUBFUN const xmlParserNodeInfo* XMLCALL
|
||||
XMLPUBFUN const xmlParserNodeInfo*
|
||||
xmlParserFindNodeInfo (const xmlParserCtxtPtr ctxt,
|
||||
const xmlNodePtr node);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlInitNodeInfoSeq (xmlParserNodeInfoSeqPtr seq);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlClearNodeInfoSeq (xmlParserNodeInfoSeqPtr seq);
|
||||
XMLPUBFUN unsigned long XMLCALL
|
||||
XMLPUBFUN unsigned long
|
||||
xmlParserFindNodeInfoIndex(const xmlParserNodeInfoSeqPtr seq,
|
||||
const xmlNodePtr node);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlParserAddNodeInfo (xmlParserCtxtPtr ctxt,
|
||||
const xmlParserNodeInfoPtr info);
|
||||
|
||||
@@ -1065,11 +1202,11 @@ XMLPUBFUN void XMLCALL
|
||||
* External entities handling actually implemented in xmlIO.
|
||||
*/
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlSetExternalEntityLoader(xmlExternalEntityLoader f);
|
||||
XMLPUBFUN xmlExternalEntityLoader XMLCALL
|
||||
XMLPUBFUN xmlExternalEntityLoader
|
||||
xmlGetExternalEntityLoader(void);
|
||||
XMLPUBFUN xmlParserInputPtr XMLCALL
|
||||
XMLPUBFUN xmlParserInputPtr
|
||||
xmlLoadExternalEntity (const char *URL,
|
||||
const char *ID,
|
||||
xmlParserCtxtPtr ctxt);
|
||||
@@ -1077,7 +1214,7 @@ XMLPUBFUN xmlParserInputPtr XMLCALL
|
||||
/*
|
||||
* Index lookup, actually implemented in the encoding module
|
||||
*/
|
||||
XMLPUBFUN long XMLCALL
|
||||
XMLPUBFUN long
|
||||
xmlByteConsumed (xmlParserCtxtPtr ctxt);
|
||||
|
||||
/*
|
||||
@@ -1117,69 +1254,72 @@ typedef enum {
|
||||
XML_PARSE_BIG_LINES = 1<<22 /* Store big lines numbers in text PSVI field */
|
||||
} xmlParserOption;
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlCtxtReset (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlCtxtResetPush (xmlParserCtxtPtr ctxt,
|
||||
const char *chunk,
|
||||
int size,
|
||||
const char *filename,
|
||||
const char *encoding);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlCtxtUseOptions (xmlParserCtxtPtr ctxt,
|
||||
int options);
|
||||
XMLPUBFUN xmlDocPtr XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlCtxtSetMaxAmplification(xmlParserCtxtPtr ctxt,
|
||||
unsigned maxAmpl);
|
||||
XMLPUBFUN xmlDocPtr
|
||||
xmlReadDoc (const xmlChar *cur,
|
||||
const char *URL,
|
||||
const char *encoding,
|
||||
int options);
|
||||
XMLPUBFUN xmlDocPtr XMLCALL
|
||||
XMLPUBFUN xmlDocPtr
|
||||
xmlReadFile (const char *URL,
|
||||
const char *encoding,
|
||||
int options);
|
||||
XMLPUBFUN xmlDocPtr XMLCALL
|
||||
XMLPUBFUN xmlDocPtr
|
||||
xmlReadMemory (const char *buffer,
|
||||
int size,
|
||||
const char *URL,
|
||||
const char *encoding,
|
||||
int options);
|
||||
XMLPUBFUN xmlDocPtr XMLCALL
|
||||
XMLPUBFUN xmlDocPtr
|
||||
xmlReadFd (int fd,
|
||||
const char *URL,
|
||||
const char *encoding,
|
||||
int options);
|
||||
XMLPUBFUN xmlDocPtr XMLCALL
|
||||
XMLPUBFUN xmlDocPtr
|
||||
xmlReadIO (xmlInputReadCallback ioread,
|
||||
xmlInputCloseCallback ioclose,
|
||||
void *ioctx,
|
||||
const char *URL,
|
||||
const char *encoding,
|
||||
int options);
|
||||
XMLPUBFUN xmlDocPtr XMLCALL
|
||||
XMLPUBFUN xmlDocPtr
|
||||
xmlCtxtReadDoc (xmlParserCtxtPtr ctxt,
|
||||
const xmlChar *cur,
|
||||
const char *URL,
|
||||
const char *encoding,
|
||||
int options);
|
||||
XMLPUBFUN xmlDocPtr XMLCALL
|
||||
XMLPUBFUN xmlDocPtr
|
||||
xmlCtxtReadFile (xmlParserCtxtPtr ctxt,
|
||||
const char *filename,
|
||||
const char *encoding,
|
||||
int options);
|
||||
XMLPUBFUN xmlDocPtr XMLCALL
|
||||
XMLPUBFUN xmlDocPtr
|
||||
xmlCtxtReadMemory (xmlParserCtxtPtr ctxt,
|
||||
const char *buffer,
|
||||
int size,
|
||||
const char *URL,
|
||||
const char *encoding,
|
||||
int options);
|
||||
XMLPUBFUN xmlDocPtr XMLCALL
|
||||
XMLPUBFUN xmlDocPtr
|
||||
xmlCtxtReadFd (xmlParserCtxtPtr ctxt,
|
||||
int fd,
|
||||
const char *URL,
|
||||
const char *encoding,
|
||||
int options);
|
||||
XMLPUBFUN xmlDocPtr XMLCALL
|
||||
XMLPUBFUN xmlDocPtr
|
||||
xmlCtxtReadIO (xmlParserCtxtPtr ctxt,
|
||||
xmlInputReadCallback ioread,
|
||||
xmlInputCloseCallback ioclose,
|
||||
@@ -1235,7 +1375,7 @@ typedef enum {
|
||||
XML_WITH_NONE = 99999 /* just to be sure of allocation size */
|
||||
} xmlFeature;
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlHasFeature (xmlFeature feature);
|
||||
|
||||
#ifdef __cplusplus
|
||||
+150
-143
@@ -16,6 +16,7 @@
|
||||
#include <libxml/parser.h>
|
||||
#include <libxml/HTMLparser.h>
|
||||
#include <libxml/chvalid.h>
|
||||
#include <libxml/SAX2.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -40,6 +41,13 @@ XMLPUBVAR unsigned int xmlParserMaxDepth;
|
||||
*/
|
||||
#define XML_MAX_TEXT_LENGTH 10000000
|
||||
|
||||
/**
|
||||
* XML_MAX_HUGE_LENGTH:
|
||||
*
|
||||
* Maximum size allowed when XML_PARSE_HUGE is set.
|
||||
*/
|
||||
#define XML_MAX_HUGE_LENGTH 1000000000
|
||||
|
||||
/**
|
||||
* XML_MAX_NAME_LENGTH:
|
||||
*
|
||||
@@ -278,34 +286,6 @@ XMLPUBVAR unsigned int xmlParserMaxDepth;
|
||||
*/
|
||||
#define IS_PUBIDCHAR_CH(c) xmlIsPubidChar_ch(c)
|
||||
|
||||
/**
|
||||
* SKIP_EOL:
|
||||
* @p: and UTF8 string pointer
|
||||
*
|
||||
* Skips the end of line chars.
|
||||
*/
|
||||
#define SKIP_EOL(p) \
|
||||
if (*(p) == 0x13) { p++ ; if (*(p) == 0x10) p++; } \
|
||||
if (*(p) == 0x10) { p++ ; if (*(p) == 0x13) p++; }
|
||||
|
||||
/**
|
||||
* MOVETO_ENDTAG:
|
||||
* @p: and UTF8 string pointer
|
||||
*
|
||||
* Skips to the next '>' char.
|
||||
*/
|
||||
#define MOVETO_ENDTAG(p) \
|
||||
while ((*p) && (*(p) != '>')) (p)++
|
||||
|
||||
/**
|
||||
* MOVETO_STARTTAG:
|
||||
* @p: and UTF8 string pointer
|
||||
*
|
||||
* Skips to the next '<' char.
|
||||
*/
|
||||
#define MOVETO_STARTTAG(p) \
|
||||
while ((*p) && (*(p) != '<')) (p)++
|
||||
|
||||
/**
|
||||
* Global variables used for predefined strings.
|
||||
*/
|
||||
@@ -316,71 +296,62 @@ XMLPUBVAR const xmlChar xmlStringComment[];
|
||||
/*
|
||||
* Function to finish the work of the macros where needed.
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL xmlIsLetter (int c);
|
||||
XMLPUBFUN int xmlIsLetter (int c);
|
||||
|
||||
/**
|
||||
* Parser context.
|
||||
*/
|
||||
XMLPUBFUN xmlParserCtxtPtr XMLCALL
|
||||
XMLPUBFUN xmlParserCtxtPtr
|
||||
xmlCreateFileParserCtxt (const char *filename);
|
||||
XMLPUBFUN xmlParserCtxtPtr XMLCALL
|
||||
XMLPUBFUN xmlParserCtxtPtr
|
||||
xmlCreateURLParserCtxt (const char *filename,
|
||||
int options);
|
||||
XMLPUBFUN xmlParserCtxtPtr XMLCALL
|
||||
XMLPUBFUN xmlParserCtxtPtr
|
||||
xmlCreateMemoryParserCtxt(const char *buffer,
|
||||
int size);
|
||||
XMLPUBFUN xmlParserCtxtPtr XMLCALL
|
||||
XMLPUBFUN xmlParserCtxtPtr
|
||||
xmlCreateEntityParserCtxt(const xmlChar *URL,
|
||||
const xmlChar *ID,
|
||||
const xmlChar *base);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlSwitchEncoding (xmlParserCtxtPtr ctxt,
|
||||
xmlCharEncoding enc);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlSwitchToEncoding (xmlParserCtxtPtr ctxt,
|
||||
xmlCharEncodingHandlerPtr handler);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlSwitchInputEncoding (xmlParserCtxtPtr ctxt,
|
||||
xmlParserInputPtr input,
|
||||
xmlCharEncodingHandlerPtr handler);
|
||||
|
||||
#ifdef IN_LIBXML
|
||||
/* internal error reporting */
|
||||
XMLPUBFUN void XMLCALL
|
||||
__xmlErrEncoding (xmlParserCtxtPtr ctxt,
|
||||
xmlParserErrors xmlerr,
|
||||
const char *msg,
|
||||
const xmlChar * str1,
|
||||
const xmlChar * str2) LIBXML_ATTR_FORMAT(3,0);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Input Streams.
|
||||
*/
|
||||
XMLPUBFUN xmlParserInputPtr XMLCALL
|
||||
XMLPUBFUN xmlParserInputPtr
|
||||
xmlNewStringInputStream (xmlParserCtxtPtr ctxt,
|
||||
const xmlChar *buffer);
|
||||
XMLPUBFUN xmlParserInputPtr XMLCALL
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlParserInputPtr
|
||||
xmlNewEntityInputStream (xmlParserCtxtPtr ctxt,
|
||||
xmlEntityPtr entity);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlPushInput (xmlParserCtxtPtr ctxt,
|
||||
xmlParserInputPtr input);
|
||||
XMLPUBFUN xmlChar XMLCALL
|
||||
XMLPUBFUN xmlChar
|
||||
xmlPopInput (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlFreeInputStream (xmlParserInputPtr input);
|
||||
XMLPUBFUN xmlParserInputPtr XMLCALL
|
||||
XMLPUBFUN xmlParserInputPtr
|
||||
xmlNewInputFromFile (xmlParserCtxtPtr ctxt,
|
||||
const char *filename);
|
||||
XMLPUBFUN xmlParserInputPtr XMLCALL
|
||||
XMLPUBFUN xmlParserInputPtr
|
||||
xmlNewInputStream (xmlParserCtxtPtr ctxt);
|
||||
|
||||
/**
|
||||
* Namespaces.
|
||||
*/
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlSplitQName (xmlParserCtxtPtr ctxt,
|
||||
const xmlChar *name,
|
||||
xmlChar **prefix);
|
||||
@@ -388,109 +359,151 @@ XMLPUBFUN xmlChar * XMLCALL
|
||||
/**
|
||||
* Generic production rules.
|
||||
*/
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN const xmlChar *
|
||||
xmlParseName (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlParseNmtoken (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlParseEntityValue (xmlParserCtxtPtr ctxt,
|
||||
xmlChar **orig);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlParseAttValue (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlParseSystemLiteral (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlParsePubidLiteral (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
xmlParseCharData (xmlParserCtxtPtr ctxt,
|
||||
int cdata);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlParseExternalID (xmlParserCtxtPtr ctxt,
|
||||
xmlChar **publicID,
|
||||
int strict);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
xmlParseComment (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN const xmlChar *
|
||||
xmlParsePITarget (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
xmlParsePI (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
xmlParseNotationDecl (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
xmlParseEntityDecl (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlParseDefaultDecl (xmlParserCtxtPtr ctxt,
|
||||
xmlChar **value);
|
||||
XMLPUBFUN xmlEnumerationPtr XMLCALL
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlEnumerationPtr
|
||||
xmlParseNotationType (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN xmlEnumerationPtr XMLCALL
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlEnumerationPtr
|
||||
xmlParseEnumerationType (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlParseEnumeratedType (xmlParserCtxtPtr ctxt,
|
||||
xmlEnumerationPtr *tree);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlParseAttributeType (xmlParserCtxtPtr ctxt,
|
||||
xmlEnumerationPtr *tree);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
xmlParseAttributeListDecl(xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN xmlElementContentPtr XMLCALL
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlElementContentPtr
|
||||
xmlParseElementMixedContentDecl
|
||||
(xmlParserCtxtPtr ctxt,
|
||||
int inputchk);
|
||||
XMLPUBFUN xmlElementContentPtr XMLCALL
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlElementContentPtr
|
||||
xmlParseElementChildrenContentDecl
|
||||
(xmlParserCtxtPtr ctxt,
|
||||
int inputchk);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlParseElementContentDecl(xmlParserCtxtPtr ctxt,
|
||||
const xmlChar *name,
|
||||
xmlElementContentPtr *result);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlParseElementDecl (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
xmlParseMarkupDecl (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlParseCharRef (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN xmlEntityPtr XMLCALL
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlEntityPtr
|
||||
xmlParseEntityRef (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
xmlParseReference (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
xmlParsePEReference (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
xmlParseDocTypeDecl (xmlParserCtxtPtr ctxt);
|
||||
#ifdef LIBXML_SAX1_ENABLED
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN const xmlChar *
|
||||
xmlParseAttribute (xmlParserCtxtPtr ctxt,
|
||||
xmlChar **value);
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN const xmlChar *
|
||||
xmlParseStartTag (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
xmlParseEndTag (xmlParserCtxtPtr ctxt);
|
||||
#endif /* LIBXML_SAX1_ENABLED */
|
||||
XMLPUBFUN void XMLCALL
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
xmlParseCDSect (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlParseContent (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
xmlParseElement (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlParseVersionNum (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlParseVersionInfo (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlParseEncName (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN const xmlChar *
|
||||
xmlParseEncodingDecl (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlParseSDDecl (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
xmlParseXMLDecl (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
xmlParseTextDecl (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
xmlParseMisc (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlParseExternalSubset (xmlParserCtxtPtr ctxt,
|
||||
const xmlChar *ExternalID,
|
||||
const xmlChar *SystemID);
|
||||
@@ -519,14 +532,16 @@ XMLPUBFUN void XMLCALL
|
||||
*/
|
||||
#define XML_SUBSTITUTE_BOTH 3
|
||||
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlStringDecodeEntities (xmlParserCtxtPtr ctxt,
|
||||
const xmlChar *str,
|
||||
int what,
|
||||
xmlChar end,
|
||||
xmlChar end2,
|
||||
xmlChar end3);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlStringLenDecodeEntities (xmlParserCtxtPtr ctxt,
|
||||
const xmlChar *str,
|
||||
int len,
|
||||
@@ -538,48 +553,49 @@ XMLPUBFUN xmlChar * XMLCALL
|
||||
/*
|
||||
* Generated by MACROS on top of parser.c c.f. PUSH_AND_POP.
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL nodePush (xmlParserCtxtPtr ctxt,
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int nodePush (xmlParserCtxtPtr ctxt,
|
||||
xmlNodePtr value);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL nodePop (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN int XMLCALL inputPush (xmlParserCtxtPtr ctxt,
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlNodePtr nodePop (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN int inputPush (xmlParserCtxtPtr ctxt,
|
||||
xmlParserInputPtr value);
|
||||
XMLPUBFUN xmlParserInputPtr XMLCALL inputPop (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN const xmlChar * XMLCALL namePop (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN int XMLCALL namePush (xmlParserCtxtPtr ctxt,
|
||||
XMLPUBFUN xmlParserInputPtr inputPop (xmlParserCtxtPtr ctxt);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN const xmlChar * namePop (xmlParserCtxtPtr ctxt);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int namePush (xmlParserCtxtPtr ctxt,
|
||||
const xmlChar *value);
|
||||
|
||||
/*
|
||||
* other commodities shared between parser.c and parserInternals.
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL xmlSkipBlankChars (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN int XMLCALL xmlStringCurrentChar (xmlParserCtxtPtr ctxt,
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int xmlSkipBlankChars (xmlParserCtxtPtr ctxt);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int xmlStringCurrentChar (xmlParserCtxtPtr ctxt,
|
||||
const xmlChar *cur,
|
||||
int *len);
|
||||
XMLPUBFUN void XMLCALL xmlParserHandlePEReference(xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN int XMLCALL xmlCheckLanguageID (const xmlChar *lang);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void xmlParserHandlePEReference(xmlParserCtxtPtr ctxt);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int xmlCheckLanguageID (const xmlChar *lang);
|
||||
|
||||
/*
|
||||
* Really core function shared with HTML parser.
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL xmlCurrentChar (xmlParserCtxtPtr ctxt,
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int xmlCurrentChar (xmlParserCtxtPtr ctxt,
|
||||
int *len);
|
||||
XMLPUBFUN int XMLCALL xmlCopyCharMultiByte (xmlChar *out,
|
||||
XMLPUBFUN int xmlCopyCharMultiByte (xmlChar *out,
|
||||
int val);
|
||||
XMLPUBFUN int XMLCALL xmlCopyChar (int len,
|
||||
XMLPUBFUN int xmlCopyChar (int len,
|
||||
xmlChar *out,
|
||||
int val);
|
||||
XMLPUBFUN void XMLCALL xmlNextChar (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL xmlParserInputShrink (xmlParserInputPtr in);
|
||||
|
||||
#ifdef LIBXML_HTML_ENABLED
|
||||
/*
|
||||
* Actually comes from the HTML parser but launched from the init stuff.
|
||||
*/
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void XMLCALL htmlInitAutoClose (void);
|
||||
XMLPUBFUN htmlParserCtxtPtr XMLCALL htmlCreateFileParserCtxt(const char *filename,
|
||||
const char *encoding);
|
||||
#endif
|
||||
XMLPUBFUN void xmlNextChar (xmlParserCtxtPtr ctxt);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void xmlParserInputShrink (xmlParserInputPtr in);
|
||||
|
||||
/*
|
||||
* Specific function to keep track of entities references
|
||||
@@ -600,34 +616,34 @@ typedef void (*xmlEntityReferenceFunc) (xmlEntityPtr ent,
|
||||
xmlNodePtr lastNode);
|
||||
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void XMLCALL xmlSetEntityReferenceFunc (xmlEntityReferenceFunc func);
|
||||
XMLPUBFUN void xmlSetEntityReferenceFunc (xmlEntityReferenceFunc func);
|
||||
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlParseQuotedString (xmlParserCtxtPtr ctxt);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlParseNamespace (xmlParserCtxtPtr ctxt);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlNamespaceParseNSDef (xmlParserCtxtPtr ctxt);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlScanName (xmlParserCtxtPtr ctxt);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlNamespaceParseNCName (xmlParserCtxtPtr ctxt);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void XMLCALL xmlParserHandleReference(xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void xmlParserHandleReference(xmlParserCtxtPtr ctxt);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlNamespaceParseQName (xmlParserCtxtPtr ctxt,
|
||||
xmlChar **prefix);
|
||||
/**
|
||||
* Entities
|
||||
*/
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlDecodeEntities (xmlParserCtxtPtr ctxt,
|
||||
int len,
|
||||
int what,
|
||||
@@ -635,21 +651,12 @@ XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlChar end2,
|
||||
xmlChar end3);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlHandleEntity (xmlParserCtxtPtr ctxt,
|
||||
xmlEntityPtr entity);
|
||||
|
||||
#endif /* LIBXML_LEGACY_ENABLED */
|
||||
|
||||
#ifdef IN_LIBXML
|
||||
/*
|
||||
* internal only
|
||||
*/
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlErrMemory (xmlParserCtxtPtr ctxt,
|
||||
const char *extra);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
Vendored
+15
-15
@@ -43,18 +43,18 @@ typedef enum {
|
||||
XML_PATTERN_XSFIELD = 1<<2 /* XPath subset for schema field */
|
||||
} xmlPatternFlags;
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlFreePattern (xmlPatternPtr comp);
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlFreePatternList (xmlPatternPtr comp);
|
||||
|
||||
XMLPUBFUN xmlPatternPtr XMLCALL
|
||||
XMLPUBFUN xmlPatternPtr
|
||||
xmlPatterncompile (const xmlChar *pattern,
|
||||
xmlDict *dict,
|
||||
int flags,
|
||||
const xmlChar **namespaces);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlPatternMatch (xmlPatternPtr comp,
|
||||
xmlNodePtr node);
|
||||
|
||||
@@ -62,34 +62,34 @@ XMLPUBFUN int XMLCALL
|
||||
typedef struct _xmlStreamCtxt xmlStreamCtxt;
|
||||
typedef xmlStreamCtxt *xmlStreamCtxtPtr;
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlPatternStreamable (xmlPatternPtr comp);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlPatternMaxDepth (xmlPatternPtr comp);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlPatternMinDepth (xmlPatternPtr comp);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlPatternFromRoot (xmlPatternPtr comp);
|
||||
XMLPUBFUN xmlStreamCtxtPtr XMLCALL
|
||||
XMLPUBFUN xmlStreamCtxtPtr
|
||||
xmlPatternGetStreamCtxt (xmlPatternPtr comp);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlFreeStreamCtxt (xmlStreamCtxtPtr stream);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlStreamPushNode (xmlStreamCtxtPtr stream,
|
||||
const xmlChar *name,
|
||||
const xmlChar *ns,
|
||||
int nodeType);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlStreamPush (xmlStreamCtxtPtr stream,
|
||||
const xmlChar *name,
|
||||
const xmlChar *ns);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlStreamPushAttr (xmlStreamCtxtPtr stream,
|
||||
const xmlChar *name,
|
||||
const xmlChar *ns);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlStreamPop (xmlStreamCtxtPtr stream);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlStreamWantsAnyNode (xmlStreamCtxtPtr stream);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
Vendored
+28
-27
@@ -11,8 +11,9 @@
|
||||
#define __XML_RELAX_NG__
|
||||
|
||||
#include <libxml/xmlversion.h>
|
||||
#include <libxml/hash.h>
|
||||
#include <libxml/xmlerror.h>
|
||||
#include <libxml/xmlstring.h>
|
||||
#include <libxml/tree.h>
|
||||
|
||||
#ifdef LIBXML_SCHEMAS_ENABLED
|
||||
|
||||
@@ -32,7 +33,7 @@ typedef xmlRelaxNG *xmlRelaxNGPtr;
|
||||
*
|
||||
* Signature of an error callback from a Relax-NG validation
|
||||
*/
|
||||
typedef void (XMLCDECL *xmlRelaxNGValidityErrorFunc) (void *ctx,
|
||||
typedef void (*xmlRelaxNGValidityErrorFunc) (void *ctx,
|
||||
const char *msg,
|
||||
...) LIBXML_ATTR_FORMAT(2,3);
|
||||
|
||||
@@ -44,7 +45,7 @@ typedef void (XMLCDECL *xmlRelaxNGValidityErrorFunc) (void *ctx,
|
||||
*
|
||||
* Signature of a warning callback from a Relax-NG validation
|
||||
*/
|
||||
typedef void (XMLCDECL *xmlRelaxNGValidityWarningFunc) (void *ctx,
|
||||
typedef void (*xmlRelaxNGValidityWarningFunc) (void *ctx,
|
||||
const char *msg,
|
||||
...) LIBXML_ATTR_FORMAT(2,3);
|
||||
|
||||
@@ -116,95 +117,95 @@ typedef enum {
|
||||
XML_RELAXNGP_CRNG = 2
|
||||
} xmlRelaxNGParserFlag;
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlRelaxNGInitTypes (void);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlRelaxNGCleanupTypes (void);
|
||||
|
||||
/*
|
||||
* Interfaces for parsing.
|
||||
*/
|
||||
XMLPUBFUN xmlRelaxNGParserCtxtPtr XMLCALL
|
||||
XMLPUBFUN xmlRelaxNGParserCtxtPtr
|
||||
xmlRelaxNGNewParserCtxt (const char *URL);
|
||||
XMLPUBFUN xmlRelaxNGParserCtxtPtr XMLCALL
|
||||
XMLPUBFUN xmlRelaxNGParserCtxtPtr
|
||||
xmlRelaxNGNewMemParserCtxt (const char *buffer,
|
||||
int size);
|
||||
XMLPUBFUN xmlRelaxNGParserCtxtPtr XMLCALL
|
||||
XMLPUBFUN xmlRelaxNGParserCtxtPtr
|
||||
xmlRelaxNGNewDocParserCtxt (xmlDocPtr doc);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlRelaxParserSetFlag (xmlRelaxNGParserCtxtPtr ctxt,
|
||||
int flag);
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlRelaxNGFreeParserCtxt (xmlRelaxNGParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlRelaxNGSetParserErrors(xmlRelaxNGParserCtxtPtr ctxt,
|
||||
xmlRelaxNGValidityErrorFunc err,
|
||||
xmlRelaxNGValidityWarningFunc warn,
|
||||
void *ctx);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlRelaxNGGetParserErrors(xmlRelaxNGParserCtxtPtr ctxt,
|
||||
xmlRelaxNGValidityErrorFunc *err,
|
||||
xmlRelaxNGValidityWarningFunc *warn,
|
||||
void **ctx);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlRelaxNGSetParserStructuredErrors(
|
||||
xmlRelaxNGParserCtxtPtr ctxt,
|
||||
xmlStructuredErrorFunc serror,
|
||||
void *ctx);
|
||||
XMLPUBFUN xmlRelaxNGPtr XMLCALL
|
||||
XMLPUBFUN xmlRelaxNGPtr
|
||||
xmlRelaxNGParse (xmlRelaxNGParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlRelaxNGFree (xmlRelaxNGPtr schema);
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlRelaxNGDump (FILE *output,
|
||||
xmlRelaxNGPtr schema);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlRelaxNGDumpTree (FILE * output,
|
||||
xmlRelaxNGPtr schema);
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
/*
|
||||
* Interfaces for validating
|
||||
*/
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlRelaxNGSetValidErrors(xmlRelaxNGValidCtxtPtr ctxt,
|
||||
xmlRelaxNGValidityErrorFunc err,
|
||||
xmlRelaxNGValidityWarningFunc warn,
|
||||
void *ctx);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlRelaxNGGetValidErrors(xmlRelaxNGValidCtxtPtr ctxt,
|
||||
xmlRelaxNGValidityErrorFunc *err,
|
||||
xmlRelaxNGValidityWarningFunc *warn,
|
||||
void **ctx);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlRelaxNGSetValidStructuredErrors(xmlRelaxNGValidCtxtPtr ctxt,
|
||||
xmlStructuredErrorFunc serror, void *ctx);
|
||||
XMLPUBFUN xmlRelaxNGValidCtxtPtr XMLCALL
|
||||
XMLPUBFUN xmlRelaxNGValidCtxtPtr
|
||||
xmlRelaxNGNewValidCtxt (xmlRelaxNGPtr schema);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlRelaxNGFreeValidCtxt (xmlRelaxNGValidCtxtPtr ctxt);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlRelaxNGValidateDoc (xmlRelaxNGValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc);
|
||||
/*
|
||||
* Interfaces for progressive validation when possible
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlRelaxNGValidatePushElement (xmlRelaxNGValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc,
|
||||
xmlNodePtr elem);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlRelaxNGValidatePushCData (xmlRelaxNGValidCtxtPtr ctxt,
|
||||
const xmlChar *data,
|
||||
int len);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlRelaxNGValidatePopElement (xmlRelaxNGValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc,
|
||||
xmlNodePtr elem);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlRelaxNGValidateFullElement (xmlRelaxNGValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc,
|
||||
xmlNodePtr elem);
|
||||
+3
-2
@@ -21,6 +21,7 @@
|
||||
#include <libxml/xmlregexp.h>
|
||||
#include <libxml/hash.h>
|
||||
#include <libxml/dict.h>
|
||||
#include <libxml/tree.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -947,8 +948,8 @@ struct _xmlSchema {
|
||||
void *volatiles; /* Obsolete */
|
||||
};
|
||||
|
||||
XMLPUBFUN void XMLCALL xmlSchemaFreeType (xmlSchemaTypePtr type);
|
||||
XMLPUBFUN void XMLCALL xmlSchemaFreeWildcard(xmlSchemaWildcardPtr wildcard);
|
||||
XMLPUBFUN void xmlSchemaFreeType (xmlSchemaTypePtr type);
|
||||
XMLPUBFUN void xmlSchemaFreeWildcard(xmlSchemaWildcardPtr wildcard);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
Vendored
+24
-28
@@ -29,59 +29,55 @@ typedef xmlMutex *xmlMutexPtr;
|
||||
typedef struct _xmlRMutex xmlRMutex;
|
||||
typedef xmlRMutex *xmlRMutexPtr;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include <libxml/globals.h>
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
XMLPUBFUN xmlMutexPtr XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlCheckThreadLocalStorage(void);
|
||||
|
||||
XMLPUBFUN xmlMutexPtr
|
||||
xmlNewMutex (void);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlMutexLock (xmlMutexPtr tok);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlMutexUnlock (xmlMutexPtr tok);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlFreeMutex (xmlMutexPtr tok);
|
||||
|
||||
XMLPUBFUN xmlRMutexPtr XMLCALL
|
||||
XMLPUBFUN xmlRMutexPtr
|
||||
xmlNewRMutex (void);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlRMutexLock (xmlRMutexPtr tok);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlRMutexUnlock (xmlRMutexPtr tok);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlFreeRMutex (xmlRMutexPtr tok);
|
||||
|
||||
/*
|
||||
* Library wide APIs.
|
||||
*/
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlInitThreads (void);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlLockLibrary (void);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlUnlockLibrary(void);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlGetThreadId (void);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlIsMainThread (void);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlCleanupThreads(void);
|
||||
XMLPUBFUN xmlGlobalStatePtr XMLCALL
|
||||
xmlGetGlobalState(void);
|
||||
|
||||
#ifdef HAVE_PTHREAD_H
|
||||
#elif defined(HAVE_WIN32_THREADS) && !defined(HAVE_COMPILER_TLS) && (!defined(LIBXML_STATIC) || defined(LIBXML_STATIC_FOR_DLL))
|
||||
#if defined(LIBXML_STATIC_FOR_DLL)
|
||||
int XMLCALL
|
||||
/** DOC_DISABLE */
|
||||
#if defined(LIBXML_THREAD_ENABLED) && defined(_WIN32) && \
|
||||
defined(LIBXML_STATIC_FOR_DLL)
|
||||
int
|
||||
xmlDllMain(void *hinstDLL, unsigned long fdwReason,
|
||||
void *lpvReserved);
|
||||
#endif
|
||||
#endif
|
||||
/** DOC_ENABLE */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
+233
-184
@@ -9,6 +9,15 @@
|
||||
* Author: Daniel Veillard
|
||||
*/
|
||||
|
||||
#ifndef XML_TREE_INTERNALS
|
||||
|
||||
/*
|
||||
* Emulate circular dependency for backward compatibility
|
||||
*/
|
||||
#include <libxml/parser.h>
|
||||
|
||||
#else /* XML_TREE_INTERNALS */
|
||||
|
||||
#ifndef __XML_TREE_H__
|
||||
#define __XML_TREE_H__
|
||||
|
||||
@@ -16,6 +25,8 @@
|
||||
#include <limits.h>
|
||||
#include <libxml/xmlversion.h>
|
||||
#include <libxml/xmlstring.h>
|
||||
#include <libxml/xmlmemory.h>
|
||||
#include <libxml/xmlregexp.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -74,7 +85,7 @@ typedef xmlEntity *xmlEntityPtr;
|
||||
typedef enum {
|
||||
XML_BUFFER_ALLOC_DOUBLEIT, /* double each time one need to grow */
|
||||
XML_BUFFER_ALLOC_EXACT, /* grow only to the minimal size */
|
||||
XML_BUFFER_ALLOC_IMMUTABLE, /* immutable buffer */
|
||||
XML_BUFFER_ALLOC_IMMUTABLE, /* immutable buffer, deprecated */
|
||||
XML_BUFFER_ALLOC_IO, /* special allocation scheme used for I/O */
|
||||
XML_BUFFER_ALLOC_HYBRID, /* exact up to a threshold, and doubleit thereafter */
|
||||
XML_BUFFER_ALLOC_BOUNDED /* limit the upper size of the buffer */
|
||||
@@ -117,10 +128,10 @@ typedef xmlBuf *xmlBufPtr;
|
||||
* A few public routines for xmlBuf. As those are expected to be used
|
||||
* mostly internally the bulk of the routines are internal in buf.h
|
||||
*/
|
||||
XMLPUBFUN xmlChar* XMLCALL xmlBufContent (const xmlBuf* buf);
|
||||
XMLPUBFUN xmlChar* XMLCALL xmlBufEnd (xmlBufPtr buf);
|
||||
XMLPUBFUN size_t XMLCALL xmlBufUse (const xmlBufPtr buf);
|
||||
XMLPUBFUN size_t XMLCALL xmlBufShrink (xmlBufPtr buf, size_t len);
|
||||
XMLPUBFUN xmlChar* xmlBufContent (const xmlBuf* buf);
|
||||
XMLPUBFUN xmlChar* xmlBufEnd (xmlBufPtr buf);
|
||||
XMLPUBFUN size_t xmlBufUse (const xmlBufPtr buf);
|
||||
XMLPUBFUN size_t xmlBufShrink (xmlBufPtr buf, size_t len);
|
||||
|
||||
/*
|
||||
* LIBXML2_NEW_BUFFER:
|
||||
@@ -180,8 +191,10 @@ typedef enum {
|
||||
/* XML_DOCB_DOCUMENT_NODE= 21 */ /* removed */
|
||||
} xmlElementType;
|
||||
|
||||
/** DOC_DISABLE */
|
||||
/* For backward compatibility */
|
||||
#define XML_DOCB_DOCUMENT_NODE 21
|
||||
/** DOC_ENABLE */
|
||||
|
||||
/**
|
||||
* xmlNotation:
|
||||
@@ -327,14 +340,6 @@ typedef enum {
|
||||
XML_ELEMENT_TYPE_ELEMENT
|
||||
} xmlElementTypeVal;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include <libxml/xmlregexp.h>
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* xmlElement:
|
||||
*
|
||||
@@ -571,12 +576,11 @@ struct _xmlDoc {
|
||||
struct _xmlDtd *extSubset; /* the document external subset */
|
||||
struct _xmlNs *oldNs; /* Global namespace, the old way */
|
||||
const xmlChar *version; /* the XML version string */
|
||||
const xmlChar *encoding; /* external initial encoding, if any */
|
||||
const xmlChar *encoding; /* actual encoding, if any */
|
||||
void *ids; /* Hash table for ID attributes if any */
|
||||
void *refs; /* Hash table for IDREFs attributes if any */
|
||||
const xmlChar *URL; /* The URI for that document */
|
||||
int charset; /* Internal flag for charset handling,
|
||||
actually an xmlCharEncoding */
|
||||
int charset; /* unused */
|
||||
struct _xmlDict *dict; /* dict used to allocate names or NULL */
|
||||
void *psvi; /* for type/PSVI information */
|
||||
int parseFlags; /* set of xmlParserOption used to parse the
|
||||
@@ -628,6 +632,22 @@ struct _xmlDOMWrapCtxt {
|
||||
xmlDOMWrapAcquireNsFunction getNsForNodeFunc;
|
||||
};
|
||||
|
||||
/**
|
||||
* xmlRegisterNodeFunc:
|
||||
* @node: the current node
|
||||
*
|
||||
* Signature for the registration callback of a created node
|
||||
*/
|
||||
typedef void (*xmlRegisterNodeFunc) (xmlNodePtr node);
|
||||
|
||||
/**
|
||||
* xmlDeregisterNodeFunc:
|
||||
* @node: the current node
|
||||
*
|
||||
* Signature for the deregistration callback of a discarded node
|
||||
*/
|
||||
typedef void (*xmlDeregisterNodeFunc) (xmlNodePtr node);
|
||||
|
||||
/**
|
||||
* xmlChildrenNode:
|
||||
*
|
||||
@@ -652,40 +672,56 @@ struct _xmlDOMWrapCtxt {
|
||||
* Variables.
|
||||
*/
|
||||
|
||||
/** DOC_DISABLE */
|
||||
#define XML_GLOBALS_TREE \
|
||||
XML_OP(xmlBufferAllocScheme, xmlBufferAllocationScheme, XML_DEPRECATED) \
|
||||
XML_OP(xmlDefaultBufferSize, int, XML_DEPRECATED) \
|
||||
XML_OP(xmlRegisterNodeDefaultValue, xmlRegisterNodeFunc, XML_DEPRECATED) \
|
||||
XML_OP(xmlDeregisterNodeDefaultValue, xmlDeregisterNodeFunc, \
|
||||
XML_DEPRECATED)
|
||||
|
||||
#define XML_OP XML_DECLARE_GLOBAL
|
||||
XML_GLOBALS_TREE
|
||||
#undef XML_OP
|
||||
|
||||
#if defined(LIBXML_THREAD_ENABLED) && !defined(XML_GLOBALS_NO_REDEFINITION)
|
||||
#define xmlBufferAllocScheme XML_GLOBAL_MACRO(xmlBufferAllocScheme)
|
||||
#define xmlDefaultBufferSize XML_GLOBAL_MACRO(xmlDefaultBufferSize)
|
||||
#define xmlRegisterNodeDefaultValue \
|
||||
XML_GLOBAL_MACRO(xmlRegisterNodeDefaultValue)
|
||||
#define xmlDeregisterNodeDefaultValue \
|
||||
XML_GLOBAL_MACRO(xmlDeregisterNodeDefaultValue)
|
||||
#endif
|
||||
/** DOC_ENABLE */
|
||||
|
||||
/*
|
||||
* Some helper functions
|
||||
*/
|
||||
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || \
|
||||
defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_DEBUG_ENABLED) || \
|
||||
defined (LIBXML_HTML_ENABLED) || defined(LIBXML_SAX1_ENABLED) || \
|
||||
defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || \
|
||||
defined(LIBXML_LEGACY_ENABLED)
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlValidateNCName (const xmlChar *value,
|
||||
int space);
|
||||
#endif
|
||||
|
||||
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlValidateQName (const xmlChar *value,
|
||||
int space);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlValidateName (const xmlChar *value,
|
||||
int space);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlValidateNMToken (const xmlChar *value,
|
||||
int space);
|
||||
#endif
|
||||
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlBuildQName (const xmlChar *ncname,
|
||||
const xmlChar *prefix,
|
||||
xmlChar *memory,
|
||||
int len);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlSplitQName2 (const xmlChar *name,
|
||||
xmlChar **prefix);
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
XMLPUBFUN const xmlChar *
|
||||
xmlSplitQName3 (const xmlChar *name,
|
||||
int *len);
|
||||
|
||||
@@ -693,318 +729,318 @@ XMLPUBFUN const xmlChar * XMLCALL
|
||||
* Handling Buffers, the old ones see @xmlBuf for the new ones.
|
||||
*/
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlSetBufferAllocationScheme(xmlBufferAllocationScheme scheme);
|
||||
XMLPUBFUN xmlBufferAllocationScheme XMLCALL
|
||||
XMLPUBFUN xmlBufferAllocationScheme
|
||||
xmlGetBufferAllocationScheme(void);
|
||||
|
||||
XMLPUBFUN xmlBufferPtr XMLCALL
|
||||
XMLPUBFUN xmlBufferPtr
|
||||
xmlBufferCreate (void);
|
||||
XMLPUBFUN xmlBufferPtr XMLCALL
|
||||
XMLPUBFUN xmlBufferPtr
|
||||
xmlBufferCreateSize (size_t size);
|
||||
XMLPUBFUN xmlBufferPtr XMLCALL
|
||||
XMLPUBFUN xmlBufferPtr
|
||||
xmlBufferCreateStatic (void *mem,
|
||||
size_t size);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlBufferResize (xmlBufferPtr buf,
|
||||
unsigned int size);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlBufferFree (xmlBufferPtr buf);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlBufferDump (FILE *file,
|
||||
xmlBufferPtr buf);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlBufferAdd (xmlBufferPtr buf,
|
||||
const xmlChar *str,
|
||||
int len);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlBufferAddHead (xmlBufferPtr buf,
|
||||
const xmlChar *str,
|
||||
int len);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlBufferCat (xmlBufferPtr buf,
|
||||
const xmlChar *str);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlBufferCCat (xmlBufferPtr buf,
|
||||
const char *str);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlBufferShrink (xmlBufferPtr buf,
|
||||
unsigned int len);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlBufferGrow (xmlBufferPtr buf,
|
||||
unsigned int len);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlBufferEmpty (xmlBufferPtr buf);
|
||||
XMLPUBFUN const xmlChar* XMLCALL
|
||||
XMLPUBFUN const xmlChar*
|
||||
xmlBufferContent (const xmlBuffer *buf);
|
||||
XMLPUBFUN xmlChar* XMLCALL
|
||||
XMLPUBFUN xmlChar*
|
||||
xmlBufferDetach (xmlBufferPtr buf);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlBufferSetAllocationScheme(xmlBufferPtr buf,
|
||||
xmlBufferAllocationScheme scheme);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlBufferLength (const xmlBuffer *buf);
|
||||
|
||||
/*
|
||||
* Creating/freeing new structures.
|
||||
*/
|
||||
XMLPUBFUN xmlDtdPtr XMLCALL
|
||||
XMLPUBFUN xmlDtdPtr
|
||||
xmlCreateIntSubset (xmlDocPtr doc,
|
||||
const xmlChar *name,
|
||||
const xmlChar *ExternalID,
|
||||
const xmlChar *SystemID);
|
||||
XMLPUBFUN xmlDtdPtr XMLCALL
|
||||
XMLPUBFUN xmlDtdPtr
|
||||
xmlNewDtd (xmlDocPtr doc,
|
||||
const xmlChar *name,
|
||||
const xmlChar *ExternalID,
|
||||
const xmlChar *SystemID);
|
||||
XMLPUBFUN xmlDtdPtr XMLCALL
|
||||
XMLPUBFUN xmlDtdPtr
|
||||
xmlGetIntSubset (const xmlDoc *doc);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlFreeDtd (xmlDtdPtr cur);
|
||||
#ifdef LIBXML_LEGACY_ENABLED
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlNsPtr XMLCALL
|
||||
XMLPUBFUN xmlNsPtr
|
||||
xmlNewGlobalNs (xmlDocPtr doc,
|
||||
const xmlChar *href,
|
||||
const xmlChar *prefix);
|
||||
#endif /* LIBXML_LEGACY_ENABLED */
|
||||
XMLPUBFUN xmlNsPtr XMLCALL
|
||||
XMLPUBFUN xmlNsPtr
|
||||
xmlNewNs (xmlNodePtr node,
|
||||
const xmlChar *href,
|
||||
const xmlChar *prefix);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlFreeNs (xmlNsPtr cur);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlFreeNsList (xmlNsPtr cur);
|
||||
XMLPUBFUN xmlDocPtr XMLCALL
|
||||
XMLPUBFUN xmlDocPtr
|
||||
xmlNewDoc (const xmlChar *version);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlFreeDoc (xmlDocPtr cur);
|
||||
XMLPUBFUN xmlAttrPtr XMLCALL
|
||||
XMLPUBFUN xmlAttrPtr
|
||||
xmlNewDocProp (xmlDocPtr doc,
|
||||
const xmlChar *name,
|
||||
const xmlChar *value);
|
||||
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || \
|
||||
defined(LIBXML_SCHEMAS_ENABLED)
|
||||
XMLPUBFUN xmlAttrPtr XMLCALL
|
||||
XMLPUBFUN xmlAttrPtr
|
||||
xmlNewProp (xmlNodePtr node,
|
||||
const xmlChar *name,
|
||||
const xmlChar *value);
|
||||
#endif
|
||||
XMLPUBFUN xmlAttrPtr XMLCALL
|
||||
XMLPUBFUN xmlAttrPtr
|
||||
xmlNewNsProp (xmlNodePtr node,
|
||||
xmlNsPtr ns,
|
||||
const xmlChar *name,
|
||||
const xmlChar *value);
|
||||
XMLPUBFUN xmlAttrPtr XMLCALL
|
||||
XMLPUBFUN xmlAttrPtr
|
||||
xmlNewNsPropEatName (xmlNodePtr node,
|
||||
xmlNsPtr ns,
|
||||
xmlChar *name,
|
||||
const xmlChar *value);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlFreePropList (xmlAttrPtr cur);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlFreeProp (xmlAttrPtr cur);
|
||||
XMLPUBFUN xmlAttrPtr XMLCALL
|
||||
XMLPUBFUN xmlAttrPtr
|
||||
xmlCopyProp (xmlNodePtr target,
|
||||
xmlAttrPtr cur);
|
||||
XMLPUBFUN xmlAttrPtr XMLCALL
|
||||
XMLPUBFUN xmlAttrPtr
|
||||
xmlCopyPropList (xmlNodePtr target,
|
||||
xmlAttrPtr cur);
|
||||
#ifdef LIBXML_TREE_ENABLED
|
||||
XMLPUBFUN xmlDtdPtr XMLCALL
|
||||
XMLPUBFUN xmlDtdPtr
|
||||
xmlCopyDtd (xmlDtdPtr dtd);
|
||||
#endif /* LIBXML_TREE_ENABLED */
|
||||
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
|
||||
XMLPUBFUN xmlDocPtr XMLCALL
|
||||
XMLPUBFUN xmlDocPtr
|
||||
xmlCopyDoc (xmlDocPtr doc,
|
||||
int recursive);
|
||||
#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
|
||||
/*
|
||||
* Creating new nodes.
|
||||
*/
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
XMLPUBFUN xmlNodePtr
|
||||
xmlNewDocNode (xmlDocPtr doc,
|
||||
xmlNsPtr ns,
|
||||
const xmlChar *name,
|
||||
const xmlChar *content);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
XMLPUBFUN xmlNodePtr
|
||||
xmlNewDocNodeEatName (xmlDocPtr doc,
|
||||
xmlNsPtr ns,
|
||||
xmlChar *name,
|
||||
const xmlChar *content);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
XMLPUBFUN xmlNodePtr
|
||||
xmlNewNode (xmlNsPtr ns,
|
||||
const xmlChar *name);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
XMLPUBFUN xmlNodePtr
|
||||
xmlNewNodeEatName (xmlNsPtr ns,
|
||||
xmlChar *name);
|
||||
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
XMLPUBFUN xmlNodePtr
|
||||
xmlNewChild (xmlNodePtr parent,
|
||||
xmlNsPtr ns,
|
||||
const xmlChar *name,
|
||||
const xmlChar *content);
|
||||
#endif
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
XMLPUBFUN xmlNodePtr
|
||||
xmlNewDocText (const xmlDoc *doc,
|
||||
const xmlChar *content);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
XMLPUBFUN xmlNodePtr
|
||||
xmlNewText (const xmlChar *content);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
XMLPUBFUN xmlNodePtr
|
||||
xmlNewDocPI (xmlDocPtr doc,
|
||||
const xmlChar *name,
|
||||
const xmlChar *content);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
XMLPUBFUN xmlNodePtr
|
||||
xmlNewPI (const xmlChar *name,
|
||||
const xmlChar *content);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
XMLPUBFUN xmlNodePtr
|
||||
xmlNewDocTextLen (xmlDocPtr doc,
|
||||
const xmlChar *content,
|
||||
int len);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
XMLPUBFUN xmlNodePtr
|
||||
xmlNewTextLen (const xmlChar *content,
|
||||
int len);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
XMLPUBFUN xmlNodePtr
|
||||
xmlNewDocComment (xmlDocPtr doc,
|
||||
const xmlChar *content);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
XMLPUBFUN xmlNodePtr
|
||||
xmlNewComment (const xmlChar *content);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
XMLPUBFUN xmlNodePtr
|
||||
xmlNewCDataBlock (xmlDocPtr doc,
|
||||
const xmlChar *content,
|
||||
int len);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
XMLPUBFUN xmlNodePtr
|
||||
xmlNewCharRef (xmlDocPtr doc,
|
||||
const xmlChar *name);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
XMLPUBFUN xmlNodePtr
|
||||
xmlNewReference (const xmlDoc *doc,
|
||||
const xmlChar *name);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
XMLPUBFUN xmlNodePtr
|
||||
xmlCopyNode (xmlNodePtr node,
|
||||
int recursive);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
XMLPUBFUN xmlNodePtr
|
||||
xmlDocCopyNode (xmlNodePtr node,
|
||||
xmlDocPtr doc,
|
||||
int recursive);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
XMLPUBFUN xmlNodePtr
|
||||
xmlDocCopyNodeList (xmlDocPtr doc,
|
||||
xmlNodePtr node);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
XMLPUBFUN xmlNodePtr
|
||||
xmlCopyNodeList (xmlNodePtr node);
|
||||
#ifdef LIBXML_TREE_ENABLED
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
XMLPUBFUN xmlNodePtr
|
||||
xmlNewTextChild (xmlNodePtr parent,
|
||||
xmlNsPtr ns,
|
||||
const xmlChar *name,
|
||||
const xmlChar *content);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
XMLPUBFUN xmlNodePtr
|
||||
xmlNewDocRawNode (xmlDocPtr doc,
|
||||
xmlNsPtr ns,
|
||||
const xmlChar *name,
|
||||
const xmlChar *content);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
XMLPUBFUN xmlNodePtr
|
||||
xmlNewDocFragment (xmlDocPtr doc);
|
||||
#endif /* LIBXML_TREE_ENABLED */
|
||||
|
||||
/*
|
||||
* Navigating.
|
||||
*/
|
||||
XMLPUBFUN long XMLCALL
|
||||
XMLPUBFUN long
|
||||
xmlGetLineNo (const xmlNode *node);
|
||||
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_DEBUG_ENABLED)
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlGetNodePath (const xmlNode *node);
|
||||
#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_DEBUG_ENABLED) */
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
XMLPUBFUN xmlNodePtr
|
||||
xmlDocGetRootElement (const xmlDoc *doc);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
XMLPUBFUN xmlNodePtr
|
||||
xmlGetLastChild (const xmlNode *parent);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlNodeIsText (const xmlNode *node);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlIsBlankNode (const xmlNode *node);
|
||||
|
||||
/*
|
||||
* Changing the structure.
|
||||
*/
|
||||
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED)
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
XMLPUBFUN xmlNodePtr
|
||||
xmlDocSetRootElement (xmlDocPtr doc,
|
||||
xmlNodePtr root);
|
||||
#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED) */
|
||||
#ifdef LIBXML_TREE_ENABLED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlNodeSetName (xmlNodePtr cur,
|
||||
const xmlChar *name);
|
||||
#endif /* LIBXML_TREE_ENABLED */
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
XMLPUBFUN xmlNodePtr
|
||||
xmlAddChild (xmlNodePtr parent,
|
||||
xmlNodePtr cur);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
XMLPUBFUN xmlNodePtr
|
||||
xmlAddChildList (xmlNodePtr parent,
|
||||
xmlNodePtr cur);
|
||||
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED)
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
XMLPUBFUN xmlNodePtr
|
||||
xmlReplaceNode (xmlNodePtr old,
|
||||
xmlNodePtr cur);
|
||||
#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED) */
|
||||
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || \
|
||||
defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED)
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
XMLPUBFUN xmlNodePtr
|
||||
xmlAddPrevSibling (xmlNodePtr cur,
|
||||
xmlNodePtr elem);
|
||||
#endif /* LIBXML_TREE_ENABLED || LIBXML_HTML_ENABLED || LIBXML_SCHEMAS_ENABLED */
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
XMLPUBFUN xmlNodePtr
|
||||
xmlAddSibling (xmlNodePtr cur,
|
||||
xmlNodePtr elem);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
XMLPUBFUN xmlNodePtr
|
||||
xmlAddNextSibling (xmlNodePtr cur,
|
||||
xmlNodePtr elem);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlUnlinkNode (xmlNodePtr cur);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
XMLPUBFUN xmlNodePtr
|
||||
xmlTextMerge (xmlNodePtr first,
|
||||
xmlNodePtr second);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlTextConcat (xmlNodePtr node,
|
||||
const xmlChar *content,
|
||||
int len);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlFreeNodeList (xmlNodePtr cur);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlFreeNode (xmlNodePtr cur);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlSetTreeDoc (xmlNodePtr tree,
|
||||
xmlDocPtr doc);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlSetListDoc (xmlNodePtr list,
|
||||
xmlDocPtr doc);
|
||||
/*
|
||||
* Namespaces.
|
||||
*/
|
||||
XMLPUBFUN xmlNsPtr XMLCALL
|
||||
XMLPUBFUN xmlNsPtr
|
||||
xmlSearchNs (xmlDocPtr doc,
|
||||
xmlNodePtr node,
|
||||
const xmlChar *nameSpace);
|
||||
XMLPUBFUN xmlNsPtr XMLCALL
|
||||
XMLPUBFUN xmlNsPtr
|
||||
xmlSearchNsByHref (xmlDocPtr doc,
|
||||
xmlNodePtr node,
|
||||
const xmlChar *href);
|
||||
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || \
|
||||
defined(LIBXML_SCHEMAS_ENABLED)
|
||||
XMLPUBFUN xmlNsPtr * XMLCALL
|
||||
XMLPUBFUN xmlNsPtr *
|
||||
xmlGetNsList (const xmlDoc *doc,
|
||||
const xmlNode *node);
|
||||
#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) */
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlSetNs (xmlNodePtr node,
|
||||
xmlNsPtr ns);
|
||||
XMLPUBFUN xmlNsPtr XMLCALL
|
||||
XMLPUBFUN xmlNsPtr
|
||||
xmlCopyNamespace (xmlNsPtr cur);
|
||||
XMLPUBFUN xmlNsPtr XMLCALL
|
||||
XMLPUBFUN xmlNsPtr
|
||||
xmlCopyNamespaceList (xmlNsPtr cur);
|
||||
|
||||
/*
|
||||
@@ -1012,94 +1048,94 @@ XMLPUBFUN xmlNsPtr XMLCALL
|
||||
*/
|
||||
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || \
|
||||
defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED)
|
||||
XMLPUBFUN xmlAttrPtr XMLCALL
|
||||
XMLPUBFUN xmlAttrPtr
|
||||
xmlSetProp (xmlNodePtr node,
|
||||
const xmlChar *name,
|
||||
const xmlChar *value);
|
||||
XMLPUBFUN xmlAttrPtr XMLCALL
|
||||
XMLPUBFUN xmlAttrPtr
|
||||
xmlSetNsProp (xmlNodePtr node,
|
||||
xmlNsPtr ns,
|
||||
const xmlChar *name,
|
||||
const xmlChar *value);
|
||||
#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || \
|
||||
defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED) */
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlGetNoNsProp (const xmlNode *node,
|
||||
const xmlChar *name);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlGetProp (const xmlNode *node,
|
||||
const xmlChar *name);
|
||||
XMLPUBFUN xmlAttrPtr XMLCALL
|
||||
XMLPUBFUN xmlAttrPtr
|
||||
xmlHasProp (const xmlNode *node,
|
||||
const xmlChar *name);
|
||||
XMLPUBFUN xmlAttrPtr XMLCALL
|
||||
XMLPUBFUN xmlAttrPtr
|
||||
xmlHasNsProp (const xmlNode *node,
|
||||
const xmlChar *name,
|
||||
const xmlChar *nameSpace);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlGetNsProp (const xmlNode *node,
|
||||
const xmlChar *name,
|
||||
const xmlChar *nameSpace);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
XMLPUBFUN xmlNodePtr
|
||||
xmlStringGetNodeList (const xmlDoc *doc,
|
||||
const xmlChar *value);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
XMLPUBFUN xmlNodePtr
|
||||
xmlStringLenGetNodeList (const xmlDoc *doc,
|
||||
const xmlChar *value,
|
||||
int len);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlNodeListGetString (xmlDocPtr doc,
|
||||
const xmlNode *list,
|
||||
int inLine);
|
||||
#ifdef LIBXML_TREE_ENABLED
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlNodeListGetRawString (const xmlDoc *doc,
|
||||
const xmlNode *list,
|
||||
int inLine);
|
||||
#endif /* LIBXML_TREE_ENABLED */
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlNodeSetContent (xmlNodePtr cur,
|
||||
const xmlChar *content);
|
||||
#ifdef LIBXML_TREE_ENABLED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlNodeSetContentLen (xmlNodePtr cur,
|
||||
const xmlChar *content,
|
||||
int len);
|
||||
#endif /* LIBXML_TREE_ENABLED */
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlNodeAddContent (xmlNodePtr cur,
|
||||
const xmlChar *content);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlNodeAddContentLen (xmlNodePtr cur,
|
||||
const xmlChar *content,
|
||||
int len);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlNodeGetContent (const xmlNode *cur);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlNodeBufGetContent (xmlBufferPtr buffer,
|
||||
const xmlNode *cur);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlBufGetNodeContent (xmlBufPtr buf,
|
||||
const xmlNode *cur);
|
||||
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlNodeGetLang (const xmlNode *cur);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlNodeGetSpacePreserve (const xmlNode *cur);
|
||||
#ifdef LIBXML_TREE_ENABLED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlNodeSetLang (xmlNodePtr cur,
|
||||
const xmlChar *lang);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlNodeSetSpacePreserve (xmlNodePtr cur,
|
||||
int val);
|
||||
#endif /* LIBXML_TREE_ENABLED */
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlNodeGetBase (const xmlDoc *doc,
|
||||
const xmlNode *cur);
|
||||
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED)
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlNodeSetBase (xmlNodePtr cur,
|
||||
const xmlChar *uri);
|
||||
#endif
|
||||
@@ -1107,14 +1143,14 @@ XMLPUBFUN void XMLCALL
|
||||
/*
|
||||
* Removing content.
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlRemoveProp (xmlAttrPtr cur);
|
||||
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlUnsetNsProp (xmlNodePtr node,
|
||||
xmlNsPtr ns,
|
||||
const xmlChar *name);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlUnsetProp (xmlNodePtr node,
|
||||
const xmlChar *name);
|
||||
#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
|
||||
@@ -1122,13 +1158,13 @@ XMLPUBFUN int XMLCALL
|
||||
/*
|
||||
* Internal, don't use.
|
||||
*/
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlBufferWriteCHAR (xmlBufferPtr buf,
|
||||
const xmlChar *string);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlBufferWriteChar (xmlBufferPtr buf,
|
||||
const char *string);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlBufferWriteQuotedString(xmlBufferPtr buf,
|
||||
const xmlChar *string);
|
||||
|
||||
@@ -1143,7 +1179,7 @@ XMLPUBFUN void xmlAttrSerializeTxtContent(xmlBufferPtr buf,
|
||||
/*
|
||||
* Namespace handling.
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlReconciliateNs (xmlDocPtr doc,
|
||||
xmlNodePtr tree);
|
||||
#endif
|
||||
@@ -1152,67 +1188,67 @@ XMLPUBFUN int XMLCALL
|
||||
/*
|
||||
* Saving.
|
||||
*/
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlDocDumpFormatMemory (xmlDocPtr cur,
|
||||
xmlChar **mem,
|
||||
int *size,
|
||||
int format);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlDocDumpMemory (xmlDocPtr cur,
|
||||
xmlChar **mem,
|
||||
int *size);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlDocDumpMemoryEnc (xmlDocPtr out_doc,
|
||||
xmlChar **doc_txt_ptr,
|
||||
int * doc_txt_len,
|
||||
const char *txt_encoding);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlDocDumpFormatMemoryEnc(xmlDocPtr out_doc,
|
||||
xmlChar **doc_txt_ptr,
|
||||
int * doc_txt_len,
|
||||
const char *txt_encoding,
|
||||
int format);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlDocFormatDump (FILE *f,
|
||||
xmlDocPtr cur,
|
||||
int format);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlDocDump (FILE *f,
|
||||
xmlDocPtr cur);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlElemDump (FILE *f,
|
||||
xmlDocPtr doc,
|
||||
xmlNodePtr cur);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlSaveFile (const char *filename,
|
||||
xmlDocPtr cur);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlSaveFormatFile (const char *filename,
|
||||
xmlDocPtr cur,
|
||||
int format);
|
||||
XMLPUBFUN size_t XMLCALL
|
||||
XMLPUBFUN size_t
|
||||
xmlBufNodeDump (xmlBufPtr buf,
|
||||
xmlDocPtr doc,
|
||||
xmlNodePtr cur,
|
||||
int level,
|
||||
int format);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlNodeDump (xmlBufferPtr buf,
|
||||
xmlDocPtr doc,
|
||||
xmlNodePtr cur,
|
||||
int level,
|
||||
int format);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlSaveFileTo (xmlOutputBufferPtr buf,
|
||||
xmlDocPtr cur,
|
||||
const char *encoding);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlSaveFormatFileTo (xmlOutputBufferPtr buf,
|
||||
xmlDocPtr cur,
|
||||
const char *encoding,
|
||||
int format);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlNodeDumpOutput (xmlOutputBufferPtr buf,
|
||||
xmlDocPtr doc,
|
||||
xmlNodePtr cur,
|
||||
@@ -1220,13 +1256,13 @@ XMLPUBFUN void XMLCALL
|
||||
int format,
|
||||
const char *encoding);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlSaveFormatFileEnc (const char *filename,
|
||||
xmlDocPtr cur,
|
||||
const char *encoding,
|
||||
int format);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlSaveFileEnc (const char *filename,
|
||||
xmlDocPtr cur,
|
||||
const char *encoding);
|
||||
@@ -1235,47 +1271,47 @@ XMLPUBFUN int XMLCALL
|
||||
/*
|
||||
* XHTML
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlIsXHTML (const xmlChar *systemID,
|
||||
const xmlChar *publicID);
|
||||
|
||||
/*
|
||||
* Compression.
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlGetDocCompressMode (const xmlDoc *doc);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlSetDocCompressMode (xmlDocPtr doc,
|
||||
int mode);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlGetCompressMode (void);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlSetCompressMode (int mode);
|
||||
|
||||
/*
|
||||
* DOM-wrapper helper functions.
|
||||
*/
|
||||
XMLPUBFUN xmlDOMWrapCtxtPtr XMLCALL
|
||||
XMLPUBFUN xmlDOMWrapCtxtPtr
|
||||
xmlDOMWrapNewCtxt (void);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlDOMWrapFreeCtxt (xmlDOMWrapCtxtPtr ctxt);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlDOMWrapReconcileNamespaces(xmlDOMWrapCtxtPtr ctxt,
|
||||
xmlNodePtr elem,
|
||||
int options);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlDOMWrapAdoptNode (xmlDOMWrapCtxtPtr ctxt,
|
||||
xmlDocPtr sourceDoc,
|
||||
xmlNodePtr node,
|
||||
xmlDocPtr destDoc,
|
||||
xmlNodePtr destParent,
|
||||
int options);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlDOMWrapRemoveNode (xmlDOMWrapCtxtPtr ctxt,
|
||||
xmlDocPtr doc,
|
||||
xmlNodePtr node,
|
||||
int options);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlDOMWrapCloneNode (xmlDOMWrapCtxtPtr ctxt,
|
||||
xmlDocPtr sourceDoc,
|
||||
xmlNodePtr node,
|
||||
@@ -1290,23 +1326,36 @@ XMLPUBFUN int XMLCALL
|
||||
* 5 interfaces from DOM ElementTraversal, but different in entities
|
||||
* traversal.
|
||||
*/
|
||||
XMLPUBFUN unsigned long XMLCALL
|
||||
XMLPUBFUN unsigned long
|
||||
xmlChildElementCount (xmlNodePtr parent);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
XMLPUBFUN xmlNodePtr
|
||||
xmlNextElementSibling (xmlNodePtr node);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
XMLPUBFUN xmlNodePtr
|
||||
xmlFirstElementChild (xmlNodePtr parent);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
XMLPUBFUN xmlNodePtr
|
||||
xmlLastElementChild (xmlNodePtr parent);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
XMLPUBFUN xmlNodePtr
|
||||
xmlPreviousElementSibling (xmlNodePtr node);
|
||||
#endif
|
||||
|
||||
XMLPUBFUN xmlRegisterNodeFunc
|
||||
xmlRegisterNodeDefault (xmlRegisterNodeFunc func);
|
||||
XMLPUBFUN xmlDeregisterNodeFunc
|
||||
xmlDeregisterNodeDefault (xmlDeregisterNodeFunc func);
|
||||
XMLPUBFUN xmlRegisterNodeFunc
|
||||
xmlThrDefRegisterNodeDefault(xmlRegisterNodeFunc func);
|
||||
XMLPUBFUN xmlDeregisterNodeFunc
|
||||
xmlThrDefDeregisterNodeDefault(xmlDeregisterNodeFunc func);
|
||||
|
||||
XML_DEPRECATED XMLPUBFUN xmlBufferAllocationScheme
|
||||
xmlThrDefBufferAllocScheme (xmlBufferAllocationScheme v);
|
||||
XML_DEPRECATED XMLPUBFUN int
|
||||
xmlThrDefDefaultBufferSize (int v);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#ifndef __XML_PARSER_H__
|
||||
#include <libxml/xmlmemory.h>
|
||||
#endif
|
||||
|
||||
#endif /* __XML_TREE_H__ */
|
||||
|
||||
#endif /* XML_TREE_INTERNALS */
|
||||
+17
-16
@@ -11,8 +11,9 @@
|
||||
#ifndef __XML_URI_H__
|
||||
#define __XML_URI_H__
|
||||
|
||||
#include <stdio.h>
|
||||
#include <libxml/xmlversion.h>
|
||||
#include <libxml/tree.h>
|
||||
#include <libxml/xmlstring.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -49,43 +50,43 @@ struct _xmlURI {
|
||||
* xmlChar * xmlNodeGetBase (xmlDocPtr doc,
|
||||
* xmlNodePtr cur);
|
||||
*/
|
||||
XMLPUBFUN xmlURIPtr XMLCALL
|
||||
XMLPUBFUN xmlURIPtr
|
||||
xmlCreateURI (void);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlBuildURI (const xmlChar *URI,
|
||||
const xmlChar *base);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlBuildRelativeURI (const xmlChar *URI,
|
||||
const xmlChar *base);
|
||||
XMLPUBFUN xmlURIPtr XMLCALL
|
||||
XMLPUBFUN xmlURIPtr
|
||||
xmlParseURI (const char *str);
|
||||
XMLPUBFUN xmlURIPtr XMLCALL
|
||||
XMLPUBFUN xmlURIPtr
|
||||
xmlParseURIRaw (const char *str,
|
||||
int raw);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlParseURIReference (xmlURIPtr uri,
|
||||
const char *str);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlSaveUri (xmlURIPtr uri);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlPrintURI (FILE *stream,
|
||||
xmlURIPtr uri);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlURIEscapeStr (const xmlChar *str,
|
||||
const xmlChar *list);
|
||||
XMLPUBFUN char * XMLCALL
|
||||
XMLPUBFUN char *
|
||||
xmlURIUnescapeString (const char *str,
|
||||
int len,
|
||||
char *target);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlNormalizeURIPath (char *path);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlURIEscape (const xmlChar *str);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlFreeURI (xmlURIPtr uri);
|
||||
XMLPUBFUN xmlChar* XMLCALL
|
||||
XMLPUBFUN xmlChar*
|
||||
xmlCanonicPath (const xmlChar *path);
|
||||
XMLPUBFUN xmlChar* XMLCALL
|
||||
XMLPUBFUN xmlChar*
|
||||
xmlPathToURI (const xmlChar *path);
|
||||
|
||||
#ifdef __cplusplus
|
||||
+74
-87
@@ -13,7 +13,9 @@
|
||||
|
||||
#include <libxml/xmlversion.h>
|
||||
#include <libxml/xmlerror.h>
|
||||
#define XML_TREE_INTERNALS
|
||||
#include <libxml/tree.h>
|
||||
#undef XML_TREE_INTERNALS
|
||||
#include <libxml/list.h>
|
||||
#include <libxml/xmlautomata.h>
|
||||
#include <libxml/xmlregexp.h>
|
||||
@@ -39,7 +41,7 @@ typedef xmlValidState *xmlValidStatePtr;
|
||||
* Callback called when a validity error is found. This is a message
|
||||
* oriented function similar to an *printf function.
|
||||
*/
|
||||
typedef void (XMLCDECL *xmlValidityErrorFunc) (void *ctx,
|
||||
typedef void (*xmlValidityErrorFunc) (void *ctx,
|
||||
const char *msg,
|
||||
...) LIBXML_ATTR_FORMAT(2,3);
|
||||
|
||||
@@ -54,25 +56,10 @@ typedef void (XMLCDECL *xmlValidityErrorFunc) (void *ctx,
|
||||
* Callback called when a validity warning is found. This is a message
|
||||
* oriented function similar to an *printf function.
|
||||
*/
|
||||
typedef void (XMLCDECL *xmlValidityWarningFunc) (void *ctx,
|
||||
typedef void (*xmlValidityWarningFunc) (void *ctx,
|
||||
const char *msg,
|
||||
...) LIBXML_ATTR_FORMAT(2,3);
|
||||
|
||||
#ifdef IN_LIBXML
|
||||
/**
|
||||
* XML_VCTXT_DTD_VALIDATED:
|
||||
*
|
||||
* Set after xmlValidateDtdFinal was called.
|
||||
*/
|
||||
#define XML_VCTXT_DTD_VALIDATED (1u << 0)
|
||||
/**
|
||||
* XML_VCTXT_USE_PCTXT:
|
||||
*
|
||||
* Set if the validation context is part of a parser context.
|
||||
*/
|
||||
#define XML_VCTXT_USE_PCTXT (1u << 1)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* xmlValidCtxt:
|
||||
* An xmlValidCtxt is used for error reporting when validating.
|
||||
@@ -150,55 +137,55 @@ typedef struct _xmlHashTable xmlRefTable;
|
||||
typedef xmlRefTable *xmlRefTablePtr;
|
||||
|
||||
/* Notation */
|
||||
XMLPUBFUN xmlNotationPtr XMLCALL
|
||||
XMLPUBFUN xmlNotationPtr
|
||||
xmlAddNotationDecl (xmlValidCtxtPtr ctxt,
|
||||
xmlDtdPtr dtd,
|
||||
const xmlChar *name,
|
||||
const xmlChar *PublicID,
|
||||
const xmlChar *SystemID);
|
||||
#ifdef LIBXML_TREE_ENABLED
|
||||
XMLPUBFUN xmlNotationTablePtr XMLCALL
|
||||
XMLPUBFUN xmlNotationTablePtr
|
||||
xmlCopyNotationTable (xmlNotationTablePtr table);
|
||||
#endif /* LIBXML_TREE_ENABLED */
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlFreeNotationTable (xmlNotationTablePtr table);
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlDumpNotationDecl (xmlBufferPtr buf,
|
||||
xmlNotationPtr nota);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlDumpNotationTable (xmlBufferPtr buf,
|
||||
xmlNotationTablePtr table);
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
|
||||
/* Element Content */
|
||||
/* the non Doc version are being deprecated */
|
||||
XMLPUBFUN xmlElementContentPtr XMLCALL
|
||||
XMLPUBFUN xmlElementContentPtr
|
||||
xmlNewElementContent (const xmlChar *name,
|
||||
xmlElementContentType type);
|
||||
XMLPUBFUN xmlElementContentPtr XMLCALL
|
||||
XMLPUBFUN xmlElementContentPtr
|
||||
xmlCopyElementContent (xmlElementContentPtr content);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlFreeElementContent (xmlElementContentPtr cur);
|
||||
/* the new versions with doc argument */
|
||||
XMLPUBFUN xmlElementContentPtr XMLCALL
|
||||
XMLPUBFUN xmlElementContentPtr
|
||||
xmlNewDocElementContent (xmlDocPtr doc,
|
||||
const xmlChar *name,
|
||||
xmlElementContentType type);
|
||||
XMLPUBFUN xmlElementContentPtr XMLCALL
|
||||
XMLPUBFUN xmlElementContentPtr
|
||||
xmlCopyDocElementContent(xmlDocPtr doc,
|
||||
xmlElementContentPtr content);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlFreeDocElementContent(xmlDocPtr doc,
|
||||
xmlElementContentPtr cur);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlSnprintfElementContent(char *buf,
|
||||
int size,
|
||||
xmlElementContentPtr content,
|
||||
int englob);
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
/* DEPRECATED */
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlSprintfElementContent(char *buf,
|
||||
xmlElementContentPtr content,
|
||||
int englob);
|
||||
@@ -206,39 +193,39 @@ XMLPUBFUN void XMLCALL
|
||||
/* DEPRECATED */
|
||||
|
||||
/* Element */
|
||||
XMLPUBFUN xmlElementPtr XMLCALL
|
||||
XMLPUBFUN xmlElementPtr
|
||||
xmlAddElementDecl (xmlValidCtxtPtr ctxt,
|
||||
xmlDtdPtr dtd,
|
||||
const xmlChar *name,
|
||||
xmlElementTypeVal type,
|
||||
xmlElementContentPtr content);
|
||||
#ifdef LIBXML_TREE_ENABLED
|
||||
XMLPUBFUN xmlElementTablePtr XMLCALL
|
||||
XMLPUBFUN xmlElementTablePtr
|
||||
xmlCopyElementTable (xmlElementTablePtr table);
|
||||
#endif /* LIBXML_TREE_ENABLED */
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlFreeElementTable (xmlElementTablePtr table);
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlDumpElementTable (xmlBufferPtr buf,
|
||||
xmlElementTablePtr table);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlDumpElementDecl (xmlBufferPtr buf,
|
||||
xmlElementPtr elem);
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
|
||||
/* Enumeration */
|
||||
XMLPUBFUN xmlEnumerationPtr XMLCALL
|
||||
XMLPUBFUN xmlEnumerationPtr
|
||||
xmlCreateEnumeration (const xmlChar *name);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlFreeEnumeration (xmlEnumerationPtr cur);
|
||||
#ifdef LIBXML_TREE_ENABLED
|
||||
XMLPUBFUN xmlEnumerationPtr XMLCALL
|
||||
XMLPUBFUN xmlEnumerationPtr
|
||||
xmlCopyEnumeration (xmlEnumerationPtr cur);
|
||||
#endif /* LIBXML_TREE_ENABLED */
|
||||
|
||||
/* Attribute */
|
||||
XMLPUBFUN xmlAttributePtr XMLCALL
|
||||
XMLPUBFUN xmlAttributePtr
|
||||
xmlAddAttributeDecl (xmlValidCtxtPtr ctxt,
|
||||
xmlDtdPtr dtd,
|
||||
const xmlChar *elem,
|
||||
@@ -249,60 +236,60 @@ XMLPUBFUN xmlAttributePtr XMLCALL
|
||||
const xmlChar *defaultValue,
|
||||
xmlEnumerationPtr tree);
|
||||
#ifdef LIBXML_TREE_ENABLED
|
||||
XMLPUBFUN xmlAttributeTablePtr XMLCALL
|
||||
XMLPUBFUN xmlAttributeTablePtr
|
||||
xmlCopyAttributeTable (xmlAttributeTablePtr table);
|
||||
#endif /* LIBXML_TREE_ENABLED */
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlFreeAttributeTable (xmlAttributeTablePtr table);
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlDumpAttributeTable (xmlBufferPtr buf,
|
||||
xmlAttributeTablePtr table);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlDumpAttributeDecl (xmlBufferPtr buf,
|
||||
xmlAttributePtr attr);
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
|
||||
/* IDs */
|
||||
XMLPUBFUN xmlIDPtr XMLCALL
|
||||
XMLPUBFUN xmlIDPtr
|
||||
xmlAddID (xmlValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc,
|
||||
const xmlChar *value,
|
||||
xmlAttrPtr attr);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlFreeIDTable (xmlIDTablePtr table);
|
||||
XMLPUBFUN xmlAttrPtr XMLCALL
|
||||
XMLPUBFUN xmlAttrPtr
|
||||
xmlGetID (xmlDocPtr doc,
|
||||
const xmlChar *ID);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlIsID (xmlDocPtr doc,
|
||||
xmlNodePtr elem,
|
||||
xmlAttrPtr attr);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlRemoveID (xmlDocPtr doc,
|
||||
xmlAttrPtr attr);
|
||||
|
||||
/* IDREFs */
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlRefPtr XMLCALL
|
||||
XMLPUBFUN xmlRefPtr
|
||||
xmlAddRef (xmlValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc,
|
||||
const xmlChar *value,
|
||||
xmlAttrPtr attr);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlFreeRefTable (xmlRefTablePtr table);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlIsRef (xmlDocPtr doc,
|
||||
xmlNodePtr elem,
|
||||
xmlAttrPtr attr);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlRemoveRef (xmlDocPtr doc,
|
||||
xmlAttrPtr attr);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlListPtr XMLCALL
|
||||
XMLPUBFUN xmlListPtr
|
||||
xmlGetRefs (xmlDocPtr doc,
|
||||
const xmlChar *ID);
|
||||
|
||||
@@ -311,146 +298,146 @@ XMLPUBFUN xmlListPtr XMLCALL
|
||||
*/
|
||||
#ifdef LIBXML_VALID_ENABLED
|
||||
/* Allocate/Release Validation Contexts */
|
||||
XMLPUBFUN xmlValidCtxtPtr XMLCALL
|
||||
XMLPUBFUN xmlValidCtxtPtr
|
||||
xmlNewValidCtxt(void);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlFreeValidCtxt(xmlValidCtxtPtr);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlValidateRoot (xmlValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlValidateElementDecl (xmlValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc,
|
||||
xmlElementPtr elem);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlValidNormalizeAttributeValue(xmlDocPtr doc,
|
||||
xmlNodePtr elem,
|
||||
const xmlChar *name,
|
||||
const xmlChar *value);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlValidCtxtNormalizeAttributeValue(xmlValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc,
|
||||
xmlNodePtr elem,
|
||||
const xmlChar *name,
|
||||
const xmlChar *value);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlValidateAttributeDecl(xmlValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc,
|
||||
xmlAttributePtr attr);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlValidateAttributeValue(xmlAttributeType type,
|
||||
const xmlChar *value);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlValidateNotationDecl (xmlValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc,
|
||||
xmlNotationPtr nota);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlValidateDtd (xmlValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc,
|
||||
xmlDtdPtr dtd);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlValidateDtdFinal (xmlValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlValidateDocument (xmlValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlValidateElement (xmlValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc,
|
||||
xmlNodePtr elem);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlValidateOneElement (xmlValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc,
|
||||
xmlNodePtr elem);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlValidateOneAttribute (xmlValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc,
|
||||
xmlNodePtr elem,
|
||||
xmlAttrPtr attr,
|
||||
const xmlChar *value);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlValidateOneNamespace (xmlValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc,
|
||||
xmlNodePtr elem,
|
||||
const xmlChar *prefix,
|
||||
xmlNsPtr ns,
|
||||
const xmlChar *value);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlValidateDocumentFinal(xmlValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc);
|
||||
#endif /* LIBXML_VALID_ENABLED */
|
||||
|
||||
#if defined(LIBXML_VALID_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlValidateNotationUse (xmlValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc,
|
||||
const xmlChar *notationName);
|
||||
#endif /* LIBXML_VALID_ENABLED or LIBXML_SCHEMAS_ENABLED */
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlIsMixedElement (xmlDocPtr doc,
|
||||
const xmlChar *name);
|
||||
XMLPUBFUN xmlAttributePtr XMLCALL
|
||||
XMLPUBFUN xmlAttributePtr
|
||||
xmlGetDtdAttrDesc (xmlDtdPtr dtd,
|
||||
const xmlChar *elem,
|
||||
const xmlChar *name);
|
||||
XMLPUBFUN xmlAttributePtr XMLCALL
|
||||
XMLPUBFUN xmlAttributePtr
|
||||
xmlGetDtdQAttrDesc (xmlDtdPtr dtd,
|
||||
const xmlChar *elem,
|
||||
const xmlChar *name,
|
||||
const xmlChar *prefix);
|
||||
XMLPUBFUN xmlNotationPtr XMLCALL
|
||||
XMLPUBFUN xmlNotationPtr
|
||||
xmlGetDtdNotationDesc (xmlDtdPtr dtd,
|
||||
const xmlChar *name);
|
||||
XMLPUBFUN xmlElementPtr XMLCALL
|
||||
XMLPUBFUN xmlElementPtr
|
||||
xmlGetDtdQElementDesc (xmlDtdPtr dtd,
|
||||
const xmlChar *name,
|
||||
const xmlChar *prefix);
|
||||
XMLPUBFUN xmlElementPtr XMLCALL
|
||||
XMLPUBFUN xmlElementPtr
|
||||
xmlGetDtdElementDesc (xmlDtdPtr dtd,
|
||||
const xmlChar *name);
|
||||
|
||||
#ifdef LIBXML_VALID_ENABLED
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlValidGetPotentialChildren(xmlElementContent *ctree,
|
||||
const xmlChar **names,
|
||||
int *len,
|
||||
int max);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlValidGetValidElements(xmlNode *prev,
|
||||
xmlNode *next,
|
||||
const xmlChar **names,
|
||||
int max);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlValidateNameValue (const xmlChar *value);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlValidateNamesValue (const xmlChar *value);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlValidateNmtokenValue (const xmlChar *value);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlValidateNmtokensValue(const xmlChar *value);
|
||||
|
||||
#ifdef LIBXML_REGEXP_ENABLED
|
||||
/*
|
||||
* Validation based on the regexp support
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlValidBuildContentModel(xmlValidCtxtPtr ctxt,
|
||||
xmlElementPtr elem);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlValidatePushElement (xmlValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc,
|
||||
xmlNodePtr elem,
|
||||
const xmlChar *qname);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlValidatePushCData (xmlValidCtxtPtr ctxt,
|
||||
const xmlChar *data,
|
||||
int len);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlValidatePopElement (xmlValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc,
|
||||
xmlNodePtr elem,
|
||||
Vendored
+10
-10
@@ -89,35 +89,35 @@ typedef xmlXIncludeCtxt *xmlXIncludeCtxtPtr;
|
||||
/*
|
||||
* standalone processing
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlXIncludeProcess (xmlDocPtr doc);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlXIncludeProcessFlags (xmlDocPtr doc,
|
||||
int flags);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlXIncludeProcessFlagsData(xmlDocPtr doc,
|
||||
int flags,
|
||||
void *data);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlXIncludeProcessTreeFlagsData(xmlNodePtr tree,
|
||||
int flags,
|
||||
void *data);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlXIncludeProcessTree (xmlNodePtr tree);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlXIncludeProcessTreeFlags(xmlNodePtr tree,
|
||||
int flags);
|
||||
/*
|
||||
* contextual processing
|
||||
*/
|
||||
XMLPUBFUN xmlXIncludeCtxtPtr XMLCALL
|
||||
XMLPUBFUN xmlXIncludeCtxtPtr
|
||||
xmlXIncludeNewContext (xmlDocPtr doc);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlXIncludeSetFlags (xmlXIncludeCtxtPtr ctxt,
|
||||
int flags);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlXIncludeFreeContext (xmlXIncludeCtxtPtr ctxt);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlXIncludeProcessNode (xmlXIncludeCtxtPtr ctxt,
|
||||
xmlNodePtr tree);
|
||||
#ifdef __cplusplus
|
||||
+124
-71
@@ -12,6 +12,10 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <libxml/xmlversion.h>
|
||||
#include <libxml/encoding.h>
|
||||
#define XML_TREE_INTERNALS
|
||||
#include <libxml/tree.h>
|
||||
#undef XML_TREE_INTERNALS
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -31,7 +35,7 @@ extern "C" {
|
||||
*
|
||||
* Returns 1 if yes and 0 if another Input module should be used
|
||||
*/
|
||||
typedef int (XMLCALL *xmlInputMatchCallback) (char const *filename);
|
||||
typedef int (*xmlInputMatchCallback) (char const *filename);
|
||||
/**
|
||||
* xmlInputOpenCallback:
|
||||
* @filename: the filename or URI
|
||||
@@ -40,7 +44,7 @@ typedef int (XMLCALL *xmlInputMatchCallback) (char const *filename);
|
||||
*
|
||||
* Returns an Input context or NULL in case or error
|
||||
*/
|
||||
typedef void * (XMLCALL *xmlInputOpenCallback) (char const *filename);
|
||||
typedef void * (*xmlInputOpenCallback) (char const *filename);
|
||||
/**
|
||||
* xmlInputReadCallback:
|
||||
* @context: an Input context
|
||||
@@ -51,7 +55,7 @@ typedef void * (XMLCALL *xmlInputOpenCallback) (char const *filename);
|
||||
*
|
||||
* Returns the number of bytes read or -1 in case of error
|
||||
*/
|
||||
typedef int (XMLCALL *xmlInputReadCallback) (void * context, char * buffer, int len);
|
||||
typedef int (*xmlInputReadCallback) (void * context, char * buffer, int len);
|
||||
/**
|
||||
* xmlInputCloseCallback:
|
||||
* @context: an Input context
|
||||
@@ -60,7 +64,7 @@ typedef int (XMLCALL *xmlInputReadCallback) (void * context, char * buffer, int
|
||||
*
|
||||
* Returns 0 or -1 in case of error
|
||||
*/
|
||||
typedef int (XMLCALL *xmlInputCloseCallback) (void * context);
|
||||
typedef int (*xmlInputCloseCallback) (void * context);
|
||||
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
/*
|
||||
@@ -77,7 +81,7 @@ typedef int (XMLCALL *xmlInputCloseCallback) (void * context);
|
||||
*
|
||||
* Returns 1 if yes and 0 if another Output module should be used
|
||||
*/
|
||||
typedef int (XMLCALL *xmlOutputMatchCallback) (char const *filename);
|
||||
typedef int (*xmlOutputMatchCallback) (char const *filename);
|
||||
/**
|
||||
* xmlOutputOpenCallback:
|
||||
* @filename: the filename or URI
|
||||
@@ -86,7 +90,7 @@ typedef int (XMLCALL *xmlOutputMatchCallback) (char const *filename);
|
||||
*
|
||||
* Returns an Output context or NULL in case or error
|
||||
*/
|
||||
typedef void * (XMLCALL *xmlOutputOpenCallback) (char const *filename);
|
||||
typedef void * (*xmlOutputOpenCallback) (char const *filename);
|
||||
/**
|
||||
* xmlOutputWriteCallback:
|
||||
* @context: an Output context
|
||||
@@ -97,7 +101,7 @@ typedef void * (XMLCALL *xmlOutputOpenCallback) (char const *filename);
|
||||
*
|
||||
* Returns the number of bytes written or -1 in case of error
|
||||
*/
|
||||
typedef int (XMLCALL *xmlOutputWriteCallback) (void * context, const char * buffer,
|
||||
typedef int (*xmlOutputWriteCallback) (void * context, const char * buffer,
|
||||
int len);
|
||||
/**
|
||||
* xmlOutputCloseCallback:
|
||||
@@ -107,21 +111,38 @@ typedef int (XMLCALL *xmlOutputWriteCallback) (void * context, const char * buff
|
||||
*
|
||||
* Returns 0 or -1 in case of error
|
||||
*/
|
||||
typedef int (XMLCALL *xmlOutputCloseCallback) (void * context);
|
||||
typedef int (*xmlOutputCloseCallback) (void * context);
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
/**
|
||||
* xmlParserInputBufferCreateFilenameFunc:
|
||||
* @URI: the URI to read from
|
||||
* @enc: the requested source encoding
|
||||
*
|
||||
* Signature for the function doing the lookup for a suitable input method
|
||||
* corresponding to an URI.
|
||||
*
|
||||
* Returns the new xmlParserInputBufferPtr in case of success or NULL if no
|
||||
* method was found.
|
||||
*/
|
||||
typedef xmlParserInputBufferPtr
|
||||
(*xmlParserInputBufferCreateFilenameFunc)(const char *URI, xmlCharEncoding enc);
|
||||
|
||||
#include <libxml/globals.h>
|
||||
#include <libxml/tree.h>
|
||||
#include <libxml/parser.h>
|
||||
#include <libxml/encoding.h>
|
||||
/**
|
||||
* xmlOutputBufferCreateFilenameFunc:
|
||||
* @URI: the URI to write to
|
||||
* @enc: the requested target encoding
|
||||
*
|
||||
* Signature for the function doing the lookup for a suitable output method
|
||||
* corresponding to an URI.
|
||||
*
|
||||
* Returns the new xmlOutputBufferPtr in case of success or NULL if no
|
||||
* method was found.
|
||||
*/
|
||||
typedef xmlOutputBufferPtr
|
||||
(*xmlOutputBufferCreateFilenameFunc)(const char *URI,
|
||||
xmlCharEncodingHandlerPtr encoder, int compression);
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
struct _xmlParserInputBuffer {
|
||||
void* context;
|
||||
xmlInputReadCallback readcallback;
|
||||
@@ -152,56 +173,75 @@ struct _xmlOutputBuffer {
|
||||
};
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
|
||||
/** DOC_DISABLE */
|
||||
#define XML_GLOBALS_IO \
|
||||
XML_OP(xmlParserInputBufferCreateFilenameValue, \
|
||||
xmlParserInputBufferCreateFilenameFunc, XML_DEPRECATED) \
|
||||
XML_OP(xmlOutputBufferCreateFilenameValue, \
|
||||
xmlOutputBufferCreateFilenameFunc, XML_DEPRECATED)
|
||||
|
||||
#define XML_OP XML_DECLARE_GLOBAL
|
||||
XML_GLOBALS_IO
|
||||
#undef XML_OP
|
||||
|
||||
#if defined(LIBXML_THREAD_ENABLED) && !defined(XML_GLOBALS_NO_REDEFINITION)
|
||||
#define xmlParserInputBufferCreateFilenameValue \
|
||||
XML_GLOBAL_MACRO(xmlParserInputBufferCreateFilenameValue)
|
||||
#define xmlOutputBufferCreateFilenameValue \
|
||||
XML_GLOBAL_MACRO(xmlOutputBufferCreateFilenameValue)
|
||||
#endif
|
||||
/** DOC_ENABLE */
|
||||
|
||||
/*
|
||||
* Interfaces for input
|
||||
*/
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlCleanupInputCallbacks (void);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlPopInputCallbacks (void);
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlRegisterDefaultInputCallbacks (void);
|
||||
XMLPUBFUN xmlParserInputBufferPtr XMLCALL
|
||||
XMLPUBFUN xmlParserInputBufferPtr
|
||||
xmlAllocParserInputBuffer (xmlCharEncoding enc);
|
||||
|
||||
XMLPUBFUN xmlParserInputBufferPtr XMLCALL
|
||||
XMLPUBFUN xmlParserInputBufferPtr
|
||||
xmlParserInputBufferCreateFilename (const char *URI,
|
||||
xmlCharEncoding enc);
|
||||
XMLPUBFUN xmlParserInputBufferPtr XMLCALL
|
||||
XMLPUBFUN xmlParserInputBufferPtr
|
||||
xmlParserInputBufferCreateFile (FILE *file,
|
||||
xmlCharEncoding enc);
|
||||
XMLPUBFUN xmlParserInputBufferPtr XMLCALL
|
||||
XMLPUBFUN xmlParserInputBufferPtr
|
||||
xmlParserInputBufferCreateFd (int fd,
|
||||
xmlCharEncoding enc);
|
||||
XMLPUBFUN xmlParserInputBufferPtr XMLCALL
|
||||
XMLPUBFUN xmlParserInputBufferPtr
|
||||
xmlParserInputBufferCreateMem (const char *mem, int size,
|
||||
xmlCharEncoding enc);
|
||||
XMLPUBFUN xmlParserInputBufferPtr XMLCALL
|
||||
XMLPUBFUN xmlParserInputBufferPtr
|
||||
xmlParserInputBufferCreateStatic (const char *mem, int size,
|
||||
xmlCharEncoding enc);
|
||||
XMLPUBFUN xmlParserInputBufferPtr XMLCALL
|
||||
XMLPUBFUN xmlParserInputBufferPtr
|
||||
xmlParserInputBufferCreateIO (xmlInputReadCallback ioread,
|
||||
xmlInputCloseCallback ioclose,
|
||||
void *ioctx,
|
||||
xmlCharEncoding enc);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlParserInputBufferRead (xmlParserInputBufferPtr in,
|
||||
int len);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlParserInputBufferGrow (xmlParserInputBufferPtr in,
|
||||
int len);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlParserInputBufferPush (xmlParserInputBufferPtr in,
|
||||
int len,
|
||||
const char *buf);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlFreeParserInputBuffer (xmlParserInputBufferPtr in);
|
||||
XMLPUBFUN char * XMLCALL
|
||||
XMLPUBFUN char *
|
||||
xmlParserGetDirectory (const char *filename);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlRegisterInputCallbacks (xmlInputMatchCallback matchFunc,
|
||||
xmlInputOpenCallback openFunc,
|
||||
xmlInputReadCallback readFunc,
|
||||
@@ -215,62 +255,62 @@ xmlParserInputBufferPtr
|
||||
/*
|
||||
* Interfaces for output
|
||||
*/
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlCleanupOutputCallbacks (void);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlPopOutputCallbacks (void);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlRegisterDefaultOutputCallbacks(void);
|
||||
XMLPUBFUN xmlOutputBufferPtr XMLCALL
|
||||
XMLPUBFUN xmlOutputBufferPtr
|
||||
xmlAllocOutputBuffer (xmlCharEncodingHandlerPtr encoder);
|
||||
|
||||
XMLPUBFUN xmlOutputBufferPtr XMLCALL
|
||||
XMLPUBFUN xmlOutputBufferPtr
|
||||
xmlOutputBufferCreateFilename (const char *URI,
|
||||
xmlCharEncodingHandlerPtr encoder,
|
||||
int compression);
|
||||
|
||||
XMLPUBFUN xmlOutputBufferPtr XMLCALL
|
||||
XMLPUBFUN xmlOutputBufferPtr
|
||||
xmlOutputBufferCreateFile (FILE *file,
|
||||
xmlCharEncodingHandlerPtr encoder);
|
||||
|
||||
XMLPUBFUN xmlOutputBufferPtr XMLCALL
|
||||
XMLPUBFUN xmlOutputBufferPtr
|
||||
xmlOutputBufferCreateBuffer (xmlBufferPtr buffer,
|
||||
xmlCharEncodingHandlerPtr encoder);
|
||||
|
||||
XMLPUBFUN xmlOutputBufferPtr XMLCALL
|
||||
XMLPUBFUN xmlOutputBufferPtr
|
||||
xmlOutputBufferCreateFd (int fd,
|
||||
xmlCharEncodingHandlerPtr encoder);
|
||||
|
||||
XMLPUBFUN xmlOutputBufferPtr XMLCALL
|
||||
XMLPUBFUN xmlOutputBufferPtr
|
||||
xmlOutputBufferCreateIO (xmlOutputWriteCallback iowrite,
|
||||
xmlOutputCloseCallback ioclose,
|
||||
void *ioctx,
|
||||
xmlCharEncodingHandlerPtr encoder);
|
||||
|
||||
/* Couple of APIs to get the output without digging into the buffers */
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
XMLPUBFUN const xmlChar *
|
||||
xmlOutputBufferGetContent (xmlOutputBufferPtr out);
|
||||
XMLPUBFUN size_t XMLCALL
|
||||
XMLPUBFUN size_t
|
||||
xmlOutputBufferGetSize (xmlOutputBufferPtr out);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlOutputBufferWrite (xmlOutputBufferPtr out,
|
||||
int len,
|
||||
const char *buf);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlOutputBufferWriteString (xmlOutputBufferPtr out,
|
||||
const char *str);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlOutputBufferWriteEscape (xmlOutputBufferPtr out,
|
||||
const xmlChar *str,
|
||||
xmlCharEncodingOutputFunc escaping);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlOutputBufferFlush (xmlOutputBufferPtr out);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlOutputBufferClose (xmlOutputBufferPtr out);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlRegisterOutputCallbacks (xmlOutputMatchCallback matchFunc,
|
||||
xmlOutputOpenCallback openFunc,
|
||||
xmlOutputWriteCallback writeFunc,
|
||||
@@ -283,20 +323,20 @@ xmlOutputBufferPtr
|
||||
|
||||
#ifdef LIBXML_HTTP_ENABLED
|
||||
/* This function only exists if HTTP support built into the library */
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlRegisterHTTPPostCallbacks (void );
|
||||
#endif /* LIBXML_HTTP_ENABLED */
|
||||
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
|
||||
XMLPUBFUN xmlParserInputPtr XMLCALL
|
||||
XMLPUBFUN xmlParserInputPtr
|
||||
xmlCheckHTTPInput (xmlParserCtxtPtr ctxt,
|
||||
xmlParserInputPtr ret);
|
||||
|
||||
/*
|
||||
* A predefined entity loader disabling network accesses
|
||||
*/
|
||||
XMLPUBFUN xmlParserInputPtr XMLCALL
|
||||
XMLPUBFUN xmlParserInputPtr
|
||||
xmlNoNetExternalEntityLoader (const char *URL,
|
||||
const char *ID,
|
||||
xmlParserCtxtPtr ctxt);
|
||||
@@ -305,61 +345,74 @@ XMLPUBFUN xmlParserInputPtr XMLCALL
|
||||
* xmlNormalizeWindowsPath is obsolete, don't use it.
|
||||
* Check xmlCanonicPath in uri.h for a better alternative.
|
||||
*/
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlNormalizeWindowsPath (const xmlChar *path);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlCheckFilename (const char *path);
|
||||
/**
|
||||
* Default 'file://' protocol callbacks
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlFileMatch (const char *filename);
|
||||
XMLPUBFUN void * XMLCALL
|
||||
XMLPUBFUN void *
|
||||
xmlFileOpen (const char *filename);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlFileRead (void * context,
|
||||
char * buffer,
|
||||
int len);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlFileClose (void * context);
|
||||
|
||||
/**
|
||||
* Default 'http://' protocol callbacks
|
||||
*/
|
||||
#ifdef LIBXML_HTTP_ENABLED
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlIOHTTPMatch (const char *filename);
|
||||
XMLPUBFUN void * XMLCALL
|
||||
XMLPUBFUN void *
|
||||
xmlIOHTTPOpen (const char *filename);
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
XMLPUBFUN void * XMLCALL
|
||||
XMLPUBFUN void *
|
||||
xmlIOHTTPOpenW (const char * post_uri,
|
||||
int compression );
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlIOHTTPRead (void * context,
|
||||
char * buffer,
|
||||
int len);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlIOHTTPClose (void * context);
|
||||
#endif /* LIBXML_HTTP_ENABLED */
|
||||
|
||||
/**
|
||||
* Default 'ftp://' protocol callbacks
|
||||
*/
|
||||
#ifdef LIBXML_FTP_ENABLED
|
||||
XMLPUBFUN int XMLCALL
|
||||
#if defined(LIBXML_FTP_ENABLED)
|
||||
XMLPUBFUN int
|
||||
xmlIOFTPMatch (const char *filename);
|
||||
XMLPUBFUN void * XMLCALL
|
||||
XMLPUBFUN void *
|
||||
xmlIOFTPOpen (const char *filename);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlIOFTPRead (void * context,
|
||||
char * buffer,
|
||||
int len);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlIOFTPClose (void * context);
|
||||
#endif /* LIBXML_FTP_ENABLED */
|
||||
#endif /* defined(LIBXML_FTP_ENABLED) */
|
||||
|
||||
XMLPUBFUN xmlParserInputBufferCreateFilenameFunc
|
||||
xmlParserInputBufferCreateFilenameDefault(
|
||||
xmlParserInputBufferCreateFilenameFunc func);
|
||||
XMLPUBFUN xmlOutputBufferCreateFilenameFunc
|
||||
xmlOutputBufferCreateFilenameDefault(
|
||||
xmlOutputBufferCreateFilenameFunc func);
|
||||
XMLPUBFUN xmlOutputBufferCreateFilenameFunc
|
||||
xmlThrDefOutputBufferCreateFilenameDefault(
|
||||
xmlOutputBufferCreateFilenameFunc func);
|
||||
XMLPUBFUN xmlParserInputBufferCreateFilenameFunc
|
||||
xmlThrDefParserInputBufferCreateFilenameDefault(
|
||||
xmlParserInputBufferCreateFilenameFunc func);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
+21
-21
@@ -11,11 +11,11 @@
|
||||
#define __XML_AUTOMATA_H__
|
||||
|
||||
#include <libxml/xmlversion.h>
|
||||
#include <libxml/tree.h>
|
||||
|
||||
#ifdef LIBXML_REGEXP_ENABLED
|
||||
#ifdef LIBXML_AUTOMATA_ENABLED
|
||||
#include <libxml/xmlregexp.h>
|
||||
|
||||
#include <libxml/xmlstring.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -40,32 +40,32 @@ typedef xmlAutomataState *xmlAutomataStatePtr;
|
||||
/*
|
||||
* Building API
|
||||
*/
|
||||
XMLPUBFUN xmlAutomataPtr XMLCALL
|
||||
XMLPUBFUN xmlAutomataPtr
|
||||
xmlNewAutomata (void);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlFreeAutomata (xmlAutomataPtr am);
|
||||
|
||||
XMLPUBFUN xmlAutomataStatePtr XMLCALL
|
||||
XMLPUBFUN xmlAutomataStatePtr
|
||||
xmlAutomataGetInitState (xmlAutomataPtr am);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlAutomataSetFinalState (xmlAutomataPtr am,
|
||||
xmlAutomataStatePtr state);
|
||||
XMLPUBFUN xmlAutomataStatePtr XMLCALL
|
||||
XMLPUBFUN xmlAutomataStatePtr
|
||||
xmlAutomataNewState (xmlAutomataPtr am);
|
||||
XMLPUBFUN xmlAutomataStatePtr XMLCALL
|
||||
XMLPUBFUN xmlAutomataStatePtr
|
||||
xmlAutomataNewTransition (xmlAutomataPtr am,
|
||||
xmlAutomataStatePtr from,
|
||||
xmlAutomataStatePtr to,
|
||||
const xmlChar *token,
|
||||
void *data);
|
||||
XMLPUBFUN xmlAutomataStatePtr XMLCALL
|
||||
XMLPUBFUN xmlAutomataStatePtr
|
||||
xmlAutomataNewTransition2 (xmlAutomataPtr am,
|
||||
xmlAutomataStatePtr from,
|
||||
xmlAutomataStatePtr to,
|
||||
const xmlChar *token,
|
||||
const xmlChar *token2,
|
||||
void *data);
|
||||
XMLPUBFUN xmlAutomataStatePtr XMLCALL
|
||||
XMLPUBFUN xmlAutomataStatePtr
|
||||
xmlAutomataNewNegTrans (xmlAutomataPtr am,
|
||||
xmlAutomataStatePtr from,
|
||||
xmlAutomataStatePtr to,
|
||||
@@ -73,7 +73,7 @@ XMLPUBFUN xmlAutomataStatePtr XMLCALL
|
||||
const xmlChar *token2,
|
||||
void *data);
|
||||
|
||||
XMLPUBFUN xmlAutomataStatePtr XMLCALL
|
||||
XMLPUBFUN xmlAutomataStatePtr
|
||||
xmlAutomataNewCountTrans (xmlAutomataPtr am,
|
||||
xmlAutomataStatePtr from,
|
||||
xmlAutomataStatePtr to,
|
||||
@@ -81,7 +81,7 @@ XMLPUBFUN xmlAutomataStatePtr XMLCALL
|
||||
int min,
|
||||
int max,
|
||||
void *data);
|
||||
XMLPUBFUN xmlAutomataStatePtr XMLCALL
|
||||
XMLPUBFUN xmlAutomataStatePtr
|
||||
xmlAutomataNewCountTrans2 (xmlAutomataPtr am,
|
||||
xmlAutomataStatePtr from,
|
||||
xmlAutomataStatePtr to,
|
||||
@@ -90,7 +90,7 @@ XMLPUBFUN xmlAutomataStatePtr XMLCALL
|
||||
int min,
|
||||
int max,
|
||||
void *data);
|
||||
XMLPUBFUN xmlAutomataStatePtr XMLCALL
|
||||
XMLPUBFUN xmlAutomataStatePtr
|
||||
xmlAutomataNewOnceTrans (xmlAutomataPtr am,
|
||||
xmlAutomataStatePtr from,
|
||||
xmlAutomataStatePtr to,
|
||||
@@ -98,7 +98,7 @@ XMLPUBFUN xmlAutomataStatePtr XMLCALL
|
||||
int min,
|
||||
int max,
|
||||
void *data);
|
||||
XMLPUBFUN xmlAutomataStatePtr XMLCALL
|
||||
XMLPUBFUN xmlAutomataStatePtr
|
||||
xmlAutomataNewOnceTrans2 (xmlAutomataPtr am,
|
||||
xmlAutomataStatePtr from,
|
||||
xmlAutomataStatePtr to,
|
||||
@@ -107,33 +107,33 @@ XMLPUBFUN xmlAutomataStatePtr XMLCALL
|
||||
int min,
|
||||
int max,
|
||||
void *data);
|
||||
XMLPUBFUN xmlAutomataStatePtr XMLCALL
|
||||
XMLPUBFUN xmlAutomataStatePtr
|
||||
xmlAutomataNewAllTrans (xmlAutomataPtr am,
|
||||
xmlAutomataStatePtr from,
|
||||
xmlAutomataStatePtr to,
|
||||
int lax);
|
||||
XMLPUBFUN xmlAutomataStatePtr XMLCALL
|
||||
XMLPUBFUN xmlAutomataStatePtr
|
||||
xmlAutomataNewEpsilon (xmlAutomataPtr am,
|
||||
xmlAutomataStatePtr from,
|
||||
xmlAutomataStatePtr to);
|
||||
XMLPUBFUN xmlAutomataStatePtr XMLCALL
|
||||
XMLPUBFUN xmlAutomataStatePtr
|
||||
xmlAutomataNewCountedTrans (xmlAutomataPtr am,
|
||||
xmlAutomataStatePtr from,
|
||||
xmlAutomataStatePtr to,
|
||||
int counter);
|
||||
XMLPUBFUN xmlAutomataStatePtr XMLCALL
|
||||
XMLPUBFUN xmlAutomataStatePtr
|
||||
xmlAutomataNewCounterTrans (xmlAutomataPtr am,
|
||||
xmlAutomataStatePtr from,
|
||||
xmlAutomataStatePtr to,
|
||||
int counter);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlAutomataNewCounter (xmlAutomataPtr am,
|
||||
int min,
|
||||
int max);
|
||||
|
||||
XMLPUBFUN xmlRegexpPtr XMLCALL
|
||||
XMLPUBFUN struct _xmlRegexp *
|
||||
xmlAutomataCompile (xmlAutomataPtr am);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlAutomataIsDeterminist (xmlAutomataPtr am);
|
||||
|
||||
#ifdef __cplusplus
|
||||
Vendored
+52
-51
@@ -7,11 +7,11 @@
|
||||
* Author: Daniel Veillard
|
||||
*/
|
||||
|
||||
#include <libxml/parser.h>
|
||||
|
||||
#ifndef __XML_ERROR_H__
|
||||
#define __XML_ERROR_H__
|
||||
|
||||
#include <libxml/xmlversion.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@@ -210,6 +210,7 @@ typedef enum {
|
||||
XML_ERR_NAME_TOO_LONG, /* 110 */
|
||||
XML_ERR_USER_STOP, /* 111 */
|
||||
XML_ERR_COMMENT_ABRUPTLY_ENDED, /* 112 */
|
||||
XML_WAR_ENCODING_MISMATCH, /* 113 */
|
||||
XML_NS_ERR_XML_NAMESPACE = 200,
|
||||
XML_NS_ERR_UNDEFINED_NAMESPACE, /* 201 */
|
||||
XML_NS_ERR_QNAME, /* 202 */
|
||||
@@ -844,7 +845,7 @@ typedef enum {
|
||||
* Signature of the function to use when there is an error and
|
||||
* no parsing or validity context available .
|
||||
*/
|
||||
typedef void (XMLCDECL *xmlGenericErrorFunc) (void *ctx,
|
||||
typedef void (*xmlGenericErrorFunc) (void *ctx,
|
||||
const char *msg,
|
||||
...) LIBXML_ATTR_FORMAT(2,3);
|
||||
/**
|
||||
@@ -855,92 +856,92 @@ typedef void (XMLCDECL *xmlGenericErrorFunc) (void *ctx,
|
||||
* Signature of the function to use when there is an error and
|
||||
* the module handles the new error reporting mechanism.
|
||||
*/
|
||||
typedef void (XMLCALL *xmlStructuredErrorFunc) (void *userData, xmlErrorPtr error);
|
||||
typedef void (*xmlStructuredErrorFunc) (void *userData, const xmlError *error);
|
||||
|
||||
/** DOC_DISABLE */
|
||||
#define XML_GLOBALS_ERROR \
|
||||
XML_OP(xmlLastError, xmlError, XML_DEPRECATED) \
|
||||
XML_OP(xmlGenericError, xmlGenericErrorFunc, XML_NO_ATTR) \
|
||||
XML_OP(xmlGenericErrorContext, void *, XML_NO_ATTR) \
|
||||
XML_OP(xmlStructuredError, xmlStructuredErrorFunc, XML_NO_ATTR) \
|
||||
XML_OP(xmlStructuredErrorContext, void *, XML_NO_ATTR)
|
||||
|
||||
#define XML_OP XML_DECLARE_GLOBAL
|
||||
XML_GLOBALS_ERROR
|
||||
#undef XML_OP
|
||||
|
||||
#if defined(LIBXML_THREAD_ENABLED) && !defined(XML_GLOBALS_NO_REDEFINITION)
|
||||
#define xmlLastError XML_GLOBAL_MACRO(xmlLastError)
|
||||
#define xmlGenericError XML_GLOBAL_MACRO(xmlGenericError)
|
||||
#define xmlGenericErrorContext XML_GLOBAL_MACRO(xmlGenericErrorContext)
|
||||
#define xmlStructuredError XML_GLOBAL_MACRO(xmlStructuredError)
|
||||
#define xmlStructuredErrorContext XML_GLOBAL_MACRO(xmlStructuredErrorContext)
|
||||
#endif
|
||||
/** DOC_ENABLE */
|
||||
|
||||
/*
|
||||
* Use the following function to reset the two global variables
|
||||
* xmlGenericError and xmlGenericErrorContext.
|
||||
*/
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlSetGenericErrorFunc (void *ctx,
|
||||
xmlGenericErrorFunc handler);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlThrDefSetGenericErrorFunc(void *ctx,
|
||||
xmlGenericErrorFunc handler);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void
|
||||
initGenericErrorDefaultFunc (xmlGenericErrorFunc *handler);
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlSetStructuredErrorFunc (void *ctx,
|
||||
xmlStructuredErrorFunc handler);
|
||||
XMLPUBFUN void
|
||||
xmlThrDefSetStructuredErrorFunc(void *ctx,
|
||||
xmlStructuredErrorFunc handler);
|
||||
/*
|
||||
* Default message routines used by SAX and Valid context for error
|
||||
* and warning reporting.
|
||||
*/
|
||||
XMLPUBFUN void XMLCDECL
|
||||
XMLPUBFUN void
|
||||
xmlParserError (void *ctx,
|
||||
const char *msg,
|
||||
...) LIBXML_ATTR_FORMAT(2,3);
|
||||
XMLPUBFUN void XMLCDECL
|
||||
XMLPUBFUN void
|
||||
xmlParserWarning (void *ctx,
|
||||
const char *msg,
|
||||
...) LIBXML_ATTR_FORMAT(2,3);
|
||||
XMLPUBFUN void XMLCDECL
|
||||
XMLPUBFUN void
|
||||
xmlParserValidityError (void *ctx,
|
||||
const char *msg,
|
||||
...) LIBXML_ATTR_FORMAT(2,3);
|
||||
XMLPUBFUN void XMLCDECL
|
||||
XMLPUBFUN void
|
||||
xmlParserValidityWarning (void *ctx,
|
||||
const char *msg,
|
||||
...) LIBXML_ATTR_FORMAT(2,3);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlParserPrintFileInfo (xmlParserInputPtr input);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlParserPrintFileContext (xmlParserInputPtr input);
|
||||
struct _xmlParserInput;
|
||||
XMLPUBFUN void
|
||||
xmlParserPrintFileInfo (struct _xmlParserInput *input);
|
||||
XMLPUBFUN void
|
||||
xmlParserPrintFileContext (struct _xmlParserInput *input);
|
||||
|
||||
/*
|
||||
* Extended error information routines
|
||||
*/
|
||||
XMLPUBFUN xmlErrorPtr XMLCALL
|
||||
XMLPUBFUN const xmlError *
|
||||
xmlGetLastError (void);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlResetLastError (void);
|
||||
XMLPUBFUN xmlErrorPtr XMLCALL
|
||||
XMLPUBFUN const xmlError *
|
||||
xmlCtxtGetLastError (void *ctx);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlCtxtResetLastError (void *ctx);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlResetError (xmlErrorPtr err);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlCopyError (xmlErrorPtr from,
|
||||
XMLPUBFUN int
|
||||
xmlCopyError (const xmlError *from,
|
||||
xmlErrorPtr to);
|
||||
|
||||
#ifdef IN_LIBXML
|
||||
/*
|
||||
* Internal callback reporting routine
|
||||
*/
|
||||
XMLPUBFUN void XMLCALL
|
||||
__xmlRaiseError (xmlStructuredErrorFunc schannel,
|
||||
xmlGenericErrorFunc channel,
|
||||
void *data,
|
||||
void *ctx,
|
||||
void *node,
|
||||
int domain,
|
||||
int code,
|
||||
xmlErrorLevel level,
|
||||
const char *file,
|
||||
int line,
|
||||
const char *str1,
|
||||
const char *str2,
|
||||
const char *str3,
|
||||
int int1,
|
||||
int col,
|
||||
const char *msg,
|
||||
...) LIBXML_ATTR_FORMAT(16,17);
|
||||
XMLPUBFUN void XMLCALL
|
||||
__xmlSimpleError (int domain,
|
||||
int code,
|
||||
xmlNodePtr node,
|
||||
const char *msg,
|
||||
const char *extra) LIBXML_ATTR_FORMAT(4,0);
|
||||
#endif
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
Vendored
+14
-43
@@ -8,50 +8,19 @@
|
||||
#ifndef __XML_EXPORTS_H__
|
||||
#define __XML_EXPORTS_H__
|
||||
|
||||
#if defined(_WIN32) || defined(__CYGWIN__)
|
||||
/** DOC_DISABLE */
|
||||
|
||||
#ifdef LIBXML_STATIC
|
||||
#define XMLPUBLIC
|
||||
#elif defined(IN_LIBXML)
|
||||
#define XMLPUBLIC __declspec(dllexport)
|
||||
#else
|
||||
#define XMLPUBLIC __declspec(dllimport)
|
||||
#endif
|
||||
|
||||
#if defined(LIBXML_FASTCALL)
|
||||
#define XMLCALL __fastcall
|
||||
#else
|
||||
#define XMLCALL __cdecl
|
||||
#endif
|
||||
#define XMLCDECL __cdecl
|
||||
|
||||
/** DOC_ENABLE */
|
||||
#if defined(_WIN32) || defined(__CYGWIN__)
|
||||
#ifdef LIBXML_STATIC
|
||||
#define XMLPUBLIC
|
||||
#elif defined(IN_LIBXML)
|
||||
#define XMLPUBLIC __declspec(dllexport)
|
||||
#else
|
||||
#define XMLPUBLIC __declspec(dllimport)
|
||||
#endif
|
||||
#else /* not Windows */
|
||||
|
||||
/**
|
||||
* XMLPUBLIC:
|
||||
*
|
||||
* Macro which declares a public symbol
|
||||
*/
|
||||
#define XMLPUBLIC
|
||||
|
||||
/**
|
||||
* XMLCALL:
|
||||
*
|
||||
* Macro which declares the calling convention for exported functions
|
||||
*/
|
||||
#define XMLCALL
|
||||
|
||||
/**
|
||||
* XMLCDECL:
|
||||
*
|
||||
* Macro which declares the calling convention for exported functions that
|
||||
* use '...'.
|
||||
*/
|
||||
#define XMLCDECL
|
||||
|
||||
#define XMLPUBLIC
|
||||
#endif /* platform switch */
|
||||
/** DOC_ENABLE */
|
||||
|
||||
/*
|
||||
* XMLPUBFUN:
|
||||
@@ -67,11 +36,13 @@
|
||||
*/
|
||||
#define XMLPUBVAR XMLPUBLIC extern
|
||||
|
||||
/** DOC_DISABLE */
|
||||
/* Compatibility */
|
||||
#define XMLCALL
|
||||
#define XMLCDECL
|
||||
#if !defined(LIBXML_DLL_IMPORT)
|
||||
#define LIBXML_DLL_IMPORT XMLPUBVAR
|
||||
#endif
|
||||
/** DOC_ENABLE */
|
||||
|
||||
#endif /* __XML_EXPORTS_H__ */
|
||||
|
||||
|
||||
Vendored
+62
-64
@@ -15,32 +15,6 @@
|
||||
#include <stdio.h>
|
||||
#include <libxml/xmlversion.h>
|
||||
|
||||
/**
|
||||
* DEBUG_MEMORY:
|
||||
*
|
||||
* DEBUG_MEMORY replaces the allocator with a collect and debug
|
||||
* shell to the libc allocator.
|
||||
* DEBUG_MEMORY should only be activated when debugging
|
||||
* libxml i.e. if libxml has been configured with --with-debug-mem too.
|
||||
*/
|
||||
/* #define DEBUG_MEMORY_FREED */
|
||||
/* #define DEBUG_MEMORY_LOCATION */
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifndef DEBUG_MEMORY
|
||||
#define DEBUG_MEMORY
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* DEBUG_MEMORY_LOCATION:
|
||||
*
|
||||
* DEBUG_MEMORY_LOCATION should be activated only when debugging
|
||||
* libxml i.e. if libxml has been configured with --with-debug-mem too.
|
||||
*/
|
||||
#ifdef DEBUG_MEMORY_LOCATION
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@@ -54,7 +28,7 @@ extern "C" {
|
||||
*
|
||||
* Signature for a free() implementation.
|
||||
*/
|
||||
typedef void (XMLCALL *xmlFreeFunc)(void *mem);
|
||||
typedef void (*xmlFreeFunc)(void *mem);
|
||||
/**
|
||||
* xmlMallocFunc:
|
||||
* @size: the size requested in bytes
|
||||
@@ -63,7 +37,7 @@ typedef void (XMLCALL *xmlFreeFunc)(void *mem);
|
||||
*
|
||||
* Returns a pointer to the newly allocated block or NULL in case of error.
|
||||
*/
|
||||
typedef void *(LIBXML_ATTR_ALLOC_SIZE(1) XMLCALL *xmlMallocFunc)(size_t size);
|
||||
typedef void *(LIBXML_ATTR_ALLOC_SIZE(1) *xmlMallocFunc)(size_t size);
|
||||
|
||||
/**
|
||||
* xmlReallocFunc:
|
||||
@@ -74,7 +48,7 @@ typedef void *(LIBXML_ATTR_ALLOC_SIZE(1) XMLCALL *xmlMallocFunc)(size_t size);
|
||||
*
|
||||
* Returns a pointer to the newly reallocated block or NULL in case of error.
|
||||
*/
|
||||
typedef void *(XMLCALL *xmlReallocFunc)(void *mem, size_t size);
|
||||
typedef void *(*xmlReallocFunc)(void *mem, size_t size);
|
||||
|
||||
/**
|
||||
* xmlStrdupFunc:
|
||||
@@ -84,39 +58,67 @@ typedef void *(XMLCALL *xmlReallocFunc)(void *mem, size_t size);
|
||||
*
|
||||
* Returns the copy of the string or NULL in case of error.
|
||||
*/
|
||||
typedef char *(XMLCALL *xmlStrdupFunc)(const char *str);
|
||||
typedef char *(*xmlStrdupFunc)(const char *str);
|
||||
|
||||
/*
|
||||
* The 4 interfaces used for all memory handling within libxml.
|
||||
LIBXML_DLL_IMPORT xmlFreeFunc xmlFree;
|
||||
LIBXML_DLL_IMPORT xmlMallocFunc xmlMalloc;
|
||||
LIBXML_DLL_IMPORT xmlMallocFunc xmlMallocAtomic;
|
||||
LIBXML_DLL_IMPORT xmlReallocFunc xmlRealloc;
|
||||
LIBXML_DLL_IMPORT xmlStrdupFunc xmlMemStrdup;
|
||||
* In general the memory allocation entry points are not kept
|
||||
* thread specific but this can be overridden by LIBXML_THREAD_ALLOC_ENABLED
|
||||
* - xmlMalloc
|
||||
* - xmlMallocAtomic
|
||||
* - xmlRealloc
|
||||
* - xmlMemStrdup
|
||||
* - xmlFree
|
||||
*/
|
||||
/** DOC_DISABLE */
|
||||
#ifdef LIBXML_THREAD_ALLOC_ENABLED
|
||||
#define XML_GLOBALS_ALLOC \
|
||||
XML_OP(xmlMalloc, xmlMallocFunc, XML_NO_ATTR) \
|
||||
XML_OP(xmlMallocAtomic, xmlMallocFunc, XML_NO_ATTR) \
|
||||
XML_OP(xmlRealloc, xmlReallocFunc, XML_NO_ATTR) \
|
||||
XML_OP(xmlFree, xmlFreeFunc, XML_NO_ATTR) \
|
||||
XML_OP(xmlMemStrdup, xmlStrdupFunc, XML_NO_ATTR)
|
||||
#define XML_OP XML_DECLARE_GLOBAL
|
||||
XML_GLOBALS_ALLOC
|
||||
#undef XML_OP
|
||||
#if defined(LIBXML_THREAD_ENABLED) && !defined(XML_GLOBALS_NO_REDEFINITION)
|
||||
#define xmlMalloc XML_GLOBAL_MACRO(xmlMalloc)
|
||||
#define xmlMallocAtomic XML_GLOBAL_MACRO(xmlMallocAtomic)
|
||||
#define xmlRealloc XML_GLOBAL_MACRO(xmlRealloc)
|
||||
#define xmlFree XML_GLOBAL_MACRO(xmlFree)
|
||||
#define xmlMemStrdup XML_GLOBAL_MACRO(xmlMemStrdup)
|
||||
#endif
|
||||
#else
|
||||
#define XML_GLOBALS_ALLOC
|
||||
/** DOC_ENABLE */
|
||||
XMLPUBVAR xmlMallocFunc xmlMalloc;
|
||||
XMLPUBVAR xmlMallocFunc xmlMallocAtomic;
|
||||
XMLPUBVAR xmlReallocFunc xmlRealloc;
|
||||
XMLPUBVAR xmlFreeFunc xmlFree;
|
||||
XMLPUBVAR xmlStrdupFunc xmlMemStrdup;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The way to overload the existing functions.
|
||||
* The xmlGc function have an extra entry for atomic block
|
||||
* allocations useful for garbage collected memory allocators
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlMemSetup (xmlFreeFunc freeFunc,
|
||||
xmlMallocFunc mallocFunc,
|
||||
xmlReallocFunc reallocFunc,
|
||||
xmlStrdupFunc strdupFunc);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlMemGet (xmlFreeFunc *freeFunc,
|
||||
xmlMallocFunc *mallocFunc,
|
||||
xmlReallocFunc *reallocFunc,
|
||||
xmlStrdupFunc *strdupFunc);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlGcMemSetup (xmlFreeFunc freeFunc,
|
||||
xmlMallocFunc mallocFunc,
|
||||
xmlMallocFunc mallocAtomicFunc,
|
||||
xmlReallocFunc reallocFunc,
|
||||
xmlStrdupFunc strdupFunc);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlGcMemGet (xmlFreeFunc *freeFunc,
|
||||
xmlMallocFunc *mallocFunc,
|
||||
xmlMallocFunc *mallocAtomicFunc,
|
||||
@@ -127,48 +129,51 @@ XMLPUBFUN int XMLCALL
|
||||
* Initialization of the memory layer.
|
||||
*/
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlInitMemory (void);
|
||||
|
||||
/*
|
||||
* Cleanup of the memory layer.
|
||||
*/
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlCleanupMemory (void);
|
||||
/*
|
||||
* These are specific to the XML debug memory wrapper.
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN size_t
|
||||
xmlMemSize (void *ptr);
|
||||
XMLPUBFUN int
|
||||
xmlMemUsed (void);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlMemBlocks (void);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlMemDisplay (FILE *fp);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlMemDisplayLast(FILE *fp, long nbBytes);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlMemShow (FILE *fp, int nr);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlMemoryDump (void);
|
||||
XMLPUBFUN void * XMLCALL
|
||||
XMLPUBFUN void *
|
||||
xmlMemMalloc (size_t size) LIBXML_ATTR_ALLOC_SIZE(1);
|
||||
XMLPUBFUN void * XMLCALL
|
||||
XMLPUBFUN void *
|
||||
xmlMemRealloc (void *ptr,size_t size);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlMemFree (void *ptr);
|
||||
XMLPUBFUN char * XMLCALL
|
||||
XMLPUBFUN char *
|
||||
xmlMemoryStrdup (const char *str);
|
||||
XMLPUBFUN void * XMLCALL
|
||||
XMLPUBFUN void *
|
||||
xmlMallocLoc (size_t size, const char *file, int line) LIBXML_ATTR_ALLOC_SIZE(1);
|
||||
XMLPUBFUN void * XMLCALL
|
||||
XMLPUBFUN void *
|
||||
xmlReallocLoc (void *ptr, size_t size, const char *file, int line);
|
||||
XMLPUBFUN void * XMLCALL
|
||||
XMLPUBFUN void *
|
||||
xmlMallocAtomicLoc (size_t size, const char *file, int line) LIBXML_ATTR_ALLOC_SIZE(1);
|
||||
XMLPUBFUN char * XMLCALL
|
||||
XMLPUBFUN char *
|
||||
xmlMemStrdupLoc (const char *str, const char *file, int line);
|
||||
|
||||
|
||||
/** DOC_DISABLE */
|
||||
#ifdef DEBUG_MEMORY_LOCATION
|
||||
/**
|
||||
* xmlMalloc:
|
||||
@@ -210,17 +215,10 @@ XMLPUBFUN char * XMLCALL
|
||||
#define xmlMemStrdup(str) xmlMemStrdupLoc((str), __FILE__, __LINE__)
|
||||
|
||||
#endif /* DEBUG_MEMORY_LOCATION */
|
||||
/** DOC_ENABLE */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#ifndef __XML_GLOBALS_H
|
||||
#ifndef __XML_THREADS_H__
|
||||
#include <libxml/threads.h>
|
||||
#include <libxml/globals.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* __DEBUG_MEMORY_ALLOC__ */
|
||||
|
||||
Vendored
+93
-88
@@ -12,11 +12,14 @@
|
||||
|
||||
#include <libxml/xmlversion.h>
|
||||
#include <libxml/tree.h>
|
||||
#include <libxml/xmlerror.h>
|
||||
#include <libxml/xmlIO.h>
|
||||
#ifdef LIBXML_SCHEMAS_ENABLED
|
||||
#include <libxml/relaxng.h>
|
||||
#include <libxml/xmlschemas.h>
|
||||
#endif
|
||||
/* for compatibility */
|
||||
#include <libxml/parser.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -108,239 +111,242 @@ typedef xmlTextReader *xmlTextReaderPtr;
|
||||
/*
|
||||
* Constructors & Destructor
|
||||
*/
|
||||
XMLPUBFUN xmlTextReaderPtr XMLCALL
|
||||
XMLPUBFUN xmlTextReaderPtr
|
||||
xmlNewTextReader (xmlParserInputBufferPtr input,
|
||||
const char *URI);
|
||||
XMLPUBFUN xmlTextReaderPtr XMLCALL
|
||||
XMLPUBFUN xmlTextReaderPtr
|
||||
xmlNewTextReaderFilename(const char *URI);
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlFreeTextReader (xmlTextReaderPtr reader);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlTextReaderSetup(xmlTextReaderPtr reader,
|
||||
xmlParserInputBufferPtr input, const char *URL,
|
||||
const char *encoding, int options);
|
||||
XMLPUBFUN void
|
||||
xmlTextReaderSetMaxAmplification(xmlTextReaderPtr reader,
|
||||
unsigned maxAmpl);
|
||||
|
||||
/*
|
||||
* Iterators
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlTextReaderRead (xmlTextReaderPtr reader);
|
||||
|
||||
#ifdef LIBXML_WRITER_ENABLED
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlTextReaderReadInnerXml(xmlTextReaderPtr reader);
|
||||
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlTextReaderReadOuterXml(xmlTextReaderPtr reader);
|
||||
#endif
|
||||
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlTextReaderReadString (xmlTextReaderPtr reader);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlTextReaderReadAttributeValue(xmlTextReaderPtr reader);
|
||||
|
||||
/*
|
||||
* Attributes of the node
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlTextReaderAttributeCount(xmlTextReaderPtr reader);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlTextReaderDepth (xmlTextReaderPtr reader);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlTextReaderHasAttributes(xmlTextReaderPtr reader);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlTextReaderHasValue(xmlTextReaderPtr reader);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlTextReaderIsDefault (xmlTextReaderPtr reader);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlTextReaderIsEmptyElement(xmlTextReaderPtr reader);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlTextReaderNodeType (xmlTextReaderPtr reader);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlTextReaderQuoteChar (xmlTextReaderPtr reader);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlTextReaderReadState (xmlTextReaderPtr reader);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlTextReaderIsNamespaceDecl(xmlTextReaderPtr reader);
|
||||
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
XMLPUBFUN const xmlChar *
|
||||
xmlTextReaderConstBaseUri (xmlTextReaderPtr reader);
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
XMLPUBFUN const xmlChar *
|
||||
xmlTextReaderConstLocalName (xmlTextReaderPtr reader);
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
XMLPUBFUN const xmlChar *
|
||||
xmlTextReaderConstName (xmlTextReaderPtr reader);
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
XMLPUBFUN const xmlChar *
|
||||
xmlTextReaderConstNamespaceUri(xmlTextReaderPtr reader);
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
XMLPUBFUN const xmlChar *
|
||||
xmlTextReaderConstPrefix (xmlTextReaderPtr reader);
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
XMLPUBFUN const xmlChar *
|
||||
xmlTextReaderConstXmlLang (xmlTextReaderPtr reader);
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
XMLPUBFUN const xmlChar *
|
||||
xmlTextReaderConstString (xmlTextReaderPtr reader,
|
||||
const xmlChar *str);
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
XMLPUBFUN const xmlChar *
|
||||
xmlTextReaderConstValue (xmlTextReaderPtr reader);
|
||||
|
||||
/*
|
||||
* use the Const version of the routine for
|
||||
* better performance and simpler code
|
||||
*/
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlTextReaderBaseUri (xmlTextReaderPtr reader);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlTextReaderLocalName (xmlTextReaderPtr reader);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlTextReaderName (xmlTextReaderPtr reader);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlTextReaderNamespaceUri(xmlTextReaderPtr reader);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlTextReaderPrefix (xmlTextReaderPtr reader);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlTextReaderXmlLang (xmlTextReaderPtr reader);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlTextReaderValue (xmlTextReaderPtr reader);
|
||||
|
||||
/*
|
||||
* Methods of the XmlTextReader
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlTextReaderClose (xmlTextReaderPtr reader);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlTextReaderGetAttributeNo (xmlTextReaderPtr reader,
|
||||
int no);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlTextReaderGetAttribute (xmlTextReaderPtr reader,
|
||||
const xmlChar *name);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlTextReaderGetAttributeNs (xmlTextReaderPtr reader,
|
||||
const xmlChar *localName,
|
||||
const xmlChar *namespaceURI);
|
||||
XMLPUBFUN xmlParserInputBufferPtr XMLCALL
|
||||
XMLPUBFUN xmlParserInputBufferPtr
|
||||
xmlTextReaderGetRemainder (xmlTextReaderPtr reader);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlTextReaderLookupNamespace(xmlTextReaderPtr reader,
|
||||
const xmlChar *prefix);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlTextReaderMoveToAttributeNo(xmlTextReaderPtr reader,
|
||||
int no);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlTextReaderMoveToAttribute(xmlTextReaderPtr reader,
|
||||
const xmlChar *name);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlTextReaderMoveToAttributeNs(xmlTextReaderPtr reader,
|
||||
const xmlChar *localName,
|
||||
const xmlChar *namespaceURI);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlTextReaderMoveToFirstAttribute(xmlTextReaderPtr reader);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlTextReaderMoveToNextAttribute(xmlTextReaderPtr reader);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlTextReaderMoveToElement (xmlTextReaderPtr reader);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlTextReaderNormalization (xmlTextReaderPtr reader);
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
XMLPUBFUN const xmlChar *
|
||||
xmlTextReaderConstEncoding (xmlTextReaderPtr reader);
|
||||
|
||||
/*
|
||||
* Extensions
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlTextReaderSetParserProp (xmlTextReaderPtr reader,
|
||||
int prop,
|
||||
int value);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlTextReaderGetParserProp (xmlTextReaderPtr reader,
|
||||
int prop);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
XMLPUBFUN xmlNodePtr
|
||||
xmlTextReaderCurrentNode (xmlTextReaderPtr reader);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlTextReaderGetParserLineNumber(xmlTextReaderPtr reader);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlTextReaderGetParserColumnNumber(xmlTextReaderPtr reader);
|
||||
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
XMLPUBFUN xmlNodePtr
|
||||
xmlTextReaderPreserve (xmlTextReaderPtr reader);
|
||||
#ifdef LIBXML_PATTERN_ENABLED
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlTextReaderPreservePattern(xmlTextReaderPtr reader,
|
||||
const xmlChar *pattern,
|
||||
const xmlChar **namespaces);
|
||||
#endif /* LIBXML_PATTERN_ENABLED */
|
||||
XMLPUBFUN xmlDocPtr XMLCALL
|
||||
XMLPUBFUN xmlDocPtr
|
||||
xmlTextReaderCurrentDoc (xmlTextReaderPtr reader);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
XMLPUBFUN xmlNodePtr
|
||||
xmlTextReaderExpand (xmlTextReaderPtr reader);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlTextReaderNext (xmlTextReaderPtr reader);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlTextReaderNextSibling (xmlTextReaderPtr reader);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlTextReaderIsValid (xmlTextReaderPtr reader);
|
||||
#ifdef LIBXML_SCHEMAS_ENABLED
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlTextReaderRelaxNGValidate(xmlTextReaderPtr reader,
|
||||
const char *rng);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlTextReaderRelaxNGValidateCtxt(xmlTextReaderPtr reader,
|
||||
xmlRelaxNGValidCtxtPtr ctxt,
|
||||
int options);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlTextReaderRelaxNGSetSchema(xmlTextReaderPtr reader,
|
||||
xmlRelaxNGPtr schema);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlTextReaderSchemaValidate (xmlTextReaderPtr reader,
|
||||
const char *xsd);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlTextReaderSchemaValidateCtxt(xmlTextReaderPtr reader,
|
||||
xmlSchemaValidCtxtPtr ctxt,
|
||||
int options);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlTextReaderSetSchema (xmlTextReaderPtr reader,
|
||||
xmlSchemaPtr schema);
|
||||
#endif
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
XMLPUBFUN const xmlChar *
|
||||
xmlTextReaderConstXmlVersion(xmlTextReaderPtr reader);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlTextReaderStandalone (xmlTextReaderPtr reader);
|
||||
|
||||
|
||||
/*
|
||||
* Index lookup
|
||||
*/
|
||||
XMLPUBFUN long XMLCALL
|
||||
XMLPUBFUN long
|
||||
xmlTextReaderByteConsumed (xmlTextReaderPtr reader);
|
||||
|
||||
/*
|
||||
* New more complete APIs for simpler creation and reuse of readers
|
||||
*/
|
||||
XMLPUBFUN xmlTextReaderPtr XMLCALL
|
||||
XMLPUBFUN xmlTextReaderPtr
|
||||
xmlReaderWalker (xmlDocPtr doc);
|
||||
XMLPUBFUN xmlTextReaderPtr XMLCALL
|
||||
XMLPUBFUN xmlTextReaderPtr
|
||||
xmlReaderForDoc (const xmlChar * cur,
|
||||
const char *URL,
|
||||
const char *encoding,
|
||||
int options);
|
||||
XMLPUBFUN xmlTextReaderPtr XMLCALL
|
||||
XMLPUBFUN xmlTextReaderPtr
|
||||
xmlReaderForFile (const char *filename,
|
||||
const char *encoding,
|
||||
int options);
|
||||
XMLPUBFUN xmlTextReaderPtr XMLCALL
|
||||
XMLPUBFUN xmlTextReaderPtr
|
||||
xmlReaderForMemory (const char *buffer,
|
||||
int size,
|
||||
const char *URL,
|
||||
const char *encoding,
|
||||
int options);
|
||||
XMLPUBFUN xmlTextReaderPtr XMLCALL
|
||||
XMLPUBFUN xmlTextReaderPtr
|
||||
xmlReaderForFd (int fd,
|
||||
const char *URL,
|
||||
const char *encoding,
|
||||
int options);
|
||||
XMLPUBFUN xmlTextReaderPtr XMLCALL
|
||||
XMLPUBFUN xmlTextReaderPtr
|
||||
xmlReaderForIO (xmlInputReadCallback ioread,
|
||||
xmlInputCloseCallback ioclose,
|
||||
void *ioctx,
|
||||
@@ -348,34 +354,34 @@ XMLPUBFUN xmlTextReaderPtr XMLCALL
|
||||
const char *encoding,
|
||||
int options);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlReaderNewWalker (xmlTextReaderPtr reader,
|
||||
xmlDocPtr doc);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlReaderNewDoc (xmlTextReaderPtr reader,
|
||||
const xmlChar * cur,
|
||||
const char *URL,
|
||||
const char *encoding,
|
||||
int options);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlReaderNewFile (xmlTextReaderPtr reader,
|
||||
const char *filename,
|
||||
const char *encoding,
|
||||
int options);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlReaderNewMemory (xmlTextReaderPtr reader,
|
||||
const char *buffer,
|
||||
int size,
|
||||
const char *URL,
|
||||
const char *encoding,
|
||||
int options);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlReaderNewFd (xmlTextReaderPtr reader,
|
||||
int fd,
|
||||
const char *URL,
|
||||
const char *encoding,
|
||||
int options);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlReaderNewIO (xmlTextReaderPtr reader,
|
||||
xmlInputReadCallback ioread,
|
||||
xmlInputCloseCallback ioclose,
|
||||
@@ -397,23 +403,23 @@ typedef void * xmlTextReaderLocatorPtr;
|
||||
*
|
||||
* Signature of an error callback from a reader parser
|
||||
*/
|
||||
typedef void (XMLCALL *xmlTextReaderErrorFunc)(void *arg,
|
||||
typedef void (*xmlTextReaderErrorFunc)(void *arg,
|
||||
const char *msg,
|
||||
xmlParserSeverities severity,
|
||||
xmlTextReaderLocatorPtr locator);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlTextReaderLocatorLineNumber(xmlTextReaderLocatorPtr locator);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlTextReaderLocatorBaseURI (xmlTextReaderLocatorPtr locator);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlTextReaderSetErrorHandler(xmlTextReaderPtr reader,
|
||||
xmlTextReaderErrorFunc f,
|
||||
void *arg);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlTextReaderSetStructuredErrorHandler(xmlTextReaderPtr reader,
|
||||
xmlStructuredErrorFunc f,
|
||||
void *arg);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlTextReaderGetErrorHandler(xmlTextReaderPtr reader,
|
||||
xmlTextReaderErrorFunc *f,
|
||||
void **arg);
|
||||
@@ -425,4 +431,3 @@ XMLPUBFUN void XMLCALL
|
||||
#endif
|
||||
|
||||
#endif /* __XML_XMLREADER_H__ */
|
||||
|
||||
Vendored
+32
-39
@@ -11,7 +11,9 @@
|
||||
#ifndef __XML_REGEXP_H__
|
||||
#define __XML_REGEXP_H__
|
||||
|
||||
#include <stdio.h>
|
||||
#include <libxml/xmlversion.h>
|
||||
#include <libxml/xmlstring.h>
|
||||
|
||||
#ifdef LIBXML_REGEXP_ENABLED
|
||||
|
||||
@@ -36,28 +38,19 @@ typedef xmlRegexp *xmlRegexpPtr;
|
||||
typedef struct _xmlRegExecCtxt xmlRegExecCtxt;
|
||||
typedef xmlRegExecCtxt *xmlRegExecCtxtPtr;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include <libxml/tree.h>
|
||||
#include <libxml/dict.h>
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The POSIX like API
|
||||
*/
|
||||
XMLPUBFUN xmlRegexpPtr XMLCALL
|
||||
XMLPUBFUN xmlRegexpPtr
|
||||
xmlRegexpCompile (const xmlChar *regexp);
|
||||
XMLPUBFUN void XMLCALL xmlRegFreeRegexp(xmlRegexpPtr regexp);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN void xmlRegFreeRegexp(xmlRegexpPtr regexp);
|
||||
XMLPUBFUN int
|
||||
xmlRegexpExec (xmlRegexpPtr comp,
|
||||
const xmlChar *value);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlRegexpPrint (FILE *output,
|
||||
xmlRegexpPtr regexp);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlRegexpIsDeterminist(xmlRegexpPtr comp);
|
||||
|
||||
/**
|
||||
@@ -77,29 +70,29 @@ typedef void (*xmlRegExecCallbacks) (xmlRegExecCtxtPtr exec,
|
||||
/*
|
||||
* The progressive API
|
||||
*/
|
||||
XMLPUBFUN xmlRegExecCtxtPtr XMLCALL
|
||||
XMLPUBFUN xmlRegExecCtxtPtr
|
||||
xmlRegNewExecCtxt (xmlRegexpPtr comp,
|
||||
xmlRegExecCallbacks callback,
|
||||
void *data);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlRegFreeExecCtxt (xmlRegExecCtxtPtr exec);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlRegExecPushString(xmlRegExecCtxtPtr exec,
|
||||
const xmlChar *value,
|
||||
void *data);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlRegExecPushString2(xmlRegExecCtxtPtr exec,
|
||||
const xmlChar *value,
|
||||
const xmlChar *value2,
|
||||
void *data);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlRegExecNextValues(xmlRegExecCtxtPtr exec,
|
||||
int *nbval,
|
||||
int *nbneg,
|
||||
xmlChar **values,
|
||||
int *terminal);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlRegExecErrInfo (xmlRegExecCtxtPtr exec,
|
||||
const xmlChar **string,
|
||||
int *nbval,
|
||||
@@ -116,15 +109,15 @@ XMLPUBFUN int XMLCALL
|
||||
typedef struct _xmlExpCtxt xmlExpCtxt;
|
||||
typedef xmlExpCtxt *xmlExpCtxtPtr;
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlExpFreeCtxt (xmlExpCtxtPtr ctxt);
|
||||
XMLPUBFUN xmlExpCtxtPtr XMLCALL
|
||||
XMLPUBFUN xmlExpCtxtPtr
|
||||
xmlExpNewCtxt (int maxNodes,
|
||||
xmlDictPtr dict);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlExpCtxtNbNodes(xmlExpCtxtPtr ctxt);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlExpCtxtNbCons(xmlExpCtxtPtr ctxt);
|
||||
|
||||
/* Expressions are trees but the tree is opaque */
|
||||
@@ -150,31 +143,31 @@ XMLPUBVAR xmlExpNodePtr emptyExp;
|
||||
/*
|
||||
* Expressions are reference counted internally
|
||||
*/
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlExpFree (xmlExpCtxtPtr ctxt,
|
||||
xmlExpNodePtr expr);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlExpRef (xmlExpNodePtr expr);
|
||||
|
||||
/*
|
||||
* constructors can be either manual or from a string
|
||||
*/
|
||||
XMLPUBFUN xmlExpNodePtr XMLCALL
|
||||
XMLPUBFUN xmlExpNodePtr
|
||||
xmlExpParse (xmlExpCtxtPtr ctxt,
|
||||
const char *expr);
|
||||
XMLPUBFUN xmlExpNodePtr XMLCALL
|
||||
XMLPUBFUN xmlExpNodePtr
|
||||
xmlExpNewAtom (xmlExpCtxtPtr ctxt,
|
||||
const xmlChar *name,
|
||||
int len);
|
||||
XMLPUBFUN xmlExpNodePtr XMLCALL
|
||||
XMLPUBFUN xmlExpNodePtr
|
||||
xmlExpNewOr (xmlExpCtxtPtr ctxt,
|
||||
xmlExpNodePtr left,
|
||||
xmlExpNodePtr right);
|
||||
XMLPUBFUN xmlExpNodePtr XMLCALL
|
||||
XMLPUBFUN xmlExpNodePtr
|
||||
xmlExpNewSeq (xmlExpCtxtPtr ctxt,
|
||||
xmlExpNodePtr left,
|
||||
xmlExpNodePtr right);
|
||||
XMLPUBFUN xmlExpNodePtr XMLCALL
|
||||
XMLPUBFUN xmlExpNodePtr
|
||||
xmlExpNewRange (xmlExpCtxtPtr ctxt,
|
||||
xmlExpNodePtr subset,
|
||||
int min,
|
||||
@@ -182,34 +175,34 @@ XMLPUBFUN xmlExpNodePtr XMLCALL
|
||||
/*
|
||||
* The really interesting APIs
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlExpIsNillable(xmlExpNodePtr expr);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlExpMaxToken (xmlExpNodePtr expr);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlExpGetLanguage(xmlExpCtxtPtr ctxt,
|
||||
xmlExpNodePtr expr,
|
||||
const xmlChar**langList,
|
||||
int len);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlExpGetStart (xmlExpCtxtPtr ctxt,
|
||||
xmlExpNodePtr expr,
|
||||
const xmlChar**tokList,
|
||||
int len);
|
||||
XMLPUBFUN xmlExpNodePtr XMLCALL
|
||||
XMLPUBFUN xmlExpNodePtr
|
||||
xmlExpStringDerive(xmlExpCtxtPtr ctxt,
|
||||
xmlExpNodePtr expr,
|
||||
const xmlChar *str,
|
||||
int len);
|
||||
XMLPUBFUN xmlExpNodePtr XMLCALL
|
||||
XMLPUBFUN xmlExpNodePtr
|
||||
xmlExpExpDerive (xmlExpCtxtPtr ctxt,
|
||||
xmlExpNodePtr expr,
|
||||
xmlExpNodePtr sub);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlExpSubsume (xmlExpCtxtPtr ctxt,
|
||||
xmlExpNodePtr expr,
|
||||
xmlExpNodePtr sub);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlExpDump (xmlBufferPtr buf,
|
||||
xmlExpNodePtr expr);
|
||||
#endif /* LIBXML_EXPR_ENABLED */
|
||||
Vendored
+19
-12
@@ -41,48 +41,55 @@ typedef enum {
|
||||
typedef struct _xmlSaveCtxt xmlSaveCtxt;
|
||||
typedef xmlSaveCtxt *xmlSaveCtxtPtr;
|
||||
|
||||
XMLPUBFUN xmlSaveCtxtPtr XMLCALL
|
||||
XMLPUBFUN xmlSaveCtxtPtr
|
||||
xmlSaveToFd (int fd,
|
||||
const char *encoding,
|
||||
int options);
|
||||
XMLPUBFUN xmlSaveCtxtPtr XMLCALL
|
||||
XMLPUBFUN xmlSaveCtxtPtr
|
||||
xmlSaveToFilename (const char *filename,
|
||||
const char *encoding,
|
||||
int options);
|
||||
|
||||
XMLPUBFUN xmlSaveCtxtPtr XMLCALL
|
||||
XMLPUBFUN xmlSaveCtxtPtr
|
||||
xmlSaveToBuffer (xmlBufferPtr buffer,
|
||||
const char *encoding,
|
||||
int options);
|
||||
|
||||
XMLPUBFUN xmlSaveCtxtPtr XMLCALL
|
||||
XMLPUBFUN xmlSaveCtxtPtr
|
||||
xmlSaveToIO (xmlOutputWriteCallback iowrite,
|
||||
xmlOutputCloseCallback ioclose,
|
||||
void *ioctx,
|
||||
const char *encoding,
|
||||
int options);
|
||||
|
||||
XMLPUBFUN long XMLCALL
|
||||
XMLPUBFUN long
|
||||
xmlSaveDoc (xmlSaveCtxtPtr ctxt,
|
||||
xmlDocPtr doc);
|
||||
XMLPUBFUN long XMLCALL
|
||||
XMLPUBFUN long
|
||||
xmlSaveTree (xmlSaveCtxtPtr ctxt,
|
||||
xmlNodePtr node);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlSaveFlush (xmlSaveCtxtPtr ctxt);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlSaveClose (xmlSaveCtxtPtr ctxt);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlSaveSetEscape (xmlSaveCtxtPtr ctxt,
|
||||
xmlCharEncodingOutputFunc escape);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlSaveSetAttrEscape (xmlSaveCtxtPtr ctxt,
|
||||
xmlCharEncodingOutputFunc escape);
|
||||
|
||||
XMLPUBFUN int
|
||||
xmlThrDefIndentTreeOutput(int v);
|
||||
XMLPUBFUN const char *
|
||||
xmlThrDefTreeIndentString(const char * v);
|
||||
XMLPUBFUN int
|
||||
xmlThrDefSaveNoEmptyTags(int v);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
#endif /* __XML_XMLSAVE_H__ */
|
||||
|
||||
|
||||
Vendored
+33
-30
@@ -16,7 +16,10 @@
|
||||
|
||||
#ifdef LIBXML_SCHEMAS_ENABLED
|
||||
|
||||
#include <stdio.h>
|
||||
#include <libxml/encoding.h>
|
||||
#include <libxml/tree.h>
|
||||
#include <libxml/xmlerror.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -92,7 +95,7 @@ typedef xmlSchema *xmlSchemaPtr;
|
||||
*
|
||||
* Signature of an error callback from an XSD validation
|
||||
*/
|
||||
typedef void (XMLCDECL *xmlSchemaValidityErrorFunc)
|
||||
typedef void (*xmlSchemaValidityErrorFunc)
|
||||
(void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
|
||||
|
||||
/**
|
||||
@@ -103,7 +106,7 @@ typedef void (XMLCDECL *xmlSchemaValidityErrorFunc)
|
||||
*
|
||||
* Signature of a warning callback from an XSD validation
|
||||
*/
|
||||
typedef void (XMLCDECL *xmlSchemaValidityWarningFunc)
|
||||
typedef void (*xmlSchemaValidityWarningFunc)
|
||||
(void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
|
||||
|
||||
/**
|
||||
@@ -128,95 +131,95 @@ typedef xmlSchemaValidCtxt *xmlSchemaValidCtxtPtr;
|
||||
* Returns: 0 in case of success and -1 in case of error
|
||||
*/
|
||||
|
||||
typedef int (XMLCDECL *xmlSchemaValidityLocatorFunc) (void *ctx,
|
||||
typedef int (*xmlSchemaValidityLocatorFunc) (void *ctx,
|
||||
const char **file, unsigned long *line);
|
||||
|
||||
/*
|
||||
* Interfaces for parsing.
|
||||
*/
|
||||
XMLPUBFUN xmlSchemaParserCtxtPtr XMLCALL
|
||||
XMLPUBFUN xmlSchemaParserCtxtPtr
|
||||
xmlSchemaNewParserCtxt (const char *URL);
|
||||
XMLPUBFUN xmlSchemaParserCtxtPtr XMLCALL
|
||||
XMLPUBFUN xmlSchemaParserCtxtPtr
|
||||
xmlSchemaNewMemParserCtxt (const char *buffer,
|
||||
int size);
|
||||
XMLPUBFUN xmlSchemaParserCtxtPtr XMLCALL
|
||||
XMLPUBFUN xmlSchemaParserCtxtPtr
|
||||
xmlSchemaNewDocParserCtxt (xmlDocPtr doc);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlSchemaFreeParserCtxt (xmlSchemaParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlSchemaSetParserErrors (xmlSchemaParserCtxtPtr ctxt,
|
||||
xmlSchemaValidityErrorFunc err,
|
||||
xmlSchemaValidityWarningFunc warn,
|
||||
void *ctx);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlSchemaSetParserStructuredErrors(xmlSchemaParserCtxtPtr ctxt,
|
||||
xmlStructuredErrorFunc serror,
|
||||
void *ctx);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlSchemaGetParserErrors(xmlSchemaParserCtxtPtr ctxt,
|
||||
xmlSchemaValidityErrorFunc * err,
|
||||
xmlSchemaValidityWarningFunc * warn,
|
||||
void **ctx);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlSchemaIsValid (xmlSchemaValidCtxtPtr ctxt);
|
||||
|
||||
XMLPUBFUN xmlSchemaPtr XMLCALL
|
||||
XMLPUBFUN xmlSchemaPtr
|
||||
xmlSchemaParse (xmlSchemaParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlSchemaFree (xmlSchemaPtr schema);
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlSchemaDump (FILE *output,
|
||||
xmlSchemaPtr schema);
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
/*
|
||||
* Interfaces for validating
|
||||
*/
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlSchemaSetValidErrors (xmlSchemaValidCtxtPtr ctxt,
|
||||
xmlSchemaValidityErrorFunc err,
|
||||
xmlSchemaValidityWarningFunc warn,
|
||||
void *ctx);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlSchemaSetValidStructuredErrors(xmlSchemaValidCtxtPtr ctxt,
|
||||
xmlStructuredErrorFunc serror,
|
||||
void *ctx);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlSchemaGetValidErrors (xmlSchemaValidCtxtPtr ctxt,
|
||||
xmlSchemaValidityErrorFunc *err,
|
||||
xmlSchemaValidityWarningFunc *warn,
|
||||
void **ctx);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlSchemaSetValidOptions (xmlSchemaValidCtxtPtr ctxt,
|
||||
int options);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlSchemaValidateSetFilename(xmlSchemaValidCtxtPtr vctxt,
|
||||
const char *filename);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlSchemaValidCtxtGetOptions(xmlSchemaValidCtxtPtr ctxt);
|
||||
|
||||
XMLPUBFUN xmlSchemaValidCtxtPtr XMLCALL
|
||||
XMLPUBFUN xmlSchemaValidCtxtPtr
|
||||
xmlSchemaNewValidCtxt (xmlSchemaPtr schema);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlSchemaFreeValidCtxt (xmlSchemaValidCtxtPtr ctxt);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlSchemaValidateDoc (xmlSchemaValidCtxtPtr ctxt,
|
||||
xmlDocPtr instance);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlSchemaValidateOneElement (xmlSchemaValidCtxtPtr ctxt,
|
||||
xmlNodePtr elem);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlSchemaValidateStream (xmlSchemaValidCtxtPtr ctxt,
|
||||
xmlParserInputBufferPtr input,
|
||||
xmlCharEncoding enc,
|
||||
xmlSAXHandlerPtr sax,
|
||||
void *user_data);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlSchemaValidateFile (xmlSchemaValidCtxtPtr ctxt,
|
||||
const char * filename,
|
||||
int options);
|
||||
|
||||
XMLPUBFUN xmlParserCtxtPtr XMLCALL
|
||||
XMLPUBFUN xmlParserCtxtPtr
|
||||
xmlSchemaValidCtxtGetParserCtxt(xmlSchemaValidCtxtPtr ctxt);
|
||||
|
||||
/*
|
||||
@@ -225,15 +228,15 @@ XMLPUBFUN xmlParserCtxtPtr XMLCALL
|
||||
typedef struct _xmlSchemaSAXPlug xmlSchemaSAXPlugStruct;
|
||||
typedef xmlSchemaSAXPlugStruct *xmlSchemaSAXPlugPtr;
|
||||
|
||||
XMLPUBFUN xmlSchemaSAXPlugPtr XMLCALL
|
||||
XMLPUBFUN xmlSchemaSAXPlugPtr
|
||||
xmlSchemaSAXPlug (xmlSchemaValidCtxtPtr ctxt,
|
||||
xmlSAXHandlerPtr *sax,
|
||||
void **user_data);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlSchemaSAXUnplug (xmlSchemaSAXPlugPtr plug);
|
||||
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlSchemaValidateSetLocator (xmlSchemaValidCtxtPtr vctxt,
|
||||
xmlSchemaValidityLocatorFunc f,
|
||||
void *ctxt);
|
||||
+34
-34
@@ -30,118 +30,118 @@ typedef enum {
|
||||
XML_SCHEMA_WHITESPACE_COLLAPSE = 3
|
||||
} xmlSchemaWhitespaceValueType;
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlSchemaInitTypes (void);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlSchemaCleanupTypes (void);
|
||||
XMLPUBFUN xmlSchemaTypePtr XMLCALL
|
||||
XMLPUBFUN xmlSchemaTypePtr
|
||||
xmlSchemaGetPredefinedType (const xmlChar *name,
|
||||
const xmlChar *ns);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlSchemaValidatePredefinedType (xmlSchemaTypePtr type,
|
||||
const xmlChar *value,
|
||||
xmlSchemaValPtr *val);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlSchemaValPredefTypeNode (xmlSchemaTypePtr type,
|
||||
const xmlChar *value,
|
||||
xmlSchemaValPtr *val,
|
||||
xmlNodePtr node);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlSchemaValidateFacet (xmlSchemaTypePtr base,
|
||||
xmlSchemaFacetPtr facet,
|
||||
const xmlChar *value,
|
||||
xmlSchemaValPtr val);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlSchemaValidateFacetWhtsp (xmlSchemaFacetPtr facet,
|
||||
xmlSchemaWhitespaceValueType fws,
|
||||
xmlSchemaValType valType,
|
||||
const xmlChar *value,
|
||||
xmlSchemaValPtr val,
|
||||
xmlSchemaWhitespaceValueType ws);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlSchemaFreeValue (xmlSchemaValPtr val);
|
||||
XMLPUBFUN xmlSchemaFacetPtr XMLCALL
|
||||
XMLPUBFUN xmlSchemaFacetPtr
|
||||
xmlSchemaNewFacet (void);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlSchemaCheckFacet (xmlSchemaFacetPtr facet,
|
||||
xmlSchemaTypePtr typeDecl,
|
||||
xmlSchemaParserCtxtPtr ctxt,
|
||||
const xmlChar *name);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlSchemaFreeFacet (xmlSchemaFacetPtr facet);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlSchemaCompareValues (xmlSchemaValPtr x,
|
||||
xmlSchemaValPtr y);
|
||||
XMLPUBFUN xmlSchemaTypePtr XMLCALL
|
||||
XMLPUBFUN xmlSchemaTypePtr
|
||||
xmlSchemaGetBuiltInListSimpleTypeItemType (xmlSchemaTypePtr type);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlSchemaValidateListSimpleTypeFacet (xmlSchemaFacetPtr facet,
|
||||
const xmlChar *value,
|
||||
unsigned long actualLen,
|
||||
unsigned long *expectedLen);
|
||||
XMLPUBFUN xmlSchemaTypePtr XMLCALL
|
||||
XMLPUBFUN xmlSchemaTypePtr
|
||||
xmlSchemaGetBuiltInType (xmlSchemaValType type);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlSchemaIsBuiltInTypeFacet (xmlSchemaTypePtr type,
|
||||
int facetType);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlSchemaCollapseString (const xmlChar *value);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlSchemaWhiteSpaceReplace (const xmlChar *value);
|
||||
XMLPUBFUN unsigned long XMLCALL
|
||||
XMLPUBFUN unsigned long
|
||||
xmlSchemaGetFacetValueAsULong (xmlSchemaFacetPtr facet);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlSchemaValidateLengthFacet (xmlSchemaTypePtr type,
|
||||
xmlSchemaFacetPtr facet,
|
||||
const xmlChar *value,
|
||||
xmlSchemaValPtr val,
|
||||
unsigned long *length);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlSchemaValidateLengthFacetWhtsp(xmlSchemaFacetPtr facet,
|
||||
xmlSchemaValType valType,
|
||||
const xmlChar *value,
|
||||
xmlSchemaValPtr val,
|
||||
unsigned long *length,
|
||||
xmlSchemaWhitespaceValueType ws);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlSchemaValPredefTypeNodeNoNorm(xmlSchemaTypePtr type,
|
||||
const xmlChar *value,
|
||||
xmlSchemaValPtr *val,
|
||||
xmlNodePtr node);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlSchemaGetCanonValue (xmlSchemaValPtr val,
|
||||
const xmlChar **retValue);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlSchemaGetCanonValueWhtsp (xmlSchemaValPtr val,
|
||||
const xmlChar **retValue,
|
||||
xmlSchemaWhitespaceValueType ws);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlSchemaValueAppend (xmlSchemaValPtr prev,
|
||||
xmlSchemaValPtr cur);
|
||||
XMLPUBFUN xmlSchemaValPtr XMLCALL
|
||||
XMLPUBFUN xmlSchemaValPtr
|
||||
xmlSchemaValueGetNext (xmlSchemaValPtr cur);
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
XMLPUBFUN const xmlChar *
|
||||
xmlSchemaValueGetAsString (xmlSchemaValPtr val);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlSchemaValueGetAsBoolean (xmlSchemaValPtr val);
|
||||
XMLPUBFUN xmlSchemaValPtr XMLCALL
|
||||
XMLPUBFUN xmlSchemaValPtr
|
||||
xmlSchemaNewStringValue (xmlSchemaValType type,
|
||||
const xmlChar *value);
|
||||
XMLPUBFUN xmlSchemaValPtr XMLCALL
|
||||
XMLPUBFUN xmlSchemaValPtr
|
||||
xmlSchemaNewNOTATIONValue (const xmlChar *name,
|
||||
const xmlChar *ns);
|
||||
XMLPUBFUN xmlSchemaValPtr XMLCALL
|
||||
XMLPUBFUN xmlSchemaValPtr
|
||||
xmlSchemaNewQNameValue (const xmlChar *namespaceName,
|
||||
const xmlChar *localName);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlSchemaCompareValuesWhtsp (xmlSchemaValPtr x,
|
||||
xmlSchemaWhitespaceValueType xws,
|
||||
xmlSchemaValPtr y,
|
||||
xmlSchemaWhitespaceValueType yws);
|
||||
XMLPUBFUN xmlSchemaValPtr XMLCALL
|
||||
XMLPUBFUN xmlSchemaValPtr
|
||||
xmlSchemaCopyValue (xmlSchemaValPtr val);
|
||||
XMLPUBFUN xmlSchemaValType XMLCALL
|
||||
XMLPUBFUN xmlSchemaValType
|
||||
xmlSchemaGetValType (xmlSchemaValPtr val);
|
||||
|
||||
#ifdef __cplusplus
|
||||
Vendored
+30
-30
@@ -37,100 +37,100 @@ typedef unsigned char xmlChar;
|
||||
/*
|
||||
* xmlChar handling
|
||||
*/
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlStrdup (const xmlChar *cur);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlStrndup (const xmlChar *cur,
|
||||
int len);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlCharStrndup (const char *cur,
|
||||
int len);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlCharStrdup (const char *cur);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlStrsub (const xmlChar *str,
|
||||
int start,
|
||||
int len);
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
XMLPUBFUN const xmlChar *
|
||||
xmlStrchr (const xmlChar *str,
|
||||
xmlChar val);
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
XMLPUBFUN const xmlChar *
|
||||
xmlStrstr (const xmlChar *str,
|
||||
const xmlChar *val);
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
XMLPUBFUN const xmlChar *
|
||||
xmlStrcasestr (const xmlChar *str,
|
||||
const xmlChar *val);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlStrcmp (const xmlChar *str1,
|
||||
const xmlChar *str2);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlStrncmp (const xmlChar *str1,
|
||||
const xmlChar *str2,
|
||||
int len);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlStrcasecmp (const xmlChar *str1,
|
||||
const xmlChar *str2);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlStrncasecmp (const xmlChar *str1,
|
||||
const xmlChar *str2,
|
||||
int len);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlStrEqual (const xmlChar *str1,
|
||||
const xmlChar *str2);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlStrQEqual (const xmlChar *pref,
|
||||
const xmlChar *name,
|
||||
const xmlChar *str);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlStrlen (const xmlChar *str);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlStrcat (xmlChar *cur,
|
||||
const xmlChar *add);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlStrncat (xmlChar *cur,
|
||||
const xmlChar *add,
|
||||
int len);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlStrncatNew (const xmlChar *str1,
|
||||
const xmlChar *str2,
|
||||
int len);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlStrPrintf (xmlChar *buf,
|
||||
int len,
|
||||
const char *msg,
|
||||
...) LIBXML_ATTR_FORMAT(3,4);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlStrVPrintf (xmlChar *buf,
|
||||
int len,
|
||||
const char *msg,
|
||||
va_list ap) LIBXML_ATTR_FORMAT(3,0);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlGetUTF8Char (const unsigned char *utf,
|
||||
int *len);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlCheckUTF8 (const unsigned char *utf);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlUTF8Strsize (const xmlChar *utf,
|
||||
int len);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlUTF8Strndup (const xmlChar *utf,
|
||||
int len);
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
XMLPUBFUN const xmlChar *
|
||||
xmlUTF8Strpos (const xmlChar *utf,
|
||||
int pos);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlUTF8Strloc (const xmlChar *utf,
|
||||
const xmlChar *utfchar);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlUTF8Strsub (const xmlChar *utf,
|
||||
int start,
|
||||
int len);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlUTF8Strlen (const xmlChar *utf);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlUTF8Size (const xmlChar *utf);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlUTF8Charcmp (const xmlChar *utf1,
|
||||
const xmlChar *utf2);
|
||||
|
||||
@@ -0,0 +1,202 @@
|
||||
/*
|
||||
* Summary: Unicode character APIs
|
||||
* Description: API for the Unicode character APIs
|
||||
*
|
||||
* This file is automatically generated from the
|
||||
* UCS description files of the Unicode Character Database
|
||||
* http://www.unicode.org/Public/4.0-Update1/UCD-4.0.1.html
|
||||
* using the genUnicode.py Python script.
|
||||
*
|
||||
* Generation date: Mon Mar 27 11:09:52 2006
|
||||
* Sources: Blocks-4.0.1.txt UnicodeData-4.0.1.txt
|
||||
* Author: Daniel Veillard
|
||||
*/
|
||||
|
||||
#ifndef __XML_UNICODE_H__
|
||||
#define __XML_UNICODE_H__
|
||||
|
||||
#include <libxml/xmlversion.h>
|
||||
|
||||
#ifdef LIBXML_UNICODE_ENABLED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
XMLPUBFUN int xmlUCSIsAegeanNumbers (int code);
|
||||
XMLPUBFUN int xmlUCSIsAlphabeticPresentationForms (int code);
|
||||
XMLPUBFUN int xmlUCSIsArabic (int code);
|
||||
XMLPUBFUN int xmlUCSIsArabicPresentationFormsA (int code);
|
||||
XMLPUBFUN int xmlUCSIsArabicPresentationFormsB (int code);
|
||||
XMLPUBFUN int xmlUCSIsArmenian (int code);
|
||||
XMLPUBFUN int xmlUCSIsArrows (int code);
|
||||
XMLPUBFUN int xmlUCSIsBasicLatin (int code);
|
||||
XMLPUBFUN int xmlUCSIsBengali (int code);
|
||||
XMLPUBFUN int xmlUCSIsBlockElements (int code);
|
||||
XMLPUBFUN int xmlUCSIsBopomofo (int code);
|
||||
XMLPUBFUN int xmlUCSIsBopomofoExtended (int code);
|
||||
XMLPUBFUN int xmlUCSIsBoxDrawing (int code);
|
||||
XMLPUBFUN int xmlUCSIsBraillePatterns (int code);
|
||||
XMLPUBFUN int xmlUCSIsBuhid (int code);
|
||||
XMLPUBFUN int xmlUCSIsByzantineMusicalSymbols (int code);
|
||||
XMLPUBFUN int xmlUCSIsCJKCompatibility (int code);
|
||||
XMLPUBFUN int xmlUCSIsCJKCompatibilityForms (int code);
|
||||
XMLPUBFUN int xmlUCSIsCJKCompatibilityIdeographs (int code);
|
||||
XMLPUBFUN int xmlUCSIsCJKCompatibilityIdeographsSupplement (int code);
|
||||
XMLPUBFUN int xmlUCSIsCJKRadicalsSupplement (int code);
|
||||
XMLPUBFUN int xmlUCSIsCJKSymbolsandPunctuation (int code);
|
||||
XMLPUBFUN int xmlUCSIsCJKUnifiedIdeographs (int code);
|
||||
XMLPUBFUN int xmlUCSIsCJKUnifiedIdeographsExtensionA (int code);
|
||||
XMLPUBFUN int xmlUCSIsCJKUnifiedIdeographsExtensionB (int code);
|
||||
XMLPUBFUN int xmlUCSIsCherokee (int code);
|
||||
XMLPUBFUN int xmlUCSIsCombiningDiacriticalMarks (int code);
|
||||
XMLPUBFUN int xmlUCSIsCombiningDiacriticalMarksforSymbols (int code);
|
||||
XMLPUBFUN int xmlUCSIsCombiningHalfMarks (int code);
|
||||
XMLPUBFUN int xmlUCSIsCombiningMarksforSymbols (int code);
|
||||
XMLPUBFUN int xmlUCSIsControlPictures (int code);
|
||||
XMLPUBFUN int xmlUCSIsCurrencySymbols (int code);
|
||||
XMLPUBFUN int xmlUCSIsCypriotSyllabary (int code);
|
||||
XMLPUBFUN int xmlUCSIsCyrillic (int code);
|
||||
XMLPUBFUN int xmlUCSIsCyrillicSupplement (int code);
|
||||
XMLPUBFUN int xmlUCSIsDeseret (int code);
|
||||
XMLPUBFUN int xmlUCSIsDevanagari (int code);
|
||||
XMLPUBFUN int xmlUCSIsDingbats (int code);
|
||||
XMLPUBFUN int xmlUCSIsEnclosedAlphanumerics (int code);
|
||||
XMLPUBFUN int xmlUCSIsEnclosedCJKLettersandMonths (int code);
|
||||
XMLPUBFUN int xmlUCSIsEthiopic (int code);
|
||||
XMLPUBFUN int xmlUCSIsGeneralPunctuation (int code);
|
||||
XMLPUBFUN int xmlUCSIsGeometricShapes (int code);
|
||||
XMLPUBFUN int xmlUCSIsGeorgian (int code);
|
||||
XMLPUBFUN int xmlUCSIsGothic (int code);
|
||||
XMLPUBFUN int xmlUCSIsGreek (int code);
|
||||
XMLPUBFUN int xmlUCSIsGreekExtended (int code);
|
||||
XMLPUBFUN int xmlUCSIsGreekandCoptic (int code);
|
||||
XMLPUBFUN int xmlUCSIsGujarati (int code);
|
||||
XMLPUBFUN int xmlUCSIsGurmukhi (int code);
|
||||
XMLPUBFUN int xmlUCSIsHalfwidthandFullwidthForms (int code);
|
||||
XMLPUBFUN int xmlUCSIsHangulCompatibilityJamo (int code);
|
||||
XMLPUBFUN int xmlUCSIsHangulJamo (int code);
|
||||
XMLPUBFUN int xmlUCSIsHangulSyllables (int code);
|
||||
XMLPUBFUN int xmlUCSIsHanunoo (int code);
|
||||
XMLPUBFUN int xmlUCSIsHebrew (int code);
|
||||
XMLPUBFUN int xmlUCSIsHighPrivateUseSurrogates (int code);
|
||||
XMLPUBFUN int xmlUCSIsHighSurrogates (int code);
|
||||
XMLPUBFUN int xmlUCSIsHiragana (int code);
|
||||
XMLPUBFUN int xmlUCSIsIPAExtensions (int code);
|
||||
XMLPUBFUN int xmlUCSIsIdeographicDescriptionCharacters (int code);
|
||||
XMLPUBFUN int xmlUCSIsKanbun (int code);
|
||||
XMLPUBFUN int xmlUCSIsKangxiRadicals (int code);
|
||||
XMLPUBFUN int xmlUCSIsKannada (int code);
|
||||
XMLPUBFUN int xmlUCSIsKatakana (int code);
|
||||
XMLPUBFUN int xmlUCSIsKatakanaPhoneticExtensions (int code);
|
||||
XMLPUBFUN int xmlUCSIsKhmer (int code);
|
||||
XMLPUBFUN int xmlUCSIsKhmerSymbols (int code);
|
||||
XMLPUBFUN int xmlUCSIsLao (int code);
|
||||
XMLPUBFUN int xmlUCSIsLatin1Supplement (int code);
|
||||
XMLPUBFUN int xmlUCSIsLatinExtendedA (int code);
|
||||
XMLPUBFUN int xmlUCSIsLatinExtendedB (int code);
|
||||
XMLPUBFUN int xmlUCSIsLatinExtendedAdditional (int code);
|
||||
XMLPUBFUN int xmlUCSIsLetterlikeSymbols (int code);
|
||||
XMLPUBFUN int xmlUCSIsLimbu (int code);
|
||||
XMLPUBFUN int xmlUCSIsLinearBIdeograms (int code);
|
||||
XMLPUBFUN int xmlUCSIsLinearBSyllabary (int code);
|
||||
XMLPUBFUN int xmlUCSIsLowSurrogates (int code);
|
||||
XMLPUBFUN int xmlUCSIsMalayalam (int code);
|
||||
XMLPUBFUN int xmlUCSIsMathematicalAlphanumericSymbols (int code);
|
||||
XMLPUBFUN int xmlUCSIsMathematicalOperators (int code);
|
||||
XMLPUBFUN int xmlUCSIsMiscellaneousMathematicalSymbolsA (int code);
|
||||
XMLPUBFUN int xmlUCSIsMiscellaneousMathematicalSymbolsB (int code);
|
||||
XMLPUBFUN int xmlUCSIsMiscellaneousSymbols (int code);
|
||||
XMLPUBFUN int xmlUCSIsMiscellaneousSymbolsandArrows (int code);
|
||||
XMLPUBFUN int xmlUCSIsMiscellaneousTechnical (int code);
|
||||
XMLPUBFUN int xmlUCSIsMongolian (int code);
|
||||
XMLPUBFUN int xmlUCSIsMusicalSymbols (int code);
|
||||
XMLPUBFUN int xmlUCSIsMyanmar (int code);
|
||||
XMLPUBFUN int xmlUCSIsNumberForms (int code);
|
||||
XMLPUBFUN int xmlUCSIsOgham (int code);
|
||||
XMLPUBFUN int xmlUCSIsOldItalic (int code);
|
||||
XMLPUBFUN int xmlUCSIsOpticalCharacterRecognition (int code);
|
||||
XMLPUBFUN int xmlUCSIsOriya (int code);
|
||||
XMLPUBFUN int xmlUCSIsOsmanya (int code);
|
||||
XMLPUBFUN int xmlUCSIsPhoneticExtensions (int code);
|
||||
XMLPUBFUN int xmlUCSIsPrivateUse (int code);
|
||||
XMLPUBFUN int xmlUCSIsPrivateUseArea (int code);
|
||||
XMLPUBFUN int xmlUCSIsRunic (int code);
|
||||
XMLPUBFUN int xmlUCSIsShavian (int code);
|
||||
XMLPUBFUN int xmlUCSIsSinhala (int code);
|
||||
XMLPUBFUN int xmlUCSIsSmallFormVariants (int code);
|
||||
XMLPUBFUN int xmlUCSIsSpacingModifierLetters (int code);
|
||||
XMLPUBFUN int xmlUCSIsSpecials (int code);
|
||||
XMLPUBFUN int xmlUCSIsSuperscriptsandSubscripts (int code);
|
||||
XMLPUBFUN int xmlUCSIsSupplementalArrowsA (int code);
|
||||
XMLPUBFUN int xmlUCSIsSupplementalArrowsB (int code);
|
||||
XMLPUBFUN int xmlUCSIsSupplementalMathematicalOperators (int code);
|
||||
XMLPUBFUN int xmlUCSIsSupplementaryPrivateUseAreaA (int code);
|
||||
XMLPUBFUN int xmlUCSIsSupplementaryPrivateUseAreaB (int code);
|
||||
XMLPUBFUN int xmlUCSIsSyriac (int code);
|
||||
XMLPUBFUN int xmlUCSIsTagalog (int code);
|
||||
XMLPUBFUN int xmlUCSIsTagbanwa (int code);
|
||||
XMLPUBFUN int xmlUCSIsTags (int code);
|
||||
XMLPUBFUN int xmlUCSIsTaiLe (int code);
|
||||
XMLPUBFUN int xmlUCSIsTaiXuanJingSymbols (int code);
|
||||
XMLPUBFUN int xmlUCSIsTamil (int code);
|
||||
XMLPUBFUN int xmlUCSIsTelugu (int code);
|
||||
XMLPUBFUN int xmlUCSIsThaana (int code);
|
||||
XMLPUBFUN int xmlUCSIsThai (int code);
|
||||
XMLPUBFUN int xmlUCSIsTibetan (int code);
|
||||
XMLPUBFUN int xmlUCSIsUgaritic (int code);
|
||||
XMLPUBFUN int xmlUCSIsUnifiedCanadianAboriginalSyllabics (int code);
|
||||
XMLPUBFUN int xmlUCSIsVariationSelectors (int code);
|
||||
XMLPUBFUN int xmlUCSIsVariationSelectorsSupplement (int code);
|
||||
XMLPUBFUN int xmlUCSIsYiRadicals (int code);
|
||||
XMLPUBFUN int xmlUCSIsYiSyllables (int code);
|
||||
XMLPUBFUN int xmlUCSIsYijingHexagramSymbols (int code);
|
||||
|
||||
XMLPUBFUN int xmlUCSIsBlock (int code, const char *block);
|
||||
|
||||
XMLPUBFUN int xmlUCSIsCatC (int code);
|
||||
XMLPUBFUN int xmlUCSIsCatCc (int code);
|
||||
XMLPUBFUN int xmlUCSIsCatCf (int code);
|
||||
XMLPUBFUN int xmlUCSIsCatCo (int code);
|
||||
XMLPUBFUN int xmlUCSIsCatCs (int code);
|
||||
XMLPUBFUN int xmlUCSIsCatL (int code);
|
||||
XMLPUBFUN int xmlUCSIsCatLl (int code);
|
||||
XMLPUBFUN int xmlUCSIsCatLm (int code);
|
||||
XMLPUBFUN int xmlUCSIsCatLo (int code);
|
||||
XMLPUBFUN int xmlUCSIsCatLt (int code);
|
||||
XMLPUBFUN int xmlUCSIsCatLu (int code);
|
||||
XMLPUBFUN int xmlUCSIsCatM (int code);
|
||||
XMLPUBFUN int xmlUCSIsCatMc (int code);
|
||||
XMLPUBFUN int xmlUCSIsCatMe (int code);
|
||||
XMLPUBFUN int xmlUCSIsCatMn (int code);
|
||||
XMLPUBFUN int xmlUCSIsCatN (int code);
|
||||
XMLPUBFUN int xmlUCSIsCatNd (int code);
|
||||
XMLPUBFUN int xmlUCSIsCatNl (int code);
|
||||
XMLPUBFUN int xmlUCSIsCatNo (int code);
|
||||
XMLPUBFUN int xmlUCSIsCatP (int code);
|
||||
XMLPUBFUN int xmlUCSIsCatPc (int code);
|
||||
XMLPUBFUN int xmlUCSIsCatPd (int code);
|
||||
XMLPUBFUN int xmlUCSIsCatPe (int code);
|
||||
XMLPUBFUN int xmlUCSIsCatPf (int code);
|
||||
XMLPUBFUN int xmlUCSIsCatPi (int code);
|
||||
XMLPUBFUN int xmlUCSIsCatPo (int code);
|
||||
XMLPUBFUN int xmlUCSIsCatPs (int code);
|
||||
XMLPUBFUN int xmlUCSIsCatS (int code);
|
||||
XMLPUBFUN int xmlUCSIsCatSc (int code);
|
||||
XMLPUBFUN int xmlUCSIsCatSk (int code);
|
||||
XMLPUBFUN int xmlUCSIsCatSm (int code);
|
||||
XMLPUBFUN int xmlUCSIsCatSo (int code);
|
||||
XMLPUBFUN int xmlUCSIsCatZ (int code);
|
||||
XMLPUBFUN int xmlUCSIsCatZl (int code);
|
||||
XMLPUBFUN int xmlUCSIsCatZp (int code);
|
||||
XMLPUBFUN int xmlUCSIsCatZs (int code);
|
||||
|
||||
XMLPUBFUN int xmlUCSIsCat (int code, const char *cat);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LIBXML_UNICODE_ENABLED */
|
||||
|
||||
#endif /* __XML_UNICODE_H__ */
|
||||
Vendored
+61
-55
@@ -21,7 +21,7 @@ extern "C" {
|
||||
* your library and includes mismatch
|
||||
*/
|
||||
#ifndef LIBXML2_COMPILING_MSCCDEF
|
||||
XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
|
||||
XMLPUBFUN void xmlCheckVersion(int version);
|
||||
#endif /* LIBXML2_COMPILING_MSCCDEF */
|
||||
|
||||
/**
|
||||
@@ -29,28 +29,28 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
|
||||
*
|
||||
* the version string like "1.2.3"
|
||||
*/
|
||||
#define LIBXML_DOTTED_VERSION "2.10.1"
|
||||
#define LIBXML_DOTTED_VERSION "2.12.8"
|
||||
|
||||
/**
|
||||
* LIBXML_VERSION:
|
||||
*
|
||||
* the version number: 1.2.3 value is 10203
|
||||
*/
|
||||
#define LIBXML_VERSION 21001
|
||||
#define LIBXML_VERSION 21208
|
||||
|
||||
/**
|
||||
* LIBXML_VERSION_STRING:
|
||||
*
|
||||
* the version number string, 1.2.3 value is "10203"
|
||||
*/
|
||||
#define LIBXML_VERSION_STRING "21001"
|
||||
#define LIBXML_VERSION_STRING "21208"
|
||||
|
||||
/**
|
||||
* LIBXML_VERSION_EXTRA:
|
||||
*
|
||||
* extra version information, used to show a git commit description
|
||||
*/
|
||||
#define LIBXML_VERSION_EXTRA "-GITv2.10.0-11-g5d96a5ded"
|
||||
#define LIBXML_VERSION_EXTRA ""
|
||||
|
||||
/**
|
||||
* LIBXML_TEST_VERSION:
|
||||
@@ -58,7 +58,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
|
||||
* Macro to check that the libxml version in use is compatible with
|
||||
* the version the software has been compiled against
|
||||
*/
|
||||
#define LIBXML_TEST_VERSION xmlCheckVersion(21001);
|
||||
#define LIBXML_TEST_VERSION xmlCheckVersion(21208);
|
||||
|
||||
#ifndef VMS
|
||||
#if 0
|
||||
@@ -180,7 +180,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
|
||||
*
|
||||
* Whether the HTTP support is configured in
|
||||
*/
|
||||
#if 1
|
||||
#if 0
|
||||
#define LIBXML_HTTP_ENABLED
|
||||
#endif
|
||||
|
||||
@@ -270,7 +270,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
|
||||
*
|
||||
* Whether iconv support is available
|
||||
*/
|
||||
#if 1
|
||||
#if 0
|
||||
#define LIBXML_ICONV_ENABLED
|
||||
#endif
|
||||
|
||||
@@ -313,7 +313,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
|
||||
/**
|
||||
* LIBXML_DEBUG_RUNTIME:
|
||||
*
|
||||
* Whether the runtime debugging is configured in
|
||||
* Removed
|
||||
*/
|
||||
#if 0
|
||||
#define LIBXML_DEBUG_RUNTIME
|
||||
@@ -380,7 +380,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
|
||||
*
|
||||
* Whether the module interfaces are compiled in
|
||||
*/
|
||||
#if 1
|
||||
#if 0
|
||||
#define LIBXML_MODULES_ENABLED
|
||||
/**
|
||||
* LIBXML_MODULE_EXTENSION:
|
||||
@@ -395,7 +395,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
|
||||
*
|
||||
* Whether the Zlib support is compiled in
|
||||
*/
|
||||
#if 1
|
||||
#if 0
|
||||
#define LIBXML_ZLIB_ENABLED
|
||||
#endif
|
||||
|
||||
@@ -409,12 +409,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
|
||||
#endif
|
||||
|
||||
#ifdef __GNUC__
|
||||
|
||||
/**
|
||||
* ATTRIBUTE_UNUSED:
|
||||
*
|
||||
* Macro used to signal to GCC unused function parameters
|
||||
*/
|
||||
/** DOC_DISABLE */
|
||||
|
||||
#ifndef ATTRIBUTE_UNUSED
|
||||
# if ((__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ >= 7)))
|
||||
@@ -424,12 +419,6 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_ATTR_ALLOC_SIZE:
|
||||
*
|
||||
* Macro used to indicate to GCC this is an allocator function
|
||||
*/
|
||||
|
||||
#ifndef LIBXML_ATTR_ALLOC_SIZE
|
||||
# if (!defined(__clang__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3))))
|
||||
# define LIBXML_ATTR_ALLOC_SIZE(x) __attribute__((alloc_size(x)))
|
||||
@@ -440,12 +429,6 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
|
||||
# define LIBXML_ATTR_ALLOC_SIZE(x)
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_ATTR_FORMAT:
|
||||
*
|
||||
* Macro used to indicate to GCC the parameter are printf like
|
||||
*/
|
||||
|
||||
#ifndef LIBXML_ATTR_FORMAT
|
||||
# if ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)))
|
||||
# define LIBXML_ATTR_FORMAT(fmt,args) __attribute__((__format__(__printf__,fmt,args)))
|
||||
@@ -457,47 +440,70 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
|
||||
#endif
|
||||
|
||||
#ifndef XML_DEPRECATED
|
||||
# ifdef IN_LIBXML
|
||||
# if defined (IN_LIBXML) || (__GNUC__ * 100 + __GNUC_MINOR__ < 301)
|
||||
# define XML_DEPRECATED
|
||||
# else
|
||||
/* Available since at least GCC 3.1 */
|
||||
# else
|
||||
# define XML_DEPRECATED __attribute__((deprecated))
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(__clang__) || (__GNUC__ * 100 + __GNUC_MINOR__ >= 406)
|
||||
#if defined(__clang__) || (__GNUC__ * 100 + __GNUC_MINOR__ >= 800)
|
||||
#define XML_IGNORE_FPTR_CAST_WARNINGS \
|
||||
_Pragma("GCC diagnostic push") \
|
||||
_Pragma("GCC diagnostic ignored \"-Wpedantic\"") \
|
||||
_Pragma("GCC diagnostic ignored \"-Wcast-function-type\"")
|
||||
#else
|
||||
#define XML_IGNORE_FPTR_CAST_WARNINGS \
|
||||
_Pragma("GCC diagnostic push") \
|
||||
_Pragma("GCC diagnostic ignored \"-Wpedantic\"")
|
||||
#endif
|
||||
#define XML_POP_WARNINGS \
|
||||
_Pragma("GCC diagnostic pop")
|
||||
#else
|
||||
#define XML_IGNORE_FPTR_CAST_WARNINGS
|
||||
#define XML_POP_WARNINGS
|
||||
#endif
|
||||
|
||||
#else /* ! __GNUC__ */
|
||||
/**
|
||||
* ATTRIBUTE_UNUSED:
|
||||
*
|
||||
* Macro used to signal to GCC unused function parameters
|
||||
*/
|
||||
#define ATTRIBUTE_UNUSED
|
||||
/**
|
||||
* LIBXML_ATTR_ALLOC_SIZE:
|
||||
*
|
||||
* Macro used to indicate to GCC this is an allocator function
|
||||
*/
|
||||
#define LIBXML_ATTR_ALLOC_SIZE(x)
|
||||
/**
|
||||
* LIBXML_ATTR_FORMAT:
|
||||
*
|
||||
* Macro used to indicate to GCC the parameter are printf like
|
||||
*/
|
||||
#define LIBXML_ATTR_FORMAT(fmt,args)
|
||||
/**
|
||||
* XML_DEPRECATED:
|
||||
*
|
||||
* Macro used to indicate that a function, variable, type or struct member
|
||||
* is deprecated.
|
||||
*/
|
||||
#ifndef XML_DEPRECATED
|
||||
#define XML_DEPRECATED
|
||||
# if defined (IN_LIBXML) || !defined (_MSC_VER)
|
||||
# define XML_DEPRECATED
|
||||
/* Available since Visual Studio 2005 */
|
||||
# elif defined (_MSC_VER) && (_MSC_VER >= 1400)
|
||||
# define XML_DEPRECATED __declspec(deprecated)
|
||||
# endif
|
||||
#endif
|
||||
#if defined (_MSC_VER) && (_MSC_VER >= 1400)
|
||||
# define XML_IGNORE_FPTR_CAST_WARNINGS __pragma(warning(push))
|
||||
#else
|
||||
# define XML_IGNORE_FPTR_CAST_WARNINGS
|
||||
#endif
|
||||
#ifndef XML_POP_WARNINGS
|
||||
# if defined (_MSC_VER) && (_MSC_VER >= 1400)
|
||||
# define XML_POP_WARNINGS __pragma(warning(pop))
|
||||
# else
|
||||
# define XML_POP_WARNINGS
|
||||
# endif
|
||||
#endif
|
||||
#endif /* __GNUC__ */
|
||||
|
||||
#define XML_NO_ATTR
|
||||
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
#define XML_DECLARE_GLOBAL(name, type, attrs) \
|
||||
attrs XMLPUBFUN type *__##name(void);
|
||||
#define XML_GLOBAL_MACRO(name) (*__##name())
|
||||
#else
|
||||
#define XML_DECLARE_GLOBAL(name, type, attrs) \
|
||||
attrs XMLPUBVAR type name;
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
#endif
|
||||
|
||||
|
||||
+41
-41
@@ -400,7 +400,7 @@ struct _xmlXPathParserContext {
|
||||
int xptr; /* it this an XPointer expression */
|
||||
xmlNodePtr ancestor; /* used for walking preceding axis */
|
||||
|
||||
int valueFrame; /* used to limit Pop on the stack */
|
||||
int valueFrame; /* always zero for compatibility */
|
||||
};
|
||||
|
||||
/************************************************************************
|
||||
@@ -454,68 +454,68 @@ XMLPUBVAR double xmlXPathNINF;
|
||||
(((ns) == NULL) || ((ns)->nodeNr == 0) || ((ns)->nodeTab == NULL))
|
||||
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlXPathFreeObject (xmlXPathObjectPtr obj);
|
||||
XMLPUBFUN xmlNodeSetPtr XMLCALL
|
||||
XMLPUBFUN xmlNodeSetPtr
|
||||
xmlXPathNodeSetCreate (xmlNodePtr val);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlXPathFreeNodeSetList (xmlXPathObjectPtr obj);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlXPathFreeNodeSet (xmlNodeSetPtr obj);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
XMLPUBFUN xmlXPathObjectPtr
|
||||
xmlXPathObjectCopy (xmlXPathObjectPtr val);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlXPathCmpNodes (xmlNodePtr node1,
|
||||
xmlNodePtr node2);
|
||||
/**
|
||||
* Conversion functions to basic types.
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlXPathCastNumberToBoolean (double val);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlXPathCastStringToBoolean (const xmlChar * val);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlXPathCastNodeSetToBoolean(xmlNodeSetPtr ns);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlXPathCastToBoolean (xmlXPathObjectPtr val);
|
||||
|
||||
XMLPUBFUN double XMLCALL
|
||||
XMLPUBFUN double
|
||||
xmlXPathCastBooleanToNumber (int val);
|
||||
XMLPUBFUN double XMLCALL
|
||||
XMLPUBFUN double
|
||||
xmlXPathCastStringToNumber (const xmlChar * val);
|
||||
XMLPUBFUN double XMLCALL
|
||||
XMLPUBFUN double
|
||||
xmlXPathCastNodeToNumber (xmlNodePtr node);
|
||||
XMLPUBFUN double XMLCALL
|
||||
XMLPUBFUN double
|
||||
xmlXPathCastNodeSetToNumber (xmlNodeSetPtr ns);
|
||||
XMLPUBFUN double XMLCALL
|
||||
XMLPUBFUN double
|
||||
xmlXPathCastToNumber (xmlXPathObjectPtr val);
|
||||
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlXPathCastBooleanToString (int val);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlXPathCastNumberToString (double val);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlXPathCastNodeToString (xmlNodePtr node);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlXPathCastNodeSetToString (xmlNodeSetPtr ns);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlXPathCastToString (xmlXPathObjectPtr val);
|
||||
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
XMLPUBFUN xmlXPathObjectPtr
|
||||
xmlXPathConvertBoolean (xmlXPathObjectPtr val);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
XMLPUBFUN xmlXPathObjectPtr
|
||||
xmlXPathConvertNumber (xmlXPathObjectPtr val);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
XMLPUBFUN xmlXPathObjectPtr
|
||||
xmlXPathConvertString (xmlXPathObjectPtr val);
|
||||
|
||||
/**
|
||||
* Context handling.
|
||||
*/
|
||||
XMLPUBFUN xmlXPathContextPtr XMLCALL
|
||||
XMLPUBFUN xmlXPathContextPtr
|
||||
xmlXPathNewContext (xmlDocPtr doc);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlXPathFreeContext (xmlXPathContextPtr ctxt);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlXPathContextSetCache(xmlXPathContextPtr ctxt,
|
||||
int active,
|
||||
int value,
|
||||
@@ -523,48 +523,48 @@ XMLPUBFUN int XMLCALL
|
||||
/**
|
||||
* Evaluation functions.
|
||||
*/
|
||||
XMLPUBFUN long XMLCALL
|
||||
XMLPUBFUN long
|
||||
xmlXPathOrderDocElems (xmlDocPtr doc);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlXPathSetContextNode (xmlNodePtr node,
|
||||
xmlXPathContextPtr ctx);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
XMLPUBFUN xmlXPathObjectPtr
|
||||
xmlXPathNodeEval (xmlNodePtr node,
|
||||
const xmlChar *str,
|
||||
xmlXPathContextPtr ctx);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
XMLPUBFUN xmlXPathObjectPtr
|
||||
xmlXPathEval (const xmlChar *str,
|
||||
xmlXPathContextPtr ctx);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
XMLPUBFUN xmlXPathObjectPtr
|
||||
xmlXPathEvalExpression (const xmlChar *str,
|
||||
xmlXPathContextPtr ctxt);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlXPathEvalPredicate (xmlXPathContextPtr ctxt,
|
||||
xmlXPathObjectPtr res);
|
||||
/**
|
||||
* Separate compilation/evaluation entry points.
|
||||
*/
|
||||
XMLPUBFUN xmlXPathCompExprPtr XMLCALL
|
||||
XMLPUBFUN xmlXPathCompExprPtr
|
||||
xmlXPathCompile (const xmlChar *str);
|
||||
XMLPUBFUN xmlXPathCompExprPtr XMLCALL
|
||||
XMLPUBFUN xmlXPathCompExprPtr
|
||||
xmlXPathCtxtCompile (xmlXPathContextPtr ctxt,
|
||||
const xmlChar *str);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
XMLPUBFUN xmlXPathObjectPtr
|
||||
xmlXPathCompiledEval (xmlXPathCompExprPtr comp,
|
||||
xmlXPathContextPtr ctx);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlXPathCompiledEvalToBoolean(xmlXPathCompExprPtr comp,
|
||||
xmlXPathContextPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlXPathFreeCompExpr (xmlXPathCompExprPtr comp);
|
||||
#endif /* LIBXML_XPATH_ENABLED */
|
||||
#if defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlXPathInit (void);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlXPathIsNaN (double val);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlXPathIsInf (double val);
|
||||
|
||||
#ifdef __cplusplus
|
||||
+119
-118
@@ -12,6 +12,7 @@
|
||||
#ifndef __XML_XPATH_INTERNALS_H__
|
||||
#define __XML_XPATH_INTERNALS_H__
|
||||
|
||||
#include <stdio.h>
|
||||
#include <libxml/xmlversion.h>
|
||||
#include <libxml/xpath.h>
|
||||
|
||||
@@ -100,15 +101,15 @@ extern "C" {
|
||||
*/
|
||||
#define xmlXPathGetContextNode(ctxt) ((ctxt)->context->node)
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlXPathPopBoolean (xmlXPathParserContextPtr ctxt);
|
||||
XMLPUBFUN double XMLCALL
|
||||
XMLPUBFUN double
|
||||
xmlXPathPopNumber (xmlXPathParserContextPtr ctxt);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlXPathPopString (xmlXPathParserContextPtr ctxt);
|
||||
XMLPUBFUN xmlNodeSetPtr XMLCALL
|
||||
XMLPUBFUN xmlNodeSetPtr
|
||||
xmlXPathPopNodeSet (xmlXPathParserContextPtr ctxt);
|
||||
XMLPUBFUN void * XMLCALL
|
||||
XMLPUBFUN void *
|
||||
xmlXPathPopExternal (xmlXPathParserContextPtr ctxt);
|
||||
|
||||
/**
|
||||
@@ -297,7 +298,7 @@ XMLPUBFUN void * XMLCALL
|
||||
if (ctxt == NULL) return; \
|
||||
if (nargs != (x)) \
|
||||
XP_ERROR(XPATH_INVALID_ARITY); \
|
||||
if (ctxt->valueNr < ctxt->valueFrame + (x)) \
|
||||
if (ctxt->valueNr < (x)) \
|
||||
XP_ERROR(XPATH_STACK_ERROR);
|
||||
|
||||
/**
|
||||
@@ -331,7 +332,7 @@ XMLPUBFUN void * XMLCALL
|
||||
* Variable Lookup forwarding.
|
||||
*/
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlXPathRegisterVariableLookup (xmlXPathContextPtr ctxt,
|
||||
xmlXPathVariableLookupFunc f,
|
||||
void *data);
|
||||
@@ -340,7 +341,7 @@ XMLPUBFUN void XMLCALL
|
||||
* Function Lookup forwarding.
|
||||
*/
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlXPathRegisterFuncLookup (xmlXPathContextPtr ctxt,
|
||||
xmlXPathFuncLookupFunc f,
|
||||
void *funcCtxt);
|
||||
@@ -348,22 +349,22 @@ XMLPUBFUN void XMLCALL
|
||||
/*
|
||||
* Error reporting.
|
||||
*/
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlXPatherror (xmlXPathParserContextPtr ctxt,
|
||||
const char *file,
|
||||
int line,
|
||||
int no);
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlXPathErr (xmlXPathParserContextPtr ctxt,
|
||||
int error);
|
||||
|
||||
#ifdef LIBXML_DEBUG_ENABLED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlXPathDebugDumpObject (FILE *output,
|
||||
xmlXPathObjectPtr cur,
|
||||
int depth);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlXPathDebugDumpCompExpr(FILE *output,
|
||||
xmlXPathCompExprPtr comp,
|
||||
int depth);
|
||||
@@ -371,48 +372,48 @@ XMLPUBFUN void XMLCALL
|
||||
/**
|
||||
* NodeSet handling.
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlXPathNodeSetContains (xmlNodeSetPtr cur,
|
||||
xmlNodePtr val);
|
||||
XMLPUBFUN xmlNodeSetPtr XMLCALL
|
||||
XMLPUBFUN xmlNodeSetPtr
|
||||
xmlXPathDifference (xmlNodeSetPtr nodes1,
|
||||
xmlNodeSetPtr nodes2);
|
||||
XMLPUBFUN xmlNodeSetPtr XMLCALL
|
||||
XMLPUBFUN xmlNodeSetPtr
|
||||
xmlXPathIntersection (xmlNodeSetPtr nodes1,
|
||||
xmlNodeSetPtr nodes2);
|
||||
|
||||
XMLPUBFUN xmlNodeSetPtr XMLCALL
|
||||
XMLPUBFUN xmlNodeSetPtr
|
||||
xmlXPathDistinctSorted (xmlNodeSetPtr nodes);
|
||||
XMLPUBFUN xmlNodeSetPtr XMLCALL
|
||||
XMLPUBFUN xmlNodeSetPtr
|
||||
xmlXPathDistinct (xmlNodeSetPtr nodes);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlXPathHasSameNodes (xmlNodeSetPtr nodes1,
|
||||
xmlNodeSetPtr nodes2);
|
||||
|
||||
XMLPUBFUN xmlNodeSetPtr XMLCALL
|
||||
XMLPUBFUN xmlNodeSetPtr
|
||||
xmlXPathNodeLeadingSorted (xmlNodeSetPtr nodes,
|
||||
xmlNodePtr node);
|
||||
XMLPUBFUN xmlNodeSetPtr XMLCALL
|
||||
XMLPUBFUN xmlNodeSetPtr
|
||||
xmlXPathLeadingSorted (xmlNodeSetPtr nodes1,
|
||||
xmlNodeSetPtr nodes2);
|
||||
XMLPUBFUN xmlNodeSetPtr XMLCALL
|
||||
XMLPUBFUN xmlNodeSetPtr
|
||||
xmlXPathNodeLeading (xmlNodeSetPtr nodes,
|
||||
xmlNodePtr node);
|
||||
XMLPUBFUN xmlNodeSetPtr XMLCALL
|
||||
XMLPUBFUN xmlNodeSetPtr
|
||||
xmlXPathLeading (xmlNodeSetPtr nodes1,
|
||||
xmlNodeSetPtr nodes2);
|
||||
|
||||
XMLPUBFUN xmlNodeSetPtr XMLCALL
|
||||
XMLPUBFUN xmlNodeSetPtr
|
||||
xmlXPathNodeTrailingSorted (xmlNodeSetPtr nodes,
|
||||
xmlNodePtr node);
|
||||
XMLPUBFUN xmlNodeSetPtr XMLCALL
|
||||
XMLPUBFUN xmlNodeSetPtr
|
||||
xmlXPathTrailingSorted (xmlNodeSetPtr nodes1,
|
||||
xmlNodeSetPtr nodes2);
|
||||
XMLPUBFUN xmlNodeSetPtr XMLCALL
|
||||
XMLPUBFUN xmlNodeSetPtr
|
||||
xmlXPathNodeTrailing (xmlNodeSetPtr nodes,
|
||||
xmlNodePtr node);
|
||||
XMLPUBFUN xmlNodeSetPtr XMLCALL
|
||||
XMLPUBFUN xmlNodeSetPtr
|
||||
xmlXPathTrailing (xmlNodeSetPtr nodes1,
|
||||
xmlNodeSetPtr nodes2);
|
||||
|
||||
@@ -421,208 +422,208 @@ XMLPUBFUN xmlNodeSetPtr XMLCALL
|
||||
* Extending a context.
|
||||
*/
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlXPathRegisterNs (xmlXPathContextPtr ctxt,
|
||||
const xmlChar *prefix,
|
||||
const xmlChar *ns_uri);
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
XMLPUBFUN const xmlChar *
|
||||
xmlXPathNsLookup (xmlXPathContextPtr ctxt,
|
||||
const xmlChar *prefix);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlXPathRegisteredNsCleanup (xmlXPathContextPtr ctxt);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlXPathRegisterFunc (xmlXPathContextPtr ctxt,
|
||||
const xmlChar *name,
|
||||
xmlXPathFunction f);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlXPathRegisterFuncNS (xmlXPathContextPtr ctxt,
|
||||
const xmlChar *name,
|
||||
const xmlChar *ns_uri,
|
||||
xmlXPathFunction f);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlXPathRegisterVariable (xmlXPathContextPtr ctxt,
|
||||
const xmlChar *name,
|
||||
xmlXPathObjectPtr value);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlXPathRegisterVariableNS (xmlXPathContextPtr ctxt,
|
||||
const xmlChar *name,
|
||||
const xmlChar *ns_uri,
|
||||
xmlXPathObjectPtr value);
|
||||
XMLPUBFUN xmlXPathFunction XMLCALL
|
||||
XMLPUBFUN xmlXPathFunction
|
||||
xmlXPathFunctionLookup (xmlXPathContextPtr ctxt,
|
||||
const xmlChar *name);
|
||||
XMLPUBFUN xmlXPathFunction XMLCALL
|
||||
XMLPUBFUN xmlXPathFunction
|
||||
xmlXPathFunctionLookupNS (xmlXPathContextPtr ctxt,
|
||||
const xmlChar *name,
|
||||
const xmlChar *ns_uri);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlXPathRegisteredFuncsCleanup (xmlXPathContextPtr ctxt);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
XMLPUBFUN xmlXPathObjectPtr
|
||||
xmlXPathVariableLookup (xmlXPathContextPtr ctxt,
|
||||
const xmlChar *name);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
XMLPUBFUN xmlXPathObjectPtr
|
||||
xmlXPathVariableLookupNS (xmlXPathContextPtr ctxt,
|
||||
const xmlChar *name,
|
||||
const xmlChar *ns_uri);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlXPathRegisteredVariablesCleanup(xmlXPathContextPtr ctxt);
|
||||
|
||||
/**
|
||||
* Utilities to extend XPath.
|
||||
*/
|
||||
XMLPUBFUN xmlXPathParserContextPtr XMLCALL
|
||||
XMLPUBFUN xmlXPathParserContextPtr
|
||||
xmlXPathNewParserContext (const xmlChar *str,
|
||||
xmlXPathContextPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlXPathFreeParserContext (xmlXPathParserContextPtr ctxt);
|
||||
|
||||
/* TODO: remap to xmlXPathValuePop and Push. */
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
XMLPUBFUN xmlXPathObjectPtr
|
||||
valuePop (xmlXPathParserContextPtr ctxt);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
valuePush (xmlXPathParserContextPtr ctxt,
|
||||
xmlXPathObjectPtr value);
|
||||
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
XMLPUBFUN xmlXPathObjectPtr
|
||||
xmlXPathNewString (const xmlChar *val);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
XMLPUBFUN xmlXPathObjectPtr
|
||||
xmlXPathNewCString (const char *val);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
XMLPUBFUN xmlXPathObjectPtr
|
||||
xmlXPathWrapString (xmlChar *val);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
XMLPUBFUN xmlXPathObjectPtr
|
||||
xmlXPathWrapCString (char * val);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
XMLPUBFUN xmlXPathObjectPtr
|
||||
xmlXPathNewFloat (double val);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
XMLPUBFUN xmlXPathObjectPtr
|
||||
xmlXPathNewBoolean (int val);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
XMLPUBFUN xmlXPathObjectPtr
|
||||
xmlXPathNewNodeSet (xmlNodePtr val);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
XMLPUBFUN xmlXPathObjectPtr
|
||||
xmlXPathNewValueTree (xmlNodePtr val);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlXPathNodeSetAdd (xmlNodeSetPtr cur,
|
||||
xmlNodePtr val);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlXPathNodeSetAddUnique (xmlNodeSetPtr cur,
|
||||
xmlNodePtr val);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlXPathNodeSetAddNs (xmlNodeSetPtr cur,
|
||||
xmlNodePtr node,
|
||||
xmlNsPtr ns);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlXPathNodeSetSort (xmlNodeSetPtr set);
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlXPathRoot (xmlXPathParserContextPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlXPathEvalExpr (xmlXPathParserContextPtr ctxt);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlXPathParseName (xmlXPathParserContextPtr ctxt);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
XMLPUBFUN xmlChar *
|
||||
xmlXPathParseNCName (xmlXPathParserContextPtr ctxt);
|
||||
|
||||
/*
|
||||
* Existing functions.
|
||||
*/
|
||||
XMLPUBFUN double XMLCALL
|
||||
XMLPUBFUN double
|
||||
xmlXPathStringEvalNumber (const xmlChar *str);
|
||||
XMLPUBFUN int XMLCALL
|
||||
XMLPUBFUN int
|
||||
xmlXPathEvaluatePredicateResult (xmlXPathParserContextPtr ctxt,
|
||||
xmlXPathObjectPtr res);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlXPathRegisterAllFunctions (xmlXPathContextPtr ctxt);
|
||||
XMLPUBFUN xmlNodeSetPtr XMLCALL
|
||||
XMLPUBFUN xmlNodeSetPtr
|
||||
xmlXPathNodeSetMerge (xmlNodeSetPtr val1,
|
||||
xmlNodeSetPtr val2);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlXPathNodeSetDel (xmlNodeSetPtr cur,
|
||||
xmlNodePtr val);
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlXPathNodeSetRemove (xmlNodeSetPtr cur,
|
||||
int val);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
XMLPUBFUN xmlXPathObjectPtr
|
||||
xmlXPathNewNodeSetList (xmlNodeSetPtr val);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
XMLPUBFUN xmlXPathObjectPtr
|
||||
xmlXPathWrapNodeSet (xmlNodeSetPtr val);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
XMLPUBFUN xmlXPathObjectPtr
|
||||
xmlXPathWrapExternal (void *val);
|
||||
|
||||
XMLPUBFUN int XMLCALL xmlXPathEqualValues(xmlXPathParserContextPtr ctxt);
|
||||
XMLPUBFUN int XMLCALL xmlXPathNotEqualValues(xmlXPathParserContextPtr ctxt);
|
||||
XMLPUBFUN int XMLCALL xmlXPathCompareValues(xmlXPathParserContextPtr ctxt, int inf, int strict);
|
||||
XMLPUBFUN void XMLCALL xmlXPathValueFlipSign(xmlXPathParserContextPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL xmlXPathAddValues(xmlXPathParserContextPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL xmlXPathSubValues(xmlXPathParserContextPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL xmlXPathMultValues(xmlXPathParserContextPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL xmlXPathDivValues(xmlXPathParserContextPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL xmlXPathModValues(xmlXPathParserContextPtr ctxt);
|
||||
XMLPUBFUN int xmlXPathEqualValues(xmlXPathParserContextPtr ctxt);
|
||||
XMLPUBFUN int xmlXPathNotEqualValues(xmlXPathParserContextPtr ctxt);
|
||||
XMLPUBFUN int xmlXPathCompareValues(xmlXPathParserContextPtr ctxt, int inf, int strict);
|
||||
XMLPUBFUN void xmlXPathValueFlipSign(xmlXPathParserContextPtr ctxt);
|
||||
XMLPUBFUN void xmlXPathAddValues(xmlXPathParserContextPtr ctxt);
|
||||
XMLPUBFUN void xmlXPathSubValues(xmlXPathParserContextPtr ctxt);
|
||||
XMLPUBFUN void xmlXPathMultValues(xmlXPathParserContextPtr ctxt);
|
||||
XMLPUBFUN void xmlXPathDivValues(xmlXPathParserContextPtr ctxt);
|
||||
XMLPUBFUN void xmlXPathModValues(xmlXPathParserContextPtr ctxt);
|
||||
|
||||
XMLPUBFUN int XMLCALL xmlXPathIsNodeType(const xmlChar *name);
|
||||
XMLPUBFUN int xmlXPathIsNodeType(const xmlChar *name);
|
||||
|
||||
/*
|
||||
* Some of the axis navigation routines.
|
||||
*/
|
||||
XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextSelf(xmlXPathParserContextPtr ctxt,
|
||||
XMLPUBFUN xmlNodePtr xmlXPathNextSelf(xmlXPathParserContextPtr ctxt,
|
||||
xmlNodePtr cur);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextChild(xmlXPathParserContextPtr ctxt,
|
||||
XMLPUBFUN xmlNodePtr xmlXPathNextChild(xmlXPathParserContextPtr ctxt,
|
||||
xmlNodePtr cur);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextDescendant(xmlXPathParserContextPtr ctxt,
|
||||
XMLPUBFUN xmlNodePtr xmlXPathNextDescendant(xmlXPathParserContextPtr ctxt,
|
||||
xmlNodePtr cur);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextDescendantOrSelf(xmlXPathParserContextPtr ctxt,
|
||||
XMLPUBFUN xmlNodePtr xmlXPathNextDescendantOrSelf(xmlXPathParserContextPtr ctxt,
|
||||
xmlNodePtr cur);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextParent(xmlXPathParserContextPtr ctxt,
|
||||
XMLPUBFUN xmlNodePtr xmlXPathNextParent(xmlXPathParserContextPtr ctxt,
|
||||
xmlNodePtr cur);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextAncestorOrSelf(xmlXPathParserContextPtr ctxt,
|
||||
XMLPUBFUN xmlNodePtr xmlXPathNextAncestorOrSelf(xmlXPathParserContextPtr ctxt,
|
||||
xmlNodePtr cur);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextFollowingSibling(xmlXPathParserContextPtr ctxt,
|
||||
XMLPUBFUN xmlNodePtr xmlXPathNextFollowingSibling(xmlXPathParserContextPtr ctxt,
|
||||
xmlNodePtr cur);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextFollowing(xmlXPathParserContextPtr ctxt,
|
||||
XMLPUBFUN xmlNodePtr xmlXPathNextFollowing(xmlXPathParserContextPtr ctxt,
|
||||
xmlNodePtr cur);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextNamespace(xmlXPathParserContextPtr ctxt,
|
||||
XMLPUBFUN xmlNodePtr xmlXPathNextNamespace(xmlXPathParserContextPtr ctxt,
|
||||
xmlNodePtr cur);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextAttribute(xmlXPathParserContextPtr ctxt,
|
||||
XMLPUBFUN xmlNodePtr xmlXPathNextAttribute(xmlXPathParserContextPtr ctxt,
|
||||
xmlNodePtr cur);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextPreceding(xmlXPathParserContextPtr ctxt,
|
||||
XMLPUBFUN xmlNodePtr xmlXPathNextPreceding(xmlXPathParserContextPtr ctxt,
|
||||
xmlNodePtr cur);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextAncestor(xmlXPathParserContextPtr ctxt,
|
||||
XMLPUBFUN xmlNodePtr xmlXPathNextAncestor(xmlXPathParserContextPtr ctxt,
|
||||
xmlNodePtr cur);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextPrecedingSibling(xmlXPathParserContextPtr ctxt,
|
||||
XMLPUBFUN xmlNodePtr xmlXPathNextPrecedingSibling(xmlXPathParserContextPtr ctxt,
|
||||
xmlNodePtr cur);
|
||||
/*
|
||||
* The official core of XPath functions.
|
||||
*/
|
||||
XMLPUBFUN void XMLCALL xmlXPathLastFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void XMLCALL xmlXPathPositionFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void XMLCALL xmlXPathCountFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void XMLCALL xmlXPathIdFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void XMLCALL xmlXPathLocalNameFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void XMLCALL xmlXPathNamespaceURIFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void XMLCALL xmlXPathStringFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void XMLCALL xmlXPathStringLengthFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void XMLCALL xmlXPathConcatFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void XMLCALL xmlXPathContainsFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void XMLCALL xmlXPathStartsWithFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void XMLCALL xmlXPathSubstringFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void XMLCALL xmlXPathSubstringBeforeFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void XMLCALL xmlXPathSubstringAfterFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void XMLCALL xmlXPathNormalizeFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void XMLCALL xmlXPathTranslateFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void XMLCALL xmlXPathNotFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void XMLCALL xmlXPathTrueFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void XMLCALL xmlXPathFalseFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void XMLCALL xmlXPathLangFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void XMLCALL xmlXPathNumberFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void XMLCALL xmlXPathSumFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void XMLCALL xmlXPathFloorFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void XMLCALL xmlXPathCeilingFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void XMLCALL xmlXPathRoundFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void XMLCALL xmlXPathBooleanFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void xmlXPathLastFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void xmlXPathPositionFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void xmlXPathCountFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void xmlXPathIdFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void xmlXPathLocalNameFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void xmlXPathNamespaceURIFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void xmlXPathStringFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void xmlXPathStringLengthFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void xmlXPathConcatFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void xmlXPathContainsFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void xmlXPathStartsWithFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void xmlXPathSubstringFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void xmlXPathSubstringBeforeFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void xmlXPathSubstringAfterFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void xmlXPathNormalizeFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void xmlXPathTranslateFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void xmlXPathNotFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void xmlXPathTrueFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void xmlXPathFalseFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void xmlXPathLangFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void xmlXPathNumberFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void xmlXPathSumFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void xmlXPathFloorFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void xmlXPathCeilingFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void xmlXPathRoundFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void xmlXPathBooleanFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
|
||||
/**
|
||||
* Really internal functions
|
||||
*/
|
||||
XMLPUBFUN void XMLCALL xmlXPathNodeSetFreeNs(xmlNsPtr ns);
|
||||
XMLPUBFUN void xmlXPathNodeSetFreeNs(xmlNsPtr ns);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
Vendored
+26
-25
@@ -28,7 +28,7 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef LIBXML_XPTR_LOCS_ENABLED
|
||||
#if defined(LIBXML_XPTR_LOCS_ENABLED)
|
||||
/*
|
||||
* A Location Set
|
||||
*/
|
||||
@@ -45,90 +45,91 @@ struct _xmlLocationSet {
|
||||
*/
|
||||
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlLocationSetPtr XMLCALL
|
||||
XMLPUBFUN xmlLocationSetPtr
|
||||
xmlXPtrLocationSetCreate (xmlXPathObjectPtr val);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlXPtrFreeLocationSet (xmlLocationSetPtr obj);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlLocationSetPtr XMLCALL
|
||||
XMLPUBFUN xmlLocationSetPtr
|
||||
xmlXPtrLocationSetMerge (xmlLocationSetPtr val1,
|
||||
xmlLocationSetPtr val2);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
XMLPUBFUN xmlXPathObjectPtr
|
||||
xmlXPtrNewRange (xmlNodePtr start,
|
||||
int startindex,
|
||||
xmlNodePtr end,
|
||||
int endindex);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
XMLPUBFUN xmlXPathObjectPtr
|
||||
xmlXPtrNewRangePoints (xmlXPathObjectPtr start,
|
||||
xmlXPathObjectPtr end);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
XMLPUBFUN xmlXPathObjectPtr
|
||||
xmlXPtrNewRangeNodePoint (xmlNodePtr start,
|
||||
xmlXPathObjectPtr end);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
XMLPUBFUN xmlXPathObjectPtr
|
||||
xmlXPtrNewRangePointNode (xmlXPathObjectPtr start,
|
||||
xmlNodePtr end);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
XMLPUBFUN xmlXPathObjectPtr
|
||||
xmlXPtrNewRangeNodes (xmlNodePtr start,
|
||||
xmlNodePtr end);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
XMLPUBFUN xmlXPathObjectPtr
|
||||
xmlXPtrNewLocationSetNodes (xmlNodePtr start,
|
||||
xmlNodePtr end);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
XMLPUBFUN xmlXPathObjectPtr
|
||||
xmlXPtrNewLocationSetNodeSet(xmlNodeSetPtr set);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
XMLPUBFUN xmlXPathObjectPtr
|
||||
xmlXPtrNewRangeNodeObject (xmlNodePtr start,
|
||||
xmlXPathObjectPtr end);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
XMLPUBFUN xmlXPathObjectPtr
|
||||
xmlXPtrNewCollapsedRange (xmlNodePtr start);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlXPtrLocationSetAdd (xmlLocationSetPtr cur,
|
||||
xmlXPathObjectPtr val);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
XMLPUBFUN xmlXPathObjectPtr
|
||||
xmlXPtrWrapLocationSet (xmlLocationSetPtr val);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlXPtrLocationSetDel (xmlLocationSetPtr cur,
|
||||
xmlXPathObjectPtr val);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlXPtrLocationSetRemove (xmlLocationSetPtr cur,
|
||||
int val);
|
||||
#endif /* LIBXML_XPTR_LOCS_ENABLED */
|
||||
#endif /* defined(LIBXML_XPTR_LOCS_ENABLED) */
|
||||
|
||||
/*
|
||||
* Functions.
|
||||
*/
|
||||
XMLPUBFUN xmlXPathContextPtr XMLCALL
|
||||
XMLPUBFUN xmlXPathContextPtr
|
||||
xmlXPtrNewContext (xmlDocPtr doc,
|
||||
xmlNodePtr here,
|
||||
xmlNodePtr origin);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
XMLPUBFUN xmlXPathObjectPtr
|
||||
xmlXPtrEval (const xmlChar *str,
|
||||
xmlXPathContextPtr ctx);
|
||||
#ifdef LIBXML_XPTR_LOCS_ENABLED
|
||||
|
||||
#if defined(LIBXML_XPTR_LOCS_ENABLED)
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlXPtrRangeToFunction (xmlXPathParserContextPtr ctxt,
|
||||
int nargs);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
XMLPUBFUN xmlNodePtr
|
||||
xmlXPtrBuildNodeList (xmlXPathObjectPtr obj);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN void XMLCALL
|
||||
XMLPUBFUN void
|
||||
xmlXPtrEvalRangePredicate (xmlXPathParserContextPtr ctxt);
|
||||
#endif /* LIBXML_XPTR_LOCS_ENABLED */
|
||||
#endif /* defined(LIBXML_XPTR_LOCS_ENABLED) */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
+67
@@ -0,0 +1,67 @@
|
||||
#ifndef XML_BUF_H_PRIVATE__
|
||||
#define XML_BUF_H_PRIVATE__
|
||||
|
||||
#include <libxml/tree.h>
|
||||
|
||||
XML_HIDDEN xmlBufPtr
|
||||
xmlBufCreate(void);
|
||||
XML_HIDDEN xmlBufPtr
|
||||
xmlBufCreateSize(size_t size);
|
||||
|
||||
XML_HIDDEN int
|
||||
xmlBufSetAllocationScheme(xmlBufPtr buf, xmlBufferAllocationScheme scheme);
|
||||
XML_HIDDEN int
|
||||
xmlBufGetAllocationScheme(xmlBufPtr buf);
|
||||
|
||||
XML_HIDDEN void
|
||||
xmlBufFree(xmlBufPtr buf);
|
||||
XML_HIDDEN void
|
||||
xmlBufEmpty(xmlBufPtr buf);
|
||||
|
||||
/* size_t xmlBufShrink(xmlBufPtr buf, size_t len); */
|
||||
XML_HIDDEN int
|
||||
xmlBufGrow(xmlBufPtr buf, int len);
|
||||
XML_HIDDEN int
|
||||
xmlBufResize(xmlBufPtr buf, size_t len);
|
||||
|
||||
XML_HIDDEN int
|
||||
xmlBufAdd(xmlBufPtr buf, const xmlChar *str, int len);
|
||||
XML_HIDDEN int
|
||||
xmlBufCat(xmlBufPtr buf, const xmlChar *str);
|
||||
XML_HIDDEN int
|
||||
xmlBufCCat(xmlBufPtr buf, const char *str);
|
||||
XML_HIDDEN int
|
||||
xmlBufWriteQuotedString(xmlBufPtr buf, const xmlChar *string);
|
||||
|
||||
XML_HIDDEN size_t
|
||||
xmlBufAvail(const xmlBufPtr buf);
|
||||
XML_HIDDEN size_t
|
||||
xmlBufLength(const xmlBufPtr buf);
|
||||
/* size_t xmlBufUse(const xmlBufPtr buf); */
|
||||
XML_HIDDEN int
|
||||
xmlBufIsEmpty(const xmlBufPtr buf);
|
||||
XML_HIDDEN int
|
||||
xmlBufAddLen(xmlBufPtr buf, size_t len);
|
||||
|
||||
/* const xmlChar * xmlBufContent(const xmlBuf *buf); */
|
||||
/* const xmlChar * xmlBufEnd(xmlBufPtr buf); */
|
||||
|
||||
XML_HIDDEN xmlChar *
|
||||
xmlBufDetach(xmlBufPtr buf);
|
||||
|
||||
XML_HIDDEN size_t
|
||||
xmlBufDump(FILE *file, xmlBufPtr buf);
|
||||
|
||||
XML_HIDDEN xmlBufPtr
|
||||
xmlBufFromBuffer(xmlBufferPtr buffer);
|
||||
XML_HIDDEN xmlBufferPtr
|
||||
xmlBufBackToBuffer(xmlBufPtr buf);
|
||||
XML_HIDDEN int
|
||||
xmlBufMergeBuffer(xmlBufPtr buf, xmlBufferPtr buffer);
|
||||
|
||||
XML_HIDDEN int
|
||||
xmlBufResetInput(xmlBufPtr buf, xmlParserInputPtr input);
|
||||
XML_HIDDEN int
|
||||
xmlBufUpdateInput(xmlBufPtr buf, xmlParserInputPtr input, size_t pos);
|
||||
|
||||
#endif /* XML_BUF_H_PRIVATE__ */
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
#ifndef XML_DICT_H_PRIVATE__
|
||||
#define XML_DICT_H_PRIVATE__
|
||||
|
||||
#include <libxml/dict.h>
|
||||
|
||||
/*
|
||||
* Values are ANDed with 0xFFFFFFFF to support platforms where
|
||||
* unsigned is larger than 32 bits. With 32-bit unsigned values,
|
||||
* modern compilers should optimize the operation away.
|
||||
*/
|
||||
|
||||
#define HASH_ROL(x,n) ((x) << (n) | ((x) & 0xFFFFFFFF) >> (32 - (n)))
|
||||
#define HASH_ROR(x,n) (((x) & 0xFFFFFFFF) >> (n) | (x) << (32 - (n)))
|
||||
|
||||
/*
|
||||
* GoodOAAT: One of a smallest non-multiplicative One-At-a-Time functions
|
||||
* that passes SMHasher.
|
||||
*
|
||||
* Author: Sokolov Yura aka funny-falcon
|
||||
*/
|
||||
|
||||
#define HASH_INIT(h1, h2, seed) \
|
||||
do { \
|
||||
h1 = seed ^ 0x3b00; \
|
||||
h2 = HASH_ROL(seed, 15); \
|
||||
} while (0)
|
||||
|
||||
#define HASH_UPDATE(h1, h2, ch) \
|
||||
do { \
|
||||
h1 += ch; \
|
||||
h1 += h1 << 3; \
|
||||
h2 += h1; \
|
||||
h2 = HASH_ROL(h2, 7); \
|
||||
h2 += h2 << 2; \
|
||||
} while (0)
|
||||
|
||||
/* Result is in h2 */
|
||||
#define HASH_FINISH(h1, h2) \
|
||||
do { \
|
||||
h1 ^= h2; \
|
||||
h1 += HASH_ROL(h2, 14); \
|
||||
h2 ^= h1; h2 += HASH_ROR(h1, 6); \
|
||||
h1 ^= h2; h1 += HASH_ROL(h2, 5); \
|
||||
h2 ^= h1; h2 += HASH_ROR(h1, 8); \
|
||||
h2 &= 0xFFFFFFFF; \
|
||||
} while (0)
|
||||
|
||||
typedef struct {
|
||||
unsigned hashValue;
|
||||
const xmlChar *name;
|
||||
} xmlHashedString;
|
||||
|
||||
XML_HIDDEN void
|
||||
xmlInitDictInternal(void);
|
||||
XML_HIDDEN void
|
||||
xmlCleanupDictInternal(void);
|
||||
|
||||
XML_HIDDEN unsigned
|
||||
xmlDictComputeHash(const xmlDict *dict, const xmlChar *string);
|
||||
XML_HIDDEN unsigned
|
||||
xmlDictCombineHash(unsigned v1, unsigned v2);
|
||||
XML_HIDDEN xmlHashedString
|
||||
xmlDictLookupHashed(xmlDictPtr dict, const xmlChar *name, int len);
|
||||
|
||||
XML_HIDDEN void
|
||||
xmlInitRandom(void);
|
||||
XML_HIDDEN void
|
||||
xmlCleanupRandom(void);
|
||||
XML_HIDDEN unsigned
|
||||
xmlRandom(void);
|
||||
|
||||
#endif /* XML_DICT_H_PRIVATE__ */
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
#ifndef XML_ENC_H_PRIVATE__
|
||||
#define XML_ENC_H_PRIVATE__
|
||||
|
||||
#include <libxml/encoding.h>
|
||||
#include <libxml/tree.h>
|
||||
|
||||
XML_HIDDEN void
|
||||
xmlInitEncodingInternal(void);
|
||||
|
||||
XML_HIDDEN int
|
||||
xmlEncInputChunk(xmlCharEncodingHandler *handler, unsigned char *out,
|
||||
int *outlen, const unsigned char *in, int *inlen);
|
||||
XML_HIDDEN int
|
||||
xmlCharEncInput(xmlParserInputBufferPtr input);
|
||||
XML_HIDDEN int
|
||||
xmlCharEncOutput(xmlOutputBufferPtr output, int init);
|
||||
|
||||
#endif /* XML_ENC_H_PRIVATE__ */
|
||||
@@ -0,0 +1,23 @@
|
||||
#ifndef XML_ENTITIES_H_PRIVATE__
|
||||
#define XML_ENTITIES_H_PRIVATE__
|
||||
|
||||
#include <libxml/tree.h>
|
||||
#include <libxml/xmlstring.h>
|
||||
|
||||
/*
|
||||
* Entity flags
|
||||
*
|
||||
* XML_ENT_PARSED: The entity was parsed and `children` points to the
|
||||
* content.
|
||||
* XML_ENT_CHECKED: The entity was checked for loops.
|
||||
*/
|
||||
#define XML_ENT_PARSED (1<<0)
|
||||
#define XML_ENT_CHECKED (1<<1)
|
||||
#define XML_ENT_EXPANDING (1<<2)
|
||||
#define XML_ENT_CHECKED_LT (1<<3)
|
||||
#define XML_ENT_CONTAINS_LT (1<<4)
|
||||
|
||||
XML_HIDDEN xmlChar *
|
||||
xmlEncodeAttributeEntities(xmlDocPtr doc, const xmlChar *input);
|
||||
|
||||
#endif /* XML_ENTITIES_H_PRIVATE__ */
|
||||
@@ -0,0 +1,23 @@
|
||||
#ifndef XML_ERROR_H_PRIVATE__
|
||||
#define XML_ERROR_H_PRIVATE__
|
||||
|
||||
#include <libxml/xmlerror.h>
|
||||
#include <libxml/xmlversion.h>
|
||||
|
||||
struct _xmlNode;
|
||||
|
||||
XML_HIDDEN void
|
||||
__xmlRaiseError(xmlStructuredErrorFunc schannel,
|
||||
xmlGenericErrorFunc channel, void *data, void *ctx,
|
||||
void *nod, int domain, int code, xmlErrorLevel level,
|
||||
const char *file, int line, const char *str1,
|
||||
const char *str2, const char *str3, int int1, int col,
|
||||
const char *msg, ...) LIBXML_ATTR_FORMAT(16,17);
|
||||
XML_HIDDEN void
|
||||
__xmlSimpleError(int domain, int code, struct _xmlNode *node,
|
||||
const char *msg, const char *extra) LIBXML_ATTR_FORMAT(4,0);
|
||||
XML_HIDDEN void
|
||||
xmlGenericErrorDefaultFunc(void *ctx, const char *msg,
|
||||
...) LIBXML_ATTR_FORMAT(2,3);
|
||||
|
||||
#endif /* XML_ERROR_H_PRIVATE__ */
|
||||
@@ -0,0 +1,9 @@
|
||||
#ifndef XML_GLOBALS_H_PRIVATE__
|
||||
#define XML_GLOBALS_H_PRIVATE__
|
||||
|
||||
XML_HIDDEN void
|
||||
xmlInitGlobalsInternal(void);
|
||||
XML_HIDDEN void
|
||||
xmlCleanupGlobalsInternal(void);
|
||||
|
||||
#endif /* XML_GLOBALS_H_PRIVATE__ */
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
#ifndef XML_HTML_H_PRIVATE__
|
||||
#define XML_HTML_H_PRIVATE__
|
||||
|
||||
#include <libxml/xmlversion.h>
|
||||
|
||||
#ifdef LIBXML_HTML_ENABLED
|
||||
|
||||
XML_HIDDEN void
|
||||
__htmlParseContent(void *ctx);
|
||||
|
||||
#endif /* LIBXML_HTML_ENABLED */
|
||||
|
||||
#endif /* XML_HTML_H_PRIVATE__ */
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
#ifndef XML_IO_H_PRIVATE__
|
||||
#define XML_IO_H_PRIVATE__
|
||||
|
||||
#include <libxml/encoding.h>
|
||||
#include <libxml/tree.h>
|
||||
#include <libxml/xmlversion.h>
|
||||
|
||||
XML_HIDDEN void
|
||||
__xmlIOErr(int domain, int code, const char *extra);
|
||||
XML_HIDDEN void
|
||||
__xmlLoaderErr(void *ctx, const char *msg,
|
||||
const char *filename) LIBXML_ATTR_FORMAT(2,0);
|
||||
|
||||
xmlParserInputBufferPtr
|
||||
xmlParserInputBufferCreateString(const xmlChar *str);
|
||||
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
XML_HIDDEN xmlOutputBufferPtr
|
||||
xmlAllocOutputBufferInternal(xmlCharEncodingHandlerPtr encoder);
|
||||
#endif
|
||||
|
||||
#endif /* XML_IO_H_PRIVATE__ */
|
||||
@@ -0,0 +1,9 @@
|
||||
#ifndef XML_MEMORY_H_PRIVATE__
|
||||
#define XML_MEMORY_H_PRIVATE__
|
||||
|
||||
XML_HIDDEN void
|
||||
xmlInitMemoryInternal(void);
|
||||
XML_HIDDEN void
|
||||
xmlCleanupMemoryInternal(void);
|
||||
|
||||
#endif /* XML_MEMORY_H_PRIVATE__ */
|
||||
@@ -0,0 +1,68 @@
|
||||
#ifndef XML_PARSER_H_PRIVATE__
|
||||
#define XML_PARSER_H_PRIVATE__
|
||||
|
||||
#include <libxml/parser.h>
|
||||
#include <libxml/xmlversion.h>
|
||||
|
||||
/**
|
||||
* XML_VCTXT_DTD_VALIDATED:
|
||||
*
|
||||
* Set after xmlValidateDtdFinal was called.
|
||||
*/
|
||||
#define XML_VCTXT_DTD_VALIDATED (1u << 0)
|
||||
/**
|
||||
* XML_VCTXT_USE_PCTXT:
|
||||
*
|
||||
* Set if the validation context is part of a parser context.
|
||||
*/
|
||||
#define XML_VCTXT_USE_PCTXT (1u << 1)
|
||||
|
||||
#define XML_INPUT_HAS_ENCODING (1u << 0)
|
||||
#define XML_INPUT_AUTO_ENCODING (7u << 1)
|
||||
#define XML_INPUT_AUTO_UTF8 (1u << 1)
|
||||
#define XML_INPUT_AUTO_UTF16LE (2u << 1)
|
||||
#define XML_INPUT_AUTO_UTF16BE (3u << 1)
|
||||
#define XML_INPUT_AUTO_OTHER (4u << 1)
|
||||
#define XML_INPUT_USES_ENC_DECL (1u << 4)
|
||||
#define XML_INPUT_ENCODING_ERROR (1u << 5)
|
||||
|
||||
XML_HIDDEN void
|
||||
xmlErrMemory(xmlParserCtxtPtr ctxt, const char *extra);
|
||||
XML_HIDDEN void
|
||||
xmlFatalErr(xmlParserCtxtPtr ctxt, xmlParserErrors error, const char *info);
|
||||
XML_HIDDEN void LIBXML_ATTR_FORMAT(3,0)
|
||||
xmlWarningMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error,
|
||||
const char *msg, const xmlChar *str1, const xmlChar *str2);
|
||||
XML_HIDDEN void
|
||||
__xmlErrEncoding(xmlParserCtxtPtr ctxt, xmlParserErrors xmlerr,
|
||||
const char *msg, const xmlChar *str1,
|
||||
const xmlChar *str2) LIBXML_ATTR_FORMAT(3,0);
|
||||
XML_HIDDEN void
|
||||
xmlHaltParser(xmlParserCtxtPtr ctxt);
|
||||
XML_HIDDEN int
|
||||
xmlParserGrow(xmlParserCtxtPtr ctxt);
|
||||
XML_HIDDEN void
|
||||
xmlParserShrink(xmlParserCtxtPtr ctxt);
|
||||
|
||||
XML_HIDDEN void
|
||||
xmlDetectEncoding(xmlParserCtxtPtr ctxt);
|
||||
XML_HIDDEN void
|
||||
xmlSetDeclaredEncoding(xmlParserCtxtPtr ctxt, xmlChar *encoding);
|
||||
XML_HIDDEN const xmlChar *
|
||||
xmlGetActualEncoding(xmlParserCtxtPtr ctxt);
|
||||
|
||||
XML_HIDDEN xmlParserNsData *
|
||||
xmlParserNsCreate(void);
|
||||
XML_HIDDEN void
|
||||
xmlParserNsFree(xmlParserNsData *nsdb);
|
||||
/*
|
||||
* These functions allow SAX handlers to attach extra data to namespaces
|
||||
* efficiently and should be made public.
|
||||
*/
|
||||
XML_HIDDEN int
|
||||
xmlParserNsUpdateSax(xmlParserCtxtPtr ctxt, const xmlChar *prefix,
|
||||
void *saxData);
|
||||
XML_HIDDEN void *
|
||||
xmlParserNsLookupSax(xmlParserCtxtPtr ctxt, const xmlChar *prefix);
|
||||
|
||||
#endif /* XML_PARSER_H_PRIVATE__ */
|
||||
@@ -0,0 +1,9 @@
|
||||
#ifndef XML_REGEXP_H_PRIVATE__
|
||||
#define XML_REGEXP_H_PRIVATE__
|
||||
|
||||
#include <libxml/xmlautomata.h>
|
||||
|
||||
XML_HIDDEN void
|
||||
xmlAutomataSetFlags(xmlAutomataPtr am, int flags);
|
||||
|
||||
#endif /* XML_REGEXP_H_PRIVATE__ */
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
#ifndef XML_SAVE_H_PRIVATE__
|
||||
#define XML_SAVE_H_PRIVATE__
|
||||
|
||||
#include <libxml/tree.h>
|
||||
#include <libxml/xmlversion.h>
|
||||
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
|
||||
XML_HIDDEN void
|
||||
xmlBufAttrSerializeTxtContent(xmlBufPtr buf, xmlDocPtr doc,
|
||||
xmlAttrPtr attr, const xmlChar * string);
|
||||
XML_HIDDEN void
|
||||
xmlNsListDumpOutput(xmlOutputBufferPtr buf, xmlNsPtr cur);
|
||||
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
|
||||
#endif /* XML_SAVE_H_PRIVATE__ */
|
||||
@@ -0,0 +1,9 @@
|
||||
#ifndef XML_STRING_H_PRIVATE__
|
||||
#define XML_STRING_H_PRIVATE__
|
||||
|
||||
#include <libxml/xmlstring.h>
|
||||
|
||||
XML_HIDDEN xmlChar *
|
||||
xmlEscapeFormatString(xmlChar **msg);
|
||||
|
||||
#endif /* XML_STRING_H_PRIVATE__ */
|
||||
@@ -0,0 +1,35 @@
|
||||
#ifndef XML_THREADS_H_PRIVATE__
|
||||
#define XML_THREADS_H_PRIVATE__
|
||||
|
||||
#include <libxml/threads.h>
|
||||
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
#ifdef HAVE_PTHREAD_H
|
||||
#include <pthread.h>
|
||||
#define HAVE_POSIX_THREADS
|
||||
#elif defined(_WIN32)
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
#define HAVE_WIN32_THREADS
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* xmlMutex are a simple mutual exception locks
|
||||
*/
|
||||
struct _xmlMutex {
|
||||
#ifdef HAVE_POSIX_THREADS
|
||||
pthread_mutex_t lock;
|
||||
#elif defined HAVE_WIN32_THREADS
|
||||
CRITICAL_SECTION cs;
|
||||
#else
|
||||
int empty;
|
||||
#endif
|
||||
};
|
||||
|
||||
XML_HIDDEN void
|
||||
xmlInitMutex(xmlMutexPtr mutex);
|
||||
XML_HIDDEN void
|
||||
xmlCleanupMutex(xmlMutexPtr mutex);
|
||||
|
||||
#endif /* XML_THREADS_H_PRIVATE__ */
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
#ifndef XML_TREE_H_PRIVATE__
|
||||
#define XML_TREE_H_PRIVATE__
|
||||
|
||||
/*
|
||||
* Internal variable indicating if a callback has been registered for
|
||||
* node creation/destruction. It avoids spending a lot of time in locking
|
||||
* function while checking if the callback exists.
|
||||
*/
|
||||
XML_HIDDEN extern int
|
||||
__xmlRegisterCallbacks;
|
||||
|
||||
XML_HIDDEN xmlNodePtr
|
||||
xmlStaticCopyNode(xmlNodePtr node, xmlDocPtr doc, xmlNodePtr parent,
|
||||
int extended);
|
||||
XML_HIDDEN xmlNodePtr
|
||||
xmlStaticCopyNodeList(xmlNodePtr node, xmlDocPtr doc, xmlNodePtr parent);
|
||||
|
||||
#endif /* XML_TREE_H_PRIVATE__ */
|
||||
@@ -0,0 +1,9 @@
|
||||
#ifndef XML_INCLUDE_H_PRIVATE__
|
||||
#define XML_INCLUDE_H_PRIVATE__
|
||||
|
||||
#include <libxml/xinclude.h>
|
||||
|
||||
XML_HIDDEN int
|
||||
xmlXIncludeSetStreamingMode(xmlXIncludeCtxtPtr ctxt, int mode);
|
||||
|
||||
#endif /* XML_INCLUDE_H_PRIVATE__ */
|
||||
@@ -0,0 +1,7 @@
|
||||
#ifndef XML_XPATH_H_PRIVATE__
|
||||
#define XML_XPATH_H_PRIVATE__
|
||||
|
||||
XML_HIDDEN void
|
||||
xmlInitXPathInternal(void);
|
||||
|
||||
#endif /* XML_XPATH_H_PRIVATE__ */
|
||||
+10
-10
@@ -1,24 +1,24 @@
|
||||
#ifndef __LIBXML_WIN32_CONFIG__
|
||||
#define __LIBXML_WIN32_CONFIG__
|
||||
|
||||
#define SEND_ARG2_CAST
|
||||
#define GETHOSTBYNAME_ARG_CAST
|
||||
|
||||
#define HAVE_SYS_STAT_H
|
||||
#define HAVE_STAT
|
||||
#define HAVE_FCNTL_H
|
||||
|
||||
#include <io.h>
|
||||
#include <direct.h>
|
||||
|
||||
#if defined(__MINGW32__) || (defined(_MSC_VER) && _MSC_VER >= 1600)
|
||||
#define HAVE_STDINT_H
|
||||
#define HAVE_STDINT_H
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#if _MSC_VER < 1900
|
||||
#define snprintf _snprintf
|
||||
#endif
|
||||
#if _MSC_VER < 1500
|
||||
#define vsnprintf(b,c,f,a) _vsnprintf(b,c,f,a)
|
||||
#endif
|
||||
#if _MSC_VER < 1900
|
||||
#define snprintf _snprintf
|
||||
#endif
|
||||
#if _MSC_VER < 1500
|
||||
#define vsnprintf(b,c,f,a) _vsnprintf(b,c,f,a)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* __LIBXML_WIN32_CONFIG__ */
|
||||
|
||||
-50
@@ -1,50 +0,0 @@
|
||||
/* include/wsockcompat.h
|
||||
* Windows -> Berkeley Sockets compatibility things.
|
||||
*/
|
||||
|
||||
#if !defined __XML_WSOCKCOMPAT_H__
|
||||
#define __XML_WSOCKCOMPAT_H__
|
||||
|
||||
#include <errno.h>
|
||||
#include <winsock2.h>
|
||||
|
||||
/* Fix for old MinGW. */
|
||||
#ifndef _WINSOCKAPI_
|
||||
#define _WINSOCKAPI_
|
||||
#endif
|
||||
|
||||
/* the following is a workaround a problem for 'inline' keyword in said
|
||||
header when compiled with Borland C++ 6 */
|
||||
#if defined(__BORLANDC__) && !defined(__cplusplus)
|
||||
#define inline __inline
|
||||
#define _inline __inline
|
||||
#endif
|
||||
|
||||
#include <ws2tcpip.h>
|
||||
|
||||
/* Check if ws2tcpip.h is a recent version which provides getaddrinfo() */
|
||||
#if defined(GetAddrInfo)
|
||||
#include <wspiapi.h>
|
||||
#define HAVE_GETADDRINFO
|
||||
#endif
|
||||
|
||||
#undef XML_SOCKLEN_T
|
||||
#define XML_SOCKLEN_T int
|
||||
|
||||
#ifndef ECONNRESET
|
||||
#define ECONNRESET WSAECONNRESET
|
||||
#endif
|
||||
#ifndef EINPROGRESS
|
||||
#define EINPROGRESS WSAEINPROGRESS
|
||||
#endif
|
||||
#ifndef EINTR
|
||||
#define EINTR WSAEINTR
|
||||
#endif
|
||||
#ifndef ESHUTDOWN
|
||||
#define ESHUTDOWN WSAESHUTDOWN
|
||||
#endif
|
||||
#ifndef EWOULDBLOCK
|
||||
#define EWOULDBLOCK WSAEWOULDBLOCK
|
||||
#endif
|
||||
|
||||
#endif /* __XML_WSOCKCOMPAT_H__ */
|
||||
Vendored
-1342
File diff suppressed because it is too large
Load Diff
Vendored
+31
-77
@@ -14,103 +14,57 @@
|
||||
* Do not add any #include directives above this block.
|
||||
*/
|
||||
#ifndef NO_LARGEFILE_SOURCE
|
||||
#ifndef _LARGEFILE_SOURCE
|
||||
#define _LARGEFILE_SOURCE
|
||||
#endif
|
||||
#ifndef _FILE_OFFSET_BITS
|
||||
#define _FILE_OFFSET_BITS 64
|
||||
#endif
|
||||
#ifndef _LARGEFILE_SOURCE
|
||||
#define _LARGEFILE_SOURCE
|
||||
#endif
|
||||
#ifndef _FILE_OFFSET_BITS
|
||||
#define _FILE_OFFSET_BITS 64
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Currently supported platforms use either autoconf or
|
||||
* copy to config.h own "preset" configuration file.
|
||||
* As result ifdef HAVE_CONFIG_H is omitted here.
|
||||
* These files are generated by the build system and contain private
|
||||
* and public build configuration.
|
||||
*/
|
||||
#include "config.h"
|
||||
#include "win32config.h"
|
||||
#include <libxml/xmlversion.h>
|
||||
#include <libxml/xmlstring.h>
|
||||
|
||||
/*
|
||||
* Due to some Autotools limitations, this variable must be passed as
|
||||
* compiler flag. Define a default value if the macro wasn't set by the
|
||||
* build system.
|
||||
*/
|
||||
#ifndef SYSCONFDIR
|
||||
#define SYSCONFDIR "/etc"
|
||||
#endif
|
||||
|
||||
#if defined(__Lynx__)
|
||||
#include <stdio.h> /* pull definition of size_t */
|
||||
#include <varargs.h>
|
||||
int snprintf(char *, size_t, const char *, ...);
|
||||
int vfprintf(FILE *, const char *, va_list);
|
||||
#ifdef WITH_TRIO
|
||||
#define TRIO_REPLACE_STDIO
|
||||
#include "trio.h"
|
||||
#endif
|
||||
|
||||
#ifndef WITH_TRIO
|
||||
#include <stdio.h>
|
||||
#if !defined(_WIN32) && \
|
||||
!defined(__CYGWIN__) && \
|
||||
(defined(__clang__) || \
|
||||
(defined(__GNUC__) && (__GNUC__ >= 4)))
|
||||
#define XML_HIDDEN __attribute__((visibility("hidden")))
|
||||
#else
|
||||
/**
|
||||
* TRIO_REPLACE_STDIO:
|
||||
*
|
||||
* This macro is defined if the trio string formatting functions are to
|
||||
* be used instead of the default stdio ones.
|
||||
*/
|
||||
#define TRIO_REPLACE_STDIO
|
||||
#include "trio.h"
|
||||
#endif
|
||||
|
||||
#if defined(__clang__) || \
|
||||
(defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 406))
|
||||
#define XML_IGNORE_PEDANTIC_WARNINGS \
|
||||
_Pragma("GCC diagnostic push") \
|
||||
_Pragma("GCC diagnostic ignored \"-Wpedantic\"")
|
||||
#define XML_POP_WARNINGS \
|
||||
_Pragma("GCC diagnostic pop")
|
||||
#else
|
||||
#define XML_IGNORE_PEDANTIC_WARNINGS
|
||||
#define XML_POP_WARNINGS
|
||||
#define XML_HIDDEN
|
||||
#endif
|
||||
|
||||
#if defined(__clang__) || \
|
||||
(defined(__GNUC__) && (__GNUC__ >= 8))
|
||||
#define ATTRIBUTE_NO_SANITIZE(arg) __attribute__((no_sanitize(arg)))
|
||||
#define ATTRIBUTE_NO_SANITIZE(arg) __attribute__((no_sanitize(arg)))
|
||||
#else
|
||||
#define ATTRIBUTE_NO_SANITIZE(arg)
|
||||
#define ATTRIBUTE_NO_SANITIZE(arg)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Internal variable indicating if a callback has been registered for
|
||||
* node creation/destruction. It avoids spending a lot of time in locking
|
||||
* function while checking if the callback exists.
|
||||
*/
|
||||
extern int __xmlRegisterCallbacks;
|
||||
/*
|
||||
* internal error reporting routines, shared but not part of the API.
|
||||
*/
|
||||
void __xmlIOErr(int domain, int code, const char *extra);
|
||||
void __xmlLoaderErr(void *ctx, const char *msg, const char *filename) LIBXML_ATTR_FORMAT(2,0);
|
||||
#ifdef LIBXML_HTML_ENABLED
|
||||
/*
|
||||
* internal function of HTML parser needed for xmlParseInNodeContext
|
||||
* but not part of the API
|
||||
*/
|
||||
void __htmlParseContent(void *ctx);
|
||||
#ifdef __clang__
|
||||
#define ATTRIBUTE_NO_SANITIZE_INTEGER \
|
||||
ATTRIBUTE_NO_SANITIZE("unsigned-integer-overflow") \
|
||||
ATTRIBUTE_NO_SANITIZE("unsigned-shift-base")
|
||||
#else
|
||||
#define ATTRIBUTE_NO_SANITIZE_INTEGER
|
||||
#endif
|
||||
|
||||
/*
|
||||
* internal global initialization critical section routines.
|
||||
*/
|
||||
void __xmlGlobalInitMutexLock(void);
|
||||
void __xmlGlobalInitMutexUnlock(void);
|
||||
void __xmlGlobalInitMutexDestroy(void);
|
||||
|
||||
int __xmlInitializeDict(void);
|
||||
|
||||
/*
|
||||
* internal thread safe random function
|
||||
*/
|
||||
int __xmlRandom(void);
|
||||
|
||||
XMLPUBFUN xmlChar * XMLCALL xmlEscapeFormatString(xmlChar **msg);
|
||||
int xmlInputReadCallbackNop(void *context, char *buffer, int len);
|
||||
|
||||
#if !defined(PIC) && !defined(NOLIBTOOL) && !defined(LIBXML_STATIC)
|
||||
# define LIBXML_STATIC
|
||||
#endif
|
||||
#endif /* ! __XML_LIBXML_H__ */
|
||||
|
||||
Vendored
+1
-1
@@ -21,8 +21,8 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <libxml/xmlmemory.h>
|
||||
#include <libxml/xmlerror.h>
|
||||
#include <libxml/list.h>
|
||||
#include <libxml/globals.h>
|
||||
|
||||
/*
|
||||
* Type definition are kept internal
|
||||
|
||||
Vendored
-2108
File diff suppressed because it is too large
Load Diff
Vendored
-1890
File diff suppressed because it is too large
Load Diff
Vendored
+3022
-3420
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user