diff options
Diffstat (limited to 'plugins/Variables/src')
36 files changed, 42 insertions, 7700 deletions
diff --git a/plugins/Variables/src/enumprocs.cpp b/plugins/Variables/src/enumprocs.cpp index 6650b685b5..dc8fabdec4 100644 --- a/plugins/Variables/src/enumprocs.cpp +++ b/plugins/Variables/src/enumprocs.cpp @@ -24,16 +24,12 @@ #include "variables.h"
typedef struct {
- DWORD dwPID;
- PROCENUMPROC lpProc;
- DWORD lParam;
- BOOL bEnd;
+ DWORD dwPID;
+ PROCENUMPROC lpProc;
+ DWORD lParam;
+ BOOL bEnd;
} EnumInfoStruct;
-BOOL WINAPI Enum16(DWORD dwThreadId, WORD hMod16, WORD hTask16,
- PSZ pszModName, PSZ pszFileName, LPARAM lpUserDefined);
-
-//
// The EnumProcs function takes a pointer to a callback function
// that will be called once per process with the process filename
// and process ID.
@@ -45,301 +41,42 @@ BOOL WINAPI Enum16(DWORD dwThreadId, WORD hMod16, WORD hTask16, //
// Callback function definition:
// BOOL CALLBACK Proc(DWORD dw, WORD w, LPCSTR lpstr, LPARAM lParam);
-//
-BOOL WINAPI EnumProcs(PROCENUMPROC lpProc, LPARAM lParam) {
-
- OSVERSIONINFO osver;
- HINSTANCE hInstLib = NULL;
- HINSTANCE hInstLib2 = NULL;
- HANDLE hSnapShot = NULL;
- LPDWORD lpdwPIDs = NULL;
- PROCESSENTRY32 procentry;
- BOOL bFlag;
- DWORD dwSize;
- DWORD dwSize2;
- DWORD dwIndex;
- HMODULE hMod;
- HANDLE hProcess;
- char szFileName[MAX_PATH];
- EnumInfoStruct sInfo;
-
- // ToolHelp Function Pointers.
- HANDLE (WINAPI *lpfCreateToolhelp32Snapshot)(DWORD, DWORD);
- BOOL (WINAPI *lpfProcess32First)(HANDLE, LPPROCESSENTRY32);
- BOOL (WINAPI *lpfProcess32Next)(HANDLE, LPPROCESSENTRY32);
-
- // PSAPI Function Pointers.
- BOOL (WINAPI *lpfEnumProcesses)(DWORD *, DWORD, DWORD *);
- BOOL (WINAPI *lpfEnumProcessModules)(HANDLE, HMODULE *, DWORD,
- LPDWORD);
- DWORD (WINAPI *lpfGetModuleBaseName)(HANDLE, HMODULE, LPTSTR, DWORD);
-
- // VDMDBG Function Pointers.
- INT (WINAPI *lpfVDMEnumTaskWOWEx)(DWORD, TASKENUMPROCEX, LPARAM);
-
- // Retrieve the OS version
- osver.dwOSVersionInfoSize = sizeof(osver);
- if (!GetVersionEx(&osver))
- return FALSE;
-
- // If Windows NT 4.0
- if (osver.dwPlatformId == VER_PLATFORM_WIN32_NT
- && osver.dwMajorVersion == 4) {
-
- __try {
-
- // Get the procedure addresses explicitly. We do
- // this so we don't have to worry about modules
- // failing to load under OSes other than Windows NT 4.0
- // because references to PSAPI.DLL can't be resolved.
- hInstLib = LoadLibraryA("PSAPI.DLL");
- if (hInstLib == NULL)
- __leave;
-
- hInstLib2 = LoadLibraryA("VDMDBG.DLL");
- if (hInstLib2 == NULL)
- __leave;
-
- // Get procedure addresses.
- lpfEnumProcesses = (BOOL (WINAPI *)(DWORD *, DWORD, DWORD*))
- GetProcAddress(hInstLib, "EnumProcesses");
-
- lpfEnumProcessModules = (BOOL (WINAPI *)(HANDLE, HMODULE *,
- DWORD, LPDWORD)) GetProcAddress(hInstLib,
- "EnumProcessModules");
-
- lpfGetModuleBaseName = (DWORD (WINAPI *)(HANDLE, HMODULE,
- LPTSTR, DWORD)) GetProcAddress(hInstLib,
- "GetModuleBaseNameA");
-
- lpfVDMEnumTaskWOWEx = (INT (WINAPI *)(DWORD, TASKENUMPROCEX,
- LPARAM)) GetProcAddress(hInstLib2, "VDMEnumTaskWOWEx");
-
- if (lpfEnumProcesses == NULL
- || lpfEnumProcessModules == NULL
- || lpfGetModuleBaseName == NULL
- || lpfVDMEnumTaskWOWEx == NULL)
- __leave;
-
- //
- // Call the PSAPI function EnumProcesses to get all of the
- // ProcID's currently in the system.
- //
- // NOTE: In the documentation, the third parameter of
- // EnumProcesses is named cbNeeded, which implies that you
- // can call the function once to find out how much space to
- // allocate for a buffer and again to fill the buffer.
- // This is not the case. The cbNeeded parameter returns
- // the number of PIDs returned, so if your buffer size is
- // zero cbNeeded returns zero.
- //
- // NOTE: The "HeapAlloc" loop here ensures that we
- // actually allocate a buffer large enough for all the
- // PIDs in the system.
- //
- dwSize2 = 256 * sizeof(DWORD);
- do {
-
- if (lpdwPIDs) {
- HeapFree(GetProcessHeap(), 0, lpdwPIDs);
- dwSize2 *= 2;
- }
-
- lpdwPIDs = (LPDWORD) HeapAlloc(GetProcessHeap(), 0,
- dwSize2);
- if (lpdwPIDs == NULL)
- __leave;
-
- if (!lpfEnumProcesses(lpdwPIDs, dwSize2, &dwSize))
- __leave;
-
- } while (dwSize == dwSize2);
-
- // How many ProcID's did we get?
- dwSize /= sizeof(DWORD);
-
- // Loop through each ProcID.
- for (dwIndex = 0; dwIndex < dwSize; dwIndex++) {
-
- szFileName[0] = 0;
-
- // Open the process (if we can... security does not
- // permit every process in the system to be opened).
- hProcess = OpenProcess(
- PROCESS_QUERY_INFORMATION | PROCESS_VM_READ,
- FALSE, lpdwPIDs[dwIndex]);
- if (hProcess != NULL) {
-
- // Here we call EnumProcessModules to get only the
- // first module in the process. This will be the
- // EXE module for which we will retrieve the name.
- if (lpfEnumProcessModules(hProcess, &hMod,
- sizeof(hMod), &dwSize2)) {
-
- // Get the module name
- if (!lpfGetModuleBaseName(hProcess, hMod,
- (TCHAR*)szFileName, sizeof(szFileName)))
- szFileName[0] = 0;
- }
- CloseHandle(hProcess);
- }
- // Regardless of OpenProcess success or failure, we
- // still call the enum func with the ProcID.
- if (!lpProc(lpdwPIDs[dwIndex], 0, szFileName, lParam))
- break;
-
- // Did we just bump into an NTVDM?
- if ( _stricmp(szFileName, "NTVDM.EXE") == 0) {
-
- // Fill in some info for the 16-bit enum proc.
- sInfo.dwPID = lpdwPIDs[dwIndex];
- sInfo.lpProc = lpProc;
- sInfo.lParam = (DWORD) lParam;
- sInfo.bEnd = FALSE;
-
- // Enum the 16-bit stuff.
- lpfVDMEnumTaskWOWEx(lpdwPIDs[dwIndex],
- (TASKENUMPROCEX) Enum16, (LPARAM) &sInfo);
-
- // Did our main enum func say quit?
- if (sInfo.bEnd)
- break;
- }
- }
-
- } __finally {
-
- if (hInstLib)
- FreeLibrary(hInstLib);
-
- if (hInstLib2)
- FreeLibrary(hInstLib2);
-
- if (lpdwPIDs)
- HeapFree(GetProcessHeap(), 0, lpdwPIDs);
- }
-
- // If any OS other than Windows NT 4.0.
- } else if (osver.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS
- || (osver.dwPlatformId == VER_PLATFORM_WIN32_NT
- && osver.dwMajorVersion > 4)) {
-
- __try {
-
- hInstLib = LoadLibraryA("Kernel32.DLL");
- if (hInstLib == NULL)
- __leave;
-
- // If NT-based OS, load VDMDBG.DLL.
- if (osver.dwPlatformId == VER_PLATFORM_WIN32_NT) {
- hInstLib2 = LoadLibraryA("VDMDBG.DLL");
- if (hInstLib2 == NULL)
- __leave;
- }
-
- // Get procedure addresses. We are linking to
- // these functions explicitly, because a module using
- // this code would fail to load under Windows NT,
- // which does not have the Toolhelp32
- // functions in KERNEL32.DLL.
- lpfCreateToolhelp32Snapshot =
- (HANDLE (WINAPI *)(DWORD,DWORD))
- GetProcAddress(hInstLib, "CreateToolhelp32Snapshot");
-
- lpfProcess32First =
- (BOOL (WINAPI *)(HANDLE,LPPROCESSENTRY32))
- GetProcAddress(hInstLib, "Process32First");
-
- lpfProcess32Next =
- (BOOL (WINAPI *)(HANDLE,LPPROCESSENTRY32))
- GetProcAddress(hInstLib, "Process32Next");
-
- if (lpfProcess32Next == NULL
- || lpfProcess32First == NULL
- || lpfCreateToolhelp32Snapshot == NULL)
- __leave;
-
- if (osver.dwPlatformId == VER_PLATFORM_WIN32_NT) {
- lpfVDMEnumTaskWOWEx = (INT (WINAPI *)(DWORD, TASKENUMPROCEX,
- LPARAM)) GetProcAddress(hInstLib2, "VDMEnumTaskWOWEx");
- if (lpfVDMEnumTaskWOWEx == NULL)
- __leave;
- }
-
- // Get a handle to a Toolhelp snapshot of all processes.
- hSnapShot = lpfCreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
- if (hSnapShot == INVALID_HANDLE_VALUE) {
- FreeLibrary(hInstLib);
- return FALSE;
- }
-
- // Get the first process' information.
- procentry.dwSize = sizeof(PROCESSENTRY32);
- bFlag = lpfProcess32First(hSnapShot, &procentry);
-
- // While there are processes, keep looping.
- while (bFlag) {
-
- // Call the enum func with the filename and ProcID.
- if (lpProc(procentry.th32ProcessID, 0,
- (char *)procentry.szExeFile, lParam)) {
-
- // Did we just bump into an NTVDM?
- if ( _stricmp((char *)procentry.szExeFile, "NTVDM.EXE") == 0) {
-
- // Fill in some info for the 16-bit enum proc.
- sInfo.dwPID = procentry.th32ProcessID;
- sInfo.lpProc = lpProc;
- sInfo.lParam = (DWORD) lParam;
- sInfo.bEnd = FALSE;
-
- // Enum the 16-bit stuff.
- lpfVDMEnumTaskWOWEx(procentry.th32ProcessID,
- (TASKENUMPROCEX) Enum16, (LPARAM) &sInfo);
-
- // Did our main enum func say quit?
- if (sInfo.bEnd)
- break;
- }
-
- procentry.dwSize = sizeof(PROCESSENTRY32);
- bFlag = lpfProcess32Next(hSnapShot, &procentry);
-
- } else
- bFlag = FALSE;
- }
-
- } __finally {
-
- if (hInstLib)
- FreeLibrary(hInstLib);
-
- if (hInstLib2)
- FreeLibrary(hInstLib2);
- }
-
- } else
- return FALSE;
-
- // Free the library.
- FreeLibrary(hInstLib);
-
- return TRUE;
-}
-
-
-BOOL WINAPI Enum16(DWORD dwThreadId, WORD hMod16, WORD hTask16,
- PSZ pszModName, PSZ pszFileName, LPARAM lpUserDefined) {
-
- BOOL bRet;
-
- EnumInfoStruct *psInfo = (EnumInfoStruct *)lpUserDefined;
-
- bRet = psInfo->lpProc(psInfo->dwPID, hTask16, pszFileName,
- psInfo->lParam);
-
- if (!bRet)
- psInfo->bEnd = TRUE;
- return !bRet;
-}
+BOOL WINAPI EnumProcs(PROCENUMPROC lpProc, LPARAM lParam)
+{
+ OSVERSIONINFO osver;
+ HANDLE hSnapShot = NULL;
+ LPDWORD lpdwPIDs = NULL;
+ PROCESSENTRY32 procentry;
+ BOOL bFlag;
+
+ // Retrieve the OS version
+ osver.dwOSVersionInfoSize = sizeof(osver);
+ if (!GetVersionEx(&osver))
+ return FALSE;
+
+ if (osver.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS || (osver.dwPlatformId == VER_PLATFORM_WIN32_NT && osver.dwMajorVersion > 4)) {
+ // Get a handle to a Toolhelp snapshot of all processes.
+ hSnapShot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
+ if (hSnapShot == INVALID_HANDLE_VALUE)
+ return FALSE;
+
+ // Get the first process' information.
+ procentry.dwSize = sizeof(PROCESSENTRY32);
+ bFlag = Process32First(hSnapShot, &procentry);
+
+ // While there are processes, keep looping.
+ while (bFlag) {
+ // Call the enum func with the filename and ProcID.
+ if (lpProc(procentry.th32ProcessID, 0, (char *)procentry.szExeFile, lParam)) {
+ procentry.dwSize = sizeof(PROCESSENTRY32);
+ bFlag = Process32Next(hSnapShot, &procentry);
+
+ } else
+ bFlag = FALSE;
+ }
+ } else
+ return FALSE;
+
+ return TRUE;
+}
\ No newline at end of file diff --git a/plugins/Variables/src/libxml/DOCBparser.h b/plugins/Variables/src/libxml/DOCBparser.h deleted file mode 100644 index 75fb0b2ac8..0000000000 --- a/plugins/Variables/src/libxml/DOCBparser.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - * DOCBparser.h : interface for a DocBook SGML non-verifying parser - * - * See Copyright for the status of this software. - * - * daniel@veillard.com - */ - -#ifndef __DOCB_PARSER_H__ -#define __DOCB_PARSER_H__ -#include "libxml/parser.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Most of the back-end structures from XML and SGML are shared. - */ -typedef xmlParserCtxt docbParserCtxt; -typedef xmlParserCtxtPtr docbParserCtxtPtr; -typedef xmlParserNodeInfo docbParserNodeInfo; -typedef xmlSAXHandler docbSAXHandler; -typedef xmlSAXHandlerPtr docbSAXHandlerPtr; -typedef xmlParserInput docbParserInput; -typedef xmlParserInputPtr docbParserInputPtr; -typedef xmlDocPtr docbDocPtr; -typedef xmlNodePtr docbNodePtr; - -/* - * There is only few public functions. - */ -int docbEncodeEntities(unsigned char *out, - int *outlen, - const unsigned char *in, - int *inlen, int quoteChar); - -docbDocPtr docbSAXParseDoc (xmlChar *cur, - const char *encoding, - docbSAXHandlerPtr sax, - void *userData); -docbDocPtr docbParseDoc (xmlChar *cur, - const char *encoding); -docbDocPtr docbSAXParseFile(const char *filename, - const char *encoding, - docbSAXHandlerPtr sax, - void *userData); -docbDocPtr docbParseFile (const char *filename, - const char *encoding); - -/** - * Interfaces for the Push mode. - */ -void docbFreeParserCtxt (docbParserCtxtPtr ctxt); -docbParserCtxtPtr docbCreatePushParserCtxt(docbSAXHandlerPtr sax, - void *user_data, - const char *chunk, - int size, - const char *filename, - xmlCharEncoding enc); -int docbParseChunk (docbParserCtxtPtr ctxt, - const char *chunk, - int size, - int terminate); -docbParserCtxtPtr docbCreateFileParserCtxt(const char *filename, - const char *encoding); -int docbParseDocument (docbParserCtxtPtr ctxt); - -#ifdef __cplusplus -} -#endif - -#endif /* __DOCB_PARSER_H__ */ diff --git a/plugins/Variables/src/libxml/HTMLparser.h b/plugins/Variables/src/libxml/HTMLparser.h deleted file mode 100644 index a98ecbe8e6..0000000000 --- a/plugins/Variables/src/libxml/HTMLparser.h +++ /dev/null @@ -1,159 +0,0 @@ -/* - * HTMLparser.h : interface for an HTML 4.0 non-verifying parser - * - * See Copyright for the status of this software. - * - * daniel@veillard.com - */ - -#ifndef __HTML_PARSER_H__ -#define __HTML_PARSER_H__ -#include "libxml/parser.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Most of the back-end structures from XML and HTML are shared. - */ -typedef xmlParserCtxt htmlParserCtxt; -typedef xmlParserCtxtPtr htmlParserCtxtPtr; -typedef xmlParserNodeInfo htmlParserNodeInfo; -typedef xmlSAXHandler htmlSAXHandler; -typedef xmlSAXHandlerPtr htmlSAXHandlerPtr; -typedef xmlParserInput htmlParserInput; -typedef xmlParserInputPtr htmlParserInputPtr; -typedef xmlDocPtr htmlDocPtr; -typedef xmlNodePtr htmlNodePtr; - -/* - * Internal description of an HTML element, representing HTML 4.01 - * and XHTML 1.0 (which share the same structure). - */ -typedef struct _htmlElemDesc htmlElemDesc; -typedef htmlElemDesc *htmlElemDescPtr; -struct _htmlElemDesc { - const char *name; /* The tag name */ - char startTag; /* Whether the start tag can be implied */ - char endTag; /* Whether the end tag can be implied */ - char saveEndTag; /* Whether the end tag should be saved */ - char empty; /* Is this an empty element ? */ - char depr; /* Is this a deprecated element ? */ - char dtd; /* 1: only in Loose DTD, 2: only Frameset one */ - char isinline; /* is this a block 0 or inline 1 element */ - const char *desc; /* the description */ - -/* NRK Jan.2003 - * New fields encapsulating HTML structure - * - * Bugs: - * This is a very limited representation. It fails to tell us when - * an element *requires* subelements (we only have whether they're - * allowed or not), and it doesn't tell us where CDATA and PCDATA - * are allowed. Some element relationships are not fully represented: - * these are flagged with the word MODIFIER - */ - const char** subelts; /* allowed sub-elements of this element */ - const char* defaultsubelt; /* subelement for suggested auto-repair - if necessary or NULL */ - const char** attrs_opt; /* Optional Attributes */ - const char** attrs_depr; /* Additional deprecated attributes */ - const char** attrs_req; /* Required attributes */ -}; - -/* - * Internal description of an HTML entity. - */ -typedef struct _htmlEntityDesc htmlEntityDesc; -typedef htmlEntityDesc *htmlEntityDescPtr; -struct _htmlEntityDesc { - unsigned int value; /* the UNICODE value for the character */ - const char *name; /* The entity name */ - const char *desc; /* the description */ -}; - -/* - * There is only few public functions. - */ -const htmlElemDesc * htmlTagLookup (const xmlChar *tag); -const htmlEntityDesc * htmlEntityLookup(const xmlChar *name); -const htmlEntityDesc * htmlEntityValueLookup(unsigned int value); - -int htmlIsAutoClosed(htmlDocPtr doc, - htmlNodePtr elem); -int htmlAutoCloseTag(htmlDocPtr doc, - const xmlChar *name, - htmlNodePtr elem); -const htmlEntityDesc * htmlParseEntityRef(htmlParserCtxtPtr ctxt, - xmlChar **str); -int htmlParseCharRef(htmlParserCtxtPtr ctxt); -void htmlParseElement(htmlParserCtxtPtr ctxt); - -int htmlParseDocument(htmlParserCtxtPtr ctxt); -htmlDocPtr htmlSAXParseDoc (xmlChar *cur, - const char *encoding, - htmlSAXHandlerPtr sax, - void *userData); -htmlDocPtr htmlParseDoc (xmlChar *cur, - const char *encoding); -htmlDocPtr htmlSAXParseFile(const char *filename, - const char *encoding, - htmlSAXHandlerPtr sax, - void *userData); -htmlDocPtr htmlParseFile (const char *filename, - const char *encoding); -int UTF8ToHtml (unsigned char *out, - int *outlen, - const unsigned char *in, - int *inlen); -int htmlEncodeEntities(unsigned char *out, - int *outlen, - const unsigned char *in, - int *inlen, int quoteChar); -int htmlIsScriptAttribute(const xmlChar *name); -int htmlHandleOmittedElem(int val); - -/** - * Interfaces for the Push mode. - */ -void htmlFreeParserCtxt (htmlParserCtxtPtr ctxt); -htmlParserCtxtPtr htmlCreatePushParserCtxt(htmlSAXHandlerPtr sax, - void *user_data, - const char *chunk, - int size, - const char *filename, - xmlCharEncoding enc); -int htmlParseChunk (htmlParserCtxtPtr ctxt, - const char *chunk, - int size, - int terminate); - -/* NRK/Jan2003: further knowledge of HTML structure - */ -typedef enum { - HTML_NA = 0 , /* something we don't check at all */ - HTML_INVALID = 0x1 , - HTML_DEPRECATED = 0x2 , - HTML_VALID = 0x4 , - HTML_REQUIRED = 0xc /* VALID bit set so ( & HTML_VALID ) is TRUE */ -} htmlStatus ; - -/* Using htmlElemDesc rather than name here, to emphasise the fact - that otherwise there's a lookup overhead -*/ -htmlStatus htmlAttrAllowed(const htmlElemDesc*, const xmlChar*, int) ; -int htmlElementAllowedHere(const htmlElemDesc*, const xmlChar*) ; -htmlStatus htmlElementStatusHere(const htmlElemDesc*, const htmlElemDesc*) ; -htmlStatus htmlNodeStatus(const htmlNodePtr, int) ; -#define htmlDefaultSubelement(elt) elt->defaultsubelt -#define htmlElementAllowedHereDesc(parent,elt) \ - htmlElementAllowedHere((parent), (elt)->name) -#define htmlRequiredAttrs(elt) (elt)->attrs_req - - -#ifdef __cplusplus -} -#endif - -#endif /* __HTML_PARSER_H__ */ diff --git a/plugins/Variables/src/libxml/HTMLtree.h b/plugins/Variables/src/libxml/HTMLtree.h deleted file mode 100644 index e9944b3b25..0000000000 --- a/plugins/Variables/src/libxml/HTMLtree.h +++ /dev/null @@ -1,117 +0,0 @@ -/* - * HTMLtree.h : describes the structures found in an tree resulting - * from an XML parsing. - * - * See Copyright for the status of this software. - * - * daniel@veillard.com - */ - -#ifndef __HTML_TREE_H__ -#define __HTML_TREE_H__ - -#include <stdio.h> -#include "libxml/tree.h" -#include "libxml/HTMLparser.h" - - -#ifdef __cplusplus -extern "C" { -#endif - - -/** - * HTML_TEXT_NODE: - * - * Macro. A text node in a HTML document is really implemented - * the same way as a text node in an XML document. - */ -#define HTML_TEXT_NODE XML_TEXT_NODE -/** - * HTML_ENTITY_REF_NODE: - * - * Macro. An entity reference in a HTML document is really implemented - * the same way as an entity reference in an XML document. - */ -#define HTML_ENTITY_REF_NODE XML_ENTITY_REF_NODE -/** - * HTML_COMMENT_NODE: - * - * Macro. A comment in a HTML document is really implemented - * the same way as a comment in an XML document. - */ -#define HTML_COMMENT_NODE XML_COMMENT_NODE -/** - * HTML_PRESERVE_NODE: - * - * Macro. A preserved node in a HTML document is really implemented - * the same way as a CDATA section in an XML document. - */ -#define HTML_PRESERVE_NODE XML_CDATA_SECTION_NODE -/** - * HTML_PI_NODE: - * - * Macro. A processing instruction in a HTML document is really implemented - * the same way as a processing instruction in an XML document. - */ -#define HTML_PI_NODE XML_PI_NODE - -htmlDocPtr htmlNewDoc (const xmlChar *URI, - const xmlChar *ExternalID); -htmlDocPtr htmlNewDocNoDtD (const xmlChar *URI, - const xmlChar *ExternalID); -const xmlChar * htmlGetMetaEncoding (htmlDocPtr doc); -int htmlSetMetaEncoding (htmlDocPtr doc, - const xmlChar *encoding); -void htmlDocDumpMemory (xmlDocPtr cur, - xmlChar **mem, - int *size); -int htmlDocDump (FILE *f, - xmlDocPtr cur); -int htmlSaveFile (const char *filename, - xmlDocPtr cur); -int htmlNodeDump (xmlBufferPtr buf, - xmlDocPtr doc, - xmlNodePtr cur); -void htmlNodeDumpFile (FILE *out, - xmlDocPtr doc, - xmlNodePtr cur); -int htmlNodeDumpFileFormat (FILE *out, - xmlDocPtr doc, - xmlNodePtr cur, - const char *encoding, - int format); -int htmlSaveFileEnc (const char *filename, - xmlDocPtr cur, - const char *encoding); -int htmlSaveFileFormat (const char *filename, - xmlDocPtr cur, - const char *encoding, - int format); - -void htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf, - xmlDocPtr doc, - xmlNodePtr cur, - const char *encoding, - int format); -void htmlDocContentDumpOutput(xmlOutputBufferPtr buf, - xmlDocPtr cur, - const char *encoding); -void htmlDocContentDumpFormatOutput(xmlOutputBufferPtr buf, - xmlDocPtr cur, - const char *encoding, - int format); - -int htmlIsBooleanAttr (const xmlChar *name); -void htmlNodeDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, - xmlNodePtr cur, const char *encoding); - - - - -#ifdef __cplusplus -} -#endif - -#endif /* __HTML_TREE_H__ */ - diff --git a/plugins/Variables/src/libxml/SAX.h b/plugins/Variables/src/libxml/SAX.h deleted file mode 100644 index a46e14c78e..0000000000 --- a/plugins/Variables/src/libxml/SAX.h +++ /dev/null @@ -1,128 +0,0 @@ -/* - * SAX.h : Default SAX handler interfaces. - * - * See Copyright for the status of this software. - * - * Daniel Veillard <daniel@veillard.com> - */ - - -#ifndef __XML_SAX_H__ -#define __XML_SAX_H__ - -#include <stdio.h> -#include <stdlib.h> -#include "libxml/parser.h" -#include "libxml/xlink.h" - -#ifdef __cplusplus -extern "C" { -#endif -const xmlChar * getPublicId (void *ctx); -const xmlChar * getSystemId (void *ctx); -void setDocumentLocator (void *ctx, - xmlSAXLocatorPtr loc); - -int getLineNumber (void *ctx); -int getColumnNumber (void *ctx); - -int isStandalone (void *ctx); -int hasInternalSubset (void *ctx); -int hasExternalSubset (void *ctx); - -void internalSubset (void *ctx, - const xmlChar *name, - const xmlChar *ExternalID, - const xmlChar *SystemID); -void externalSubset (void *ctx, - const xmlChar *name, - const xmlChar *ExternalID, - const xmlChar *SystemID); -xmlEntityPtr getEntity (void *ctx, - const xmlChar *name); -xmlEntityPtr getParameterEntity (void *ctx, - const xmlChar *name); -xmlParserInputPtr resolveEntity (void *ctx, - const xmlChar *publicId, - const xmlChar *systemId); - -void entityDecl (void *ctx, - const xmlChar *name, - int type, - const xmlChar *publicId, - const xmlChar *systemId, - xmlChar *content); -void attributeDecl (void *ctx, - const xmlChar *elem, - const xmlChar *fullname, - int type, - int def, - const xmlChar *defaultValue, - xmlEnumerationPtr tree); -void elementDecl (void *ctx, - const xmlChar *name, - int type, - xmlElementContentPtr content); -void notationDecl (void *ctx, - const xmlChar *name, - const xmlChar *publicId, - const xmlChar *systemId); -void unparsedEntityDecl (void *ctx, - const xmlChar *name, - const xmlChar *publicId, - const xmlChar *systemId, - const xmlChar *notationName); - -void startDocument (void *ctx); -void endDocument (void *ctx); -void attribute (void *ctx, - const xmlChar *fullname, - const xmlChar *value); -void startElement (void *ctx, - const xmlChar *fullname, - const xmlChar **atts); -void endElement (void *ctx, - const xmlChar *name); -void reference (void *ctx, - const xmlChar *name); -void characters (void *ctx, - const xmlChar *ch, - int len); -void ignorableWhitespace (void *ctx, - const xmlChar *ch, - int len); -void processingInstruction (void *ctx, - const xmlChar *target, - const xmlChar *data); -void globalNamespace (void *ctx, - const xmlChar *href, - const xmlChar *prefix); -void setNamespace (void *ctx, - const xmlChar *name); -xmlNsPtr getNamespace (void *ctx); -int checkNamespace (void *ctx, - xmlChar *nameSpace); -void namespaceDecl (void *ctx, - const xmlChar *href, - const xmlChar *prefix); -void comment (void *ctx, - const xmlChar *value); -void cdataBlock (void *ctx, - const xmlChar *value, - int len); - -void initxmlDefaultSAXHandler (xmlSAXHandler *hdlr, - int warning); -#ifdef LIBXML_HTML_ENABLED -void inithtmlDefaultSAXHandler (xmlSAXHandler *hdlr); -#endif -#ifdef LIBXML_DOCB_ENABLED -void initdocbDefaultSAXHandler (xmlSAXHandler *hdlr); -#endif -void xmlDefaultSAXHandlerInit (void); -void htmlDefaultSAXHandlerInit (void); -void docbDefaultSAXHandlerInit (void); -#ifdef __cplusplus -} -#endif -#endif /* __XML_SAX_H__ */ diff --git a/plugins/Variables/src/libxml/catalog.h b/plugins/Variables/src/libxml/catalog.h deleted file mode 100644 index f6ee04815e..0000000000 --- a/plugins/Variables/src/libxml/catalog.h +++ /dev/null @@ -1,138 +0,0 @@ -/** - * catalog.h: interfaces of the Catalog handling system - * - * Reference: SGML Open Technical Resolution TR9401:1997. - * http://www.jclark.com/sp/catalog.htm - * - * XML Catalogs Working Draft 12 Jun 2001 - * http://www.oasis-open.org/committees/entity/spec-2001-06-12.html - * - * See Copyright for the status of this software. - * - * daniel@veillard.com - */ - -#ifndef __XML_CATALOG_H__ -#define __XML_CATALOG_H__ - -#include <stdio.h> - -#include "libxml/xmlversion.h" - -#ifdef LIBXML_CATALOG_ENABLED - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * XML_CATALOGS_NAMESPACE: - * - * The namespace for the XML Catalogs elements. - */ -#define XML_CATALOGS_NAMESPACE \ - (const xmlChar *) "urn:oasis:names:tc:entity:xmlns:xml:catalog" -/** - * XML_CATALOG_PI: - * - * The specific XML Catalog Processing Instuction name. - */ -#define XML_CATALOG_PI \ - (const xmlChar *) "oasis-xml-catalog" - -/* - * The API is voluntarily limited to general cataloging. - */ -typedef enum { - XML_CATA_PREFER_NONE = 0, - XML_CATA_PREFER_PUBLIC = 1, - XML_CATA_PREFER_SYSTEM -} xmlCatalogPrefer; - -typedef enum { - XML_CATA_ALLOW_NONE = 0, - XML_CATA_ALLOW_GLOBAL = 1, - XML_CATA_ALLOW_DOCUMENT = 2, - XML_CATA_ALLOW_ALL = 3 -} xmlCatalogAllow; - -typedef struct _xmlCatalog xmlCatalog; -typedef xmlCatalog *xmlCatalogPtr; - -/* - * Operations on a given catalog. - */ -xmlCatalogPtr xmlNewCatalog (int sgml); -xmlCatalogPtr xmlLoadACatalog (const char *filename); -xmlCatalogPtr xmlLoadSGMLSuperCatalog (const char *filename); -int xmlConvertSGMLCatalog (xmlCatalogPtr catal); -int xmlACatalogAdd (xmlCatalogPtr catal, - const xmlChar *type, - const xmlChar *orig, - const xmlChar *replace); -int xmlACatalogRemove (xmlCatalogPtr catal, - const xmlChar *value); -xmlChar * xmlACatalogResolve (xmlCatalogPtr catal, - const xmlChar *pubID, - const xmlChar *sysID); -xmlChar * xmlACatalogResolveSystem(xmlCatalogPtr catal, - const xmlChar *sysID); -xmlChar * xmlACatalogResolvePublic(xmlCatalogPtr catal, - const xmlChar *pubID); -xmlChar * xmlACatalogResolveURI (xmlCatalogPtr catal, - const xmlChar *URI); -void xmlACatalogDump (xmlCatalogPtr catal, - FILE *out); -void xmlFreeCatalog (xmlCatalogPtr catal); -int xmlCatalogIsEmpty (xmlCatalogPtr catal); - -/* - * Global operations. - */ -void xmlInitializeCatalog (void); -int xmlLoadCatalog (const char *filename); -void xmlLoadCatalogs (const char *paths); -void xmlCatalogCleanup (void); -void xmlCatalogDump (FILE *out); -xmlChar * xmlCatalogResolve (const xmlChar *pubID, - const xmlChar *sysID); -xmlChar * xmlCatalogResolveSystem (const xmlChar *sysID); -xmlChar * xmlCatalogResolvePublic (const xmlChar *pubID); -xmlChar * xmlCatalogResolveURI (const xmlChar *URI); -int xmlCatalogAdd (const xmlChar *type, - const xmlChar *orig, - const xmlChar *replace); -int xmlCatalogRemove (const xmlChar *value); -xmlDocPtr xmlParseCatalogFile (const char *filename); -int xmlCatalogConvert (void); - -/* - * Strictly minimal interfaces for per-document catalogs used - * by the parser. - */ -void xmlCatalogFreeLocal (void *catalogs); -void * xmlCatalogAddLocal (void *catalogs, - const xmlChar *URL); -xmlChar * xmlCatalogLocalResolve (void *catalogs, - const xmlChar *pubID, - const xmlChar *sysID); -xmlChar * xmlCatalogLocalResolveURI(void *catalogs, - const xmlChar *URI); -/* - * Preference settings. - */ -int xmlCatalogSetDebug (int level); -xmlCatalogPrefer xmlCatalogSetDefaultPrefer(xmlCatalogPrefer prefer); -void xmlCatalogSetDefaults (xmlCatalogAllow allow); -xmlCatalogAllow xmlCatalogGetDefaults (void); - - -/* DEPRECATED interfaces */ -const xmlChar * xmlCatalogGetSystem (const xmlChar *sysID); -const xmlChar * xmlCatalogGetPublic (const xmlChar *pubID); - -#ifdef __cplusplus -} -#endif -#endif /* LIBXML_CATALOG_ENABLED */ -#endif /* __XML_CATALOG_H__ */ diff --git a/plugins/Variables/src/libxml/debugXML.h b/plugins/Variables/src/libxml/debugXML.h deleted file mode 100644 index 444acb408e..0000000000 --- a/plugins/Variables/src/libxml/debugXML.h +++ /dev/null @@ -1,163 +0,0 @@ -/* - * debugXML.h : Interfaces to a set of routines used for debugging the tree - * produced by the XML parser. - * - * Daniel Veillard <daniel@veillard.com> - */ - -#ifndef __DEBUG_XML__ -#define __DEBUG_XML__ -#include <stdio.h> -#include "libxml/tree.h" - -#ifdef LIBXML_DEBUG_ENABLED - -#include "libxml/xpath.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * The standard Dump routines. - */ -void xmlDebugDumpString (FILE *output, - const xmlChar *str); -void xmlDebugDumpAttr (FILE *output, - xmlAttrPtr attr, - int depth); -void xmlDebugDumpAttrList (FILE *output, - xmlAttrPtr attr, - int depth); -void xmlDebugDumpOneNode (FILE *output, - xmlNodePtr node, - int depth); -void xmlDebugDumpNode (FILE *output, - xmlNodePtr node, - int depth); -void xmlDebugDumpNodeList (FILE *output, - xmlNodePtr node, - int depth); -void xmlDebugDumpDocumentHead(FILE *output, - xmlDocPtr doc); -void xmlDebugDumpDocument (FILE *output, - xmlDocPtr doc); -void xmlDebugDumpDTD (FILE *output, - xmlDtdPtr dtd); -void xmlDebugDumpEntities (FILE *output, - xmlDocPtr doc); - -void xmlLsOneNode (FILE *output, xmlNodePtr node); -int xmlLsCountNode (xmlNodePtr node); - -LIBXML_DLL_IMPORT const char *xmlBoolToText (int boolval); - -/**************************************************************** - * * - * The XML shell related structures and functions * - * * - ****************************************************************/ - -/** - * xmlShellReadlineFunc: - * @prompt: a string prompt - * - * This is a generic signature for the XML shell input function. - * - * Returns a string which will be freed by the Shell. - */ -typedef char * (* xmlShellReadlineFunc)(char *prompt); - -/** - * xmlShellCtxt: - * - * A debugging shell context. - * TODO: add the defined function tables. - */ -typedef struct _xmlShellCtxt xmlShellCtxt; -typedef xmlShellCtxt *xmlShellCtxtPtr; -struct _xmlShellCtxt { - char *filename; - xmlDocPtr doc; - xmlNodePtr node; - xmlXPathContextPtr pctxt; - int loaded; - FILE *output; - xmlShellReadlineFunc input; -}; - -/** - * xmlShellCmd: - * @ctxt: a shell context - * @arg: a string argument - * @node: a first node - * @node2: a second node - * - * This is a generic signature for the XML shell functions. - * - * Returns an int, negative returns indicating errors. - */ -typedef int (* xmlShellCmd) (xmlShellCtxtPtr ctxt, - char *arg, - xmlNodePtr node, - xmlNodePtr node2); - -void xmlShellPrintXPathError (int errorType, - const char *arg); -void xmlShellPrintNode (xmlNodePtr node); -void xmlShellPrintXPathResult(xmlXPathObjectPtr list); -int xmlShellList (xmlShellCtxtPtr ctxt, - char *arg, - xmlNodePtr node, - xmlNodePtr node2); -int xmlShellBase (xmlShellCtxtPtr ctxt, - char *arg, - xmlNodePtr node, - xmlNodePtr node2); -int xmlShellDir (xmlShellCtxtPtr ctxt, - char *arg, - xmlNodePtr node, - xmlNodePtr node2); -int xmlShellCat (xmlShellCtxtPtr ctxt, - char *arg, - xmlNodePtr node, - xmlNodePtr node2); -int xmlShellLoad (xmlShellCtxtPtr ctxt, - char *filename, - xmlNodePtr node, - xmlNodePtr node2); -int xmlShellWrite (xmlShellCtxtPtr ctxt, - char *filename, - xmlNodePtr node, - xmlNodePtr node2); -int xmlShellSave (xmlShellCtxtPtr ctxt, - char *filename, - xmlNodePtr node, - xmlNodePtr node2); -int xmlShellValidate (xmlShellCtxtPtr ctxt, - char *dtd, - xmlNodePtr node, - xmlNodePtr node2); -int xmlShellDu (xmlShellCtxtPtr ctxt, - char *arg, - xmlNodePtr tree, - xmlNodePtr node2); -int xmlShellPwd (xmlShellCtxtPtr ctxt, - char *buffer, - xmlNodePtr node, - xmlNodePtr node2); - -/* - * The Shell interface. - */ -void xmlShell (xmlDocPtr doc, - char *filename, - xmlShellReadlineFunc input, - FILE *output); - -#ifdef __cplusplus -} -#endif - -#endif /* LIBXML_DEBUG_ENABLED */ -#endif /* __DEBUG_XML__ */ diff --git a/plugins/Variables/src/libxml/encoding.h b/plugins/Variables/src/libxml/encoding.h deleted file mode 100644 index 012f6d9cf6..0000000000 --- a/plugins/Variables/src/libxml/encoding.h +++ /dev/null @@ -1,230 +0,0 @@ -/* - * encoding.h : interface for the encoding conversion functions needed for - * XML - * - * Related specs: - * rfc2044 (UTF-8 and UTF-16) F. Yergeau Alis Technologies - * [ISO-10646] UTF-8 and UTF-16 in Annexes - * [ISO-8859-1] ISO Latin-1 characters codes. - * [UNICODE] The Unicode Consortium, "The Unicode Standard -- - * Worldwide Character Encoding -- Version 1.0", Addison- - * Wesley, Volume 1, 1991, Volume 2, 1992. UTF-8 is - * described in Unicode Technical Report #4. - * [US-ASCII] Coded Character Set--7-bit American Standard Code for - * Information Interchange, ANSI X3.4-1986. - * - * See Copyright for the status of this software. - * - * daniel@veillard.com - */ - -#ifndef __XML_CHAR_ENCODING_H__ -#define __XML_CHAR_ENCODING_H__ - -#include "libxml/xmlversion.h" - -#ifdef LIBXML_ICONV_ENABLED -#include <iconv.h> -#endif -#ifdef __cplusplus -extern "C" { -#endif - -/** - * xmlCharEncoding: - * - * Predefined values for some standard encodings. - * Libxml don't do beforehand translation on UTF8, ISOLatinX. - * It also support UTF16 (LE and BE) by default. - * - * Anything else would have to be translated to UTF8 before being - * given to the parser itself. The BOM for UTF16 and the encoding - * declaration are looked at and a converter is looked for at that - * point. If not found the parser stops here as asked by the XML REC - * Converter can be registered by the user using xmlRegisterCharEncodingHandler - * but the current form doesn't allow stateful transcoding (a serious - * problem agreed !). If iconv has been found it will be used - * automatically and allow stateful transcoding, the simplest is then - * to be sure to enable icon and to provide iconv libs for the encoding - * support needed. - */ -typedef enum { - XML_CHAR_ENCODING_ERROR= -1, /* No char encoding detected */ - XML_CHAR_ENCODING_NONE= 0, /* No char encoding detected */ - XML_CHAR_ENCODING_UTF8= 1, /* UTF-8 */ - XML_CHAR_ENCODING_UTF16LE= 2, /* UTF-16 little endian */ - XML_CHAR_ENCODING_UTF16BE= 3, /* UTF-16 big endian */ - XML_CHAR_ENCODING_UCS4LE= 4, /* UCS-4 little endian */ - XML_CHAR_ENCODING_UCS4BE= 5, /* UCS-4 big endian */ - XML_CHAR_ENCODING_EBCDIC= 6, /* EBCDIC uh! */ - XML_CHAR_ENCODING_UCS4_2143=7, /* UCS-4 unusual ordering */ - XML_CHAR_ENCODING_UCS4_3412=8, /* UCS-4 unusual ordering */ - XML_CHAR_ENCODING_UCS2= 9, /* UCS-2 */ - XML_CHAR_ENCODING_8859_1= 10,/* ISO-8859-1 ISO Latin 1 */ - XML_CHAR_ENCODING_8859_2= 11,/* ISO-8859-2 ISO Latin 2 */ - XML_CHAR_ENCODING_8859_3= 12,/* ISO-8859-3 */ - XML_CHAR_ENCODING_8859_4= 13,/* ISO-8859-4 */ - XML_CHAR_ENCODING_8859_5= 14,/* ISO-8859-5 */ - XML_CHAR_ENCODING_8859_6= 15,/* ISO-8859-6 */ - XML_CHAR_ENCODING_8859_7= 16,/* ISO-8859-7 */ - XML_CHAR_ENCODING_8859_8= 17,/* ISO-8859-8 */ - XML_CHAR_ENCODING_8859_9= 18,/* ISO-8859-9 */ - XML_CHAR_ENCODING_2022_JP= 19,/* ISO-2022-JP */ - XML_CHAR_ENCODING_SHIFT_JIS=20,/* Shift_JIS */ - XML_CHAR_ENCODING_EUC_JP= 21,/* EUC-JP */ - XML_CHAR_ENCODING_ASCII= 22 /* pure ASCII */ -} xmlCharEncoding; - -/** - * xmlCharEncodingInputFunc: - * @out: a pointer to an array of bytes to store the UTF-8 result - * @outlen: the length of @out - * @in: a pointer to an array of chars in the original encoding - * @inlen: the length of @in - * - * Take a block of chars in the original encoding and try to convert - * it to an UTF-8 block of chars out. - * - * Returns the number of byte written, or -1 by lack of space, or -2 - * if the transcoding failed. - * The value of @inlen after return is the number of octets consumed - * as the return value is positive, else unpredictiable. - * The value of @outlen after return is the number of octets consumed. - */ -typedef int (* xmlCharEncodingInputFunc)(unsigned char *out, int *outlen, - const unsigned char *in, int *inlen); - - -/** - * xmlCharEncodingOutputFunc: - * @out: a pointer to an array of bytes to store the result - * @outlen: the length of @out - * @in: a pointer to an array of UTF-8 chars - * @inlen: the length of @in - * - * Take a block of UTF-8 chars in and try to convert it to an other - * encoding. - * Note: a first call designed to produce heading info is called with - * in = NULL. If stateful this should also initialize the encoder state. - * - * Returns the number of byte written, or -1 by lack of space, or -2 - * if the transcoding failed. - * The value of @inlen after return is the number of octets consumed - * as the return value is positive, else unpredictiable. - * The value of @outlen after return is the number of ocetes consumed. - */ -typedef int (* xmlCharEncodingOutputFunc)(unsigned char *out, int *outlen, - const unsigned char *in, int *inlen); - - -/* - * Block defining the handlers for non UTF-8 encodings. - * If iconv is supported, there is two extra fields. - */ - -typedef struct _xmlCharEncodingHandler xmlCharEncodingHandler; -typedef xmlCharEncodingHandler *xmlCharEncodingHandlerPtr; -struct _xmlCharEncodingHandler { - char *name; - xmlCharEncodingInputFunc input; - xmlCharEncodingOutputFunc output; -#ifdef LIBXML_ICONV_ENABLED - iconv_t iconv_in; - iconv_t iconv_out; -#endif /* LIBXML_ICONV_ENABLED */ -}; - -#ifdef __cplusplus -} -#endif -#include "libxml/tree.h" -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Interfaces for encoding handlers. - */ -void xmlInitCharEncodingHandlers (void); -void xmlCleanupCharEncodingHandlers (void); -void xmlRegisterCharEncodingHandler (xmlCharEncodingHandlerPtr handler); -xmlCharEncodingHandlerPtr - xmlGetCharEncodingHandler (xmlCharEncoding enc); -xmlCharEncodingHandlerPtr - xmlFindCharEncodingHandler (const char *name); -xmlCharEncodingHandlerPtr - xmlNewCharEncodingHandler (const char *name, - xmlCharEncodingInputFunc input, - xmlCharEncodingOutputFunc output); - -/* - * Interfaces for encoding names and aliases. - */ -int xmlAddEncodingAlias (const char *name, - const char *alias); -int xmlDelEncodingAlias (const char *alias); -const char * - xmlGetEncodingAlias (const char *alias); -void xmlCleanupEncodingAliases (void); -xmlCharEncoding - xmlParseCharEncoding (const char *name); -const char * - xmlGetCharEncodingName (xmlCharEncoding enc); - -/* - * Interfaces directly used by the parsers. - */ -xmlCharEncoding - xmlDetectCharEncoding (const unsigned char *in, - int len); - -int xmlCharEncOutFunc (xmlCharEncodingHandler *handler, - xmlBufferPtr out, - xmlBufferPtr in); - -int xmlCharEncInFunc (xmlCharEncodingHandler *handler, - xmlBufferPtr out, - xmlBufferPtr in); -int xmlCharEncFirstLine (xmlCharEncodingHandler *handler, - xmlBufferPtr out, - xmlBufferPtr in); -int xmlCharEncCloseFunc (xmlCharEncodingHandler *handler); - -/* - * Export a few useful functions - */ -int UTF8Toisolat1 (unsigned char *out, - int *outlen, - const unsigned char *in, - int *inlen); -int isolat1ToUTF8 (unsigned char *out, - int *outlen, - const unsigned char *in, - int *inlen); -int xmlGetUTF8Char (const unsigned char *utf, - int *len); -/* - * exports additional "UTF-8 aware" string routines which are. - */ - -int xmlCheckUTF8 (const unsigned char *utf); - -int xmlUTF8Strsize (const xmlChar *utf, - int len); -xmlChar * xmlUTF8Strndup (const xmlChar *utf, - int len); -xmlChar * xmlUTF8Strpos (const xmlChar *utf, - int pos); -int xmlUTF8Strloc (const xmlChar *utf, - const xmlChar *utfchar); -xmlChar * xmlUTF8Strsub (const xmlChar *utf, - int start, - int len); - -int xmlUTF8Strlen (const xmlChar *utf); - -#ifdef __cplusplus -} -#endif - -#endif /* __XML_CHAR_ENCODING_H__ */ diff --git a/plugins/Variables/src/libxml/entities.h b/plugins/Variables/src/libxml/entities.h deleted file mode 100644 index 3dfc4deba1..0000000000 --- a/plugins/Variables/src/libxml/entities.h +++ /dev/null @@ -1,110 +0,0 @@ -/* - * entities.h : interface for the XML entities handling - * - * See Copyright for the status of this software. - * - * daniel@veillard.com - */ - -#ifndef __XML_ENTITIES_H__ -#define __XML_ENTITIES_H__ - -#include "libxml/tree.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * The different valid entity types. - */ -typedef enum { - XML_INTERNAL_GENERAL_ENTITY = 1, - XML_EXTERNAL_GENERAL_PARSED_ENTITY = 2, - XML_EXTERNAL_GENERAL_UNPARSED_ENTITY = 3, - XML_INTERNAL_PARAMETER_ENTITY = 4, - XML_EXTERNAL_PARAMETER_ENTITY = 5, - XML_INTERNAL_PREDEFINED_ENTITY = 6 -} xmlEntityType; - -/* - * An unit of storage for an entity, contains the string, the value - * and the linkind data needed for the linking in the hash table. - */ - -struct _xmlEntity { - void *_private; /* application data */ - xmlElementType type; /* XML_ENTITY_DECL, must be second ! */ - const xmlChar *name; /* Entity name */ - struct _xmlNode *children; /* First child link */ - struct _xmlNode *last; /* Last child link */ - struct _xmlDtd *parent; /* -> DTD */ - struct _xmlNode *next; /* next sibling link */ - struct _xmlNode *prev; /* previous sibling link */ - struct _xmlDoc *doc; /* the containing document */ - - xmlChar *orig; /* content without ref substitution */ - xmlChar *content; /* content or ndata if unparsed */ - int length; /* the content length */ - xmlEntityType etype; /* The entity type */ - const xmlChar *ExternalID; /* External identifier for PUBLIC */ - const xmlChar *SystemID; /* URI for a SYSTEM or PUBLIC Entity */ - - struct _xmlEntity *nexte; /* unused */ - const xmlChar *URI; /* the full URI as computed */ - int owner; /* does the entity own the childrens */ -}; - -/* - * All entities are stored in an hash table. - * There is 2 separate hash tables for global and parameter entities. - */ - -typedef struct _xmlHashTable xmlEntitiesTable; -typedef xmlEntitiesTable *xmlEntitiesTablePtr; - -/* - * External functions: - */ - -void xmlInitializePredefinedEntities (void); -xmlEntityPtr xmlAddDocEntity (xmlDocPtr doc, - const xmlChar *name, - int type, - const xmlChar *ExternalID, - const xmlChar *SystemID, - const xmlChar *content); -xmlEntityPtr xmlAddDtdEntity (xmlDocPtr doc, - const xmlChar *name, - int type, - const xmlChar *ExternalID, - const xmlChar *SystemID, - const xmlChar *content); -xmlEntityPtr xmlGetPredefinedEntity (const xmlChar *name); -xmlEntityPtr xmlGetDocEntity (xmlDocPtr doc, - const xmlChar *name); -xmlEntityPtr xmlGetDtdEntity (xmlDocPtr doc, - const xmlChar *name); -xmlEntityPtr xmlGetParameterEntity (xmlDocPtr doc, - const xmlChar *name); -const xmlChar * xmlEncodeEntities (xmlDocPtr doc, - const xmlChar *input); -xmlChar * xmlEncodeEntitiesReentrant(xmlDocPtr doc, - const xmlChar *input); -xmlChar * xmlEncodeSpecialChars (xmlDocPtr doc, - const xmlChar *input); -xmlEntitiesTablePtr xmlCreateEntitiesTable (void); -xmlEntitiesTablePtr xmlCopyEntitiesTable (xmlEntitiesTablePtr table); -void xmlFreeEntitiesTable (xmlEntitiesTablePtr table); -void xmlDumpEntitiesTable (xmlBufferPtr buf, - xmlEntitiesTablePtr table); -void xmlDumpEntityDecl (xmlBufferPtr buf, - xmlEntityPtr ent); -void xmlCleanupPredefinedEntities(void); - - -#ifdef __cplusplus -} -#endif - -# endif /* __XML_ENTITIES_H__ */ diff --git a/plugins/Variables/src/libxml/globals.h b/plugins/Variables/src/libxml/globals.h deleted file mode 100644 index 8a5e8c88e0..0000000000 --- a/plugins/Variables/src/libxml/globals.h +++ /dev/null @@ -1,363 +0,0 @@ -/* - * globals.h: interface for all global variables of the library - * - * The bottom of this file is automatically generated by build_glob.py - * based on the description file global.data - * - * See Copyright for the status of this software. - * - * Gary Pennington <Gary.Pennington@uk.sun.com> - * daniel@veillard.com - */ - -#ifndef __XML_GLOBALS_H -#define __XML_GLOBALS_H - -#include "libxml/parser.h" -#include "libxml/xmlerror.h" -#include "libxml/SAX.h" -#include "libxml/xmlmemory.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Externally global symbols which need to be protected for backwards - * compatibility support. - */ - -#undef docbDefaultSAXHandler -#undef htmlDefaultSAXHandler -#undef oldXMLWDcompatibility -#undef xmlBufferAllocScheme -#undef xmlDefaultBufferSize -#undef xmlDefaultSAXHandler -#undef xmlDefaultSAXLocator -#undef xmlDoValidityCheckingDefaultValue -#undef xmlFree -#undef xmlGenericError -#undef xmlGenericErrorContext -#undef xmlGetWarningsDefaultValue -#undef xmlIndentTreeOutput -#undef xmlTreeIndentString -#undef xmlKeepBlanksDefaultValue -#undef xmlLineNumbersDefaultValue -#undef xmlLoadExtDtdDefaultValue -#undef xmlMalloc -#undef xmlMemStrdup -#undef xmlParserDebugEntities -#undef xmlParserVersion -#undef xmlPedanticParserDefaultValue -#undef xmlRealloc -#undef xmlSaveNoEmptyTags -#undef xmlSubstituteEntitiesDefaultValue -#undef xmlRegisterNodeDefaultValue -#undef xmlDeregisterNodeDefaultValue - -typedef void (*xmlRegisterNodeFunc) (xmlNodePtr node); -typedef void (*xmlDeregisterNodeFunc) (xmlNodePtr node); - -typedef struct _xmlGlobalState xmlGlobalState; -typedef xmlGlobalState *xmlGlobalStatePtr; -struct _xmlGlobalState -{ - const char *xmlParserVersion; - - xmlSAXLocator xmlDefaultSAXLocator; - xmlSAXHandler xmlDefaultSAXHandler; - xmlSAXHandler docbDefaultSAXHandler; - xmlSAXHandler htmlDefaultSAXHandler; - - xmlFreeFunc xmlFree; - xmlMallocFunc xmlMalloc; - xmlStrdupFunc xmlMemStrdup; - xmlReallocFunc xmlRealloc; - - xmlGenericErrorFunc xmlGenericError; - 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; -}; - -#ifdef __cplusplus -} -#endif -#include "libxml/threads.h" -#ifdef __cplusplus -extern "C" { -#endif - -void xmlInitializeGlobalState(xmlGlobalStatePtr gs); - -xmlRegisterNodeFunc xmlRegisterNodeDefault(xmlRegisterNodeFunc func); -xmlDeregisterNodeFunc xmlDeregisterNodeDefault(xmlDeregisterNodeFunc func); - -/* - * In general the memory allocation entry points are not kept - * thread specific but this can be overridden by LIBXML_THREAD_ALLOC_ENABLED - * - xmlMalloc - * - xmlRealloc - * - xmlMemStrdup - * - xmlFree - */ - -#ifdef LIBXML_THREAD_ALLOC_ENABLED -#ifdef LIBXML_THREAD_ENABLED -extern xmlMallocFunc *__xmlMalloc(void); -#define xmlMalloc \ -(*(__xmlMalloc())) -#else -LIBXML_DLL_IMPORT extern xmlMallocFunc xmlMalloc; -#endif - -#ifdef LIBXML_THREAD_ENABLED -extern xmlReallocFunc *__xmlRealloc(void); -#define xmlRealloc \ -(*(__xmlRealloc())) -#else -LIBXML_DLL_IMPORT extern xmlReallocFunc xmlRealloc; -#endif - -#ifdef LIBXML_THREAD_ENABLED -extern xmlFreeFunc *__xmlFree(void); -#define xmlFree \ -(*(__xmlFree())) -#else -LIBXML_DLL_IMPORT extern xmlFreeFunc xmlFree; -#endif - -#ifdef LIBXML_THREAD_ENABLED -extern xmlStrdupFunc *__xmlMemStrdup(void); -#define xmlMemStrdup \ -(*(__xmlMemStrdup())) -#else -LIBXML_DLL_IMPORT extern xmlStrdupFunc xmlMemStrdup; -#endif -#else /* !LIBXML_THREAD_ALLOC_ENABLED */ -LIBXML_DLL_IMPORT extern xmlMallocFunc xmlMalloc; -LIBXML_DLL_IMPORT extern xmlReallocFunc xmlRealloc; -LIBXML_DLL_IMPORT extern xmlFreeFunc xmlFree; -LIBXML_DLL_IMPORT extern xmlStrdupFunc xmlMemStrdup; -#endif /* LIBXML_THREAD_ALLOC_ENABLED */ - -#ifdef LIBXML_DOCB_ENABLED -extern xmlSAXHandler *__docbDefaultSAXHandler(void); -#ifdef LIBXML_THREAD_ENABLED -#define docbDefaultSAXHandler \ -(*(__docbDefaultSAXHandler())) -#else -LIBXML_DLL_IMPORT extern xmlSAXHandler docbDefaultSAXHandler; -#endif -#endif - -#ifdef LIBXML_HTML_ENABLED -extern xmlSAXHandler *__htmlDefaultSAXHandler(void); -#ifdef LIBXML_THREAD_ENABLED -#define htmlDefaultSAXHandler \ -(*(__htmlDefaultSAXHandler())) -#else -LIBXML_DLL_IMPORT extern xmlSAXHandler htmlDefaultSAXHandler; -#endif -#endif - - -/* - * Everything starting from the line below is - * Automatically generated by build_glob.py. - * Do not modify the previous line. - */ - - -extern int *__oldXMLWDcompatibility(void); -#ifdef LIBXML_THREAD_ENABLED -#define oldXMLWDcompatibility \ -(*(__oldXMLWDcompatibility())) -#else -LIBXML_DLL_IMPORT extern int oldXMLWDcompatibility; -#endif - -extern xmlBufferAllocationScheme *__xmlBufferAllocScheme(void); -#ifdef LIBXML_THREAD_ENABLED -#define xmlBufferAllocScheme \ -(*(__xmlBufferAllocScheme())) -#else -LIBXML_DLL_IMPORT extern xmlBufferAllocationScheme xmlBufferAllocScheme; -#endif - -extern int *__xmlDefaultBufferSize(void); -#ifdef LIBXML_THREAD_ENABLED -#define xmlDefaultBufferSize \ -(*(__xmlDefaultBufferSize())) -#else -LIBXML_DLL_IMPORT extern int xmlDefaultBufferSize; -#endif - -extern xmlSAXHandler *__xmlDefaultSAXHandler(void); -#ifdef LIBXML_THREAD_ENABLED -#define xmlDefaultSAXHandler \ -(*(__xmlDefaultSAXHandler())) -#else -LIBXML_DLL_IMPORT extern xmlSAXHandler xmlDefaultSAXHandler; -#endif - -extern xmlSAXLocator *__xmlDefaultSAXLocator(void); -#ifdef LIBXML_THREAD_ENABLED -#define xmlDefaultSAXLocator \ -(*(__xmlDefaultSAXLocator())) -#else -LIBXML_DLL_IMPORT extern xmlSAXLocator xmlDefaultSAXLocator; -#endif - -extern int *__xmlDoValidityCheckingDefaultValue(void); -#ifdef LIBXML_THREAD_ENABLED -#define xmlDoValidityCheckingDefaultValue \ -(*(__xmlDoValidityCheckingDefaultValue())) -#else -LIBXML_DLL_IMPORT extern int xmlDoValidityCheckingDefaultValue; -#endif - -extern xmlGenericErrorFunc *__xmlGenericError(void); -#ifdef LIBXML_THREAD_ENABLED -#define xmlGenericError \ -(*(__xmlGenericError())) -#else -LIBXML_DLL_IMPORT extern xmlGenericErrorFunc xmlGenericError; -#endif - -extern void * *__xmlGenericErrorContext(void); -#ifdef LIBXML_THREAD_ENABLED -#define xmlGenericErrorContext \ -(*(__xmlGenericErrorContext())) -#else -LIBXML_DLL_IMPORT extern void * xmlGenericErrorContext; -#endif - -extern int *__xmlGetWarningsDefaultValue(void); -#ifdef LIBXML_THREAD_ENABLED -#define xmlGetWarningsDefaultValue \ -(*(__xmlGetWarningsDefaultValue())) -#else -LIBXML_DLL_IMPORT extern int xmlGetWarningsDefaultValue; -#endif - -extern int *__xmlIndentTreeOutput(void); -#ifdef LIBXML_THREAD_ENABLED -#define xmlIndentTreeOutput \ -(*(__xmlIndentTreeOutput())) -#else -LIBXML_DLL_IMPORT extern int xmlIndentTreeOutput; -#endif - -extern const char * *__xmlTreeIndentString(void); -#ifdef LIBXML_THREAD_ENABLED -#define xmlTreeIndentString \ -(*(__xmlTreeIndentString())) -#else -LIBXML_DLL_IMPORT extern const char * xmlTreeIndentString; -#endif - -extern int *__xmlKeepBlanksDefaultValue(void); -#ifdef LIBXML_THREAD_ENABLED -#define xmlKeepBlanksDefaultValue \ -(*(__xmlKeepBlanksDefaultValue())) -#else -LIBXML_DLL_IMPORT extern int xmlKeepBlanksDefaultValue; -#endif - -extern int *__xmlLineNumbersDefaultValue(void); -#ifdef LIBXML_THREAD_ENABLED -#define xmlLineNumbersDefaultValue \ -(*(__xmlLineNumbersDefaultValue())) -#else -LIBXML_DLL_IMPORT extern int xmlLineNumbersDefaultValue; -#endif - -extern int *__xmlLoadExtDtdDefaultValue(void); -#ifdef LIBXML_THREAD_ENABLED -#define xmlLoadExtDtdDefaultValue \ -(*(__xmlLoadExtDtdDefaultValue())) -#else -LIBXML_DLL_IMPORT extern int xmlLoadExtDtdDefaultValue; -#endif - -extern int *__xmlParserDebugEntities(void); -#ifdef LIBXML_THREAD_ENABLED -#define xmlParserDebugEntities \ -(*(__xmlParserDebugEntities())) -#else -LIBXML_DLL_IMPORT extern int xmlParserDebugEntities; -#endif - -extern const char * *__xmlParserVersion(void); -#ifdef LIBXML_THREAD_ENABLED -#define xmlParserVersion \ -(*(__xmlParserVersion())) -#else -LIBXML_DLL_IMPORT extern const char * xmlParserVersion; -#endif - -extern int *__xmlPedanticParserDefaultValue(void); -#ifdef LIBXML_THREAD_ENABLED -#define xmlPedanticParserDefaultValue \ -(*(__xmlPedanticParserDefaultValue())) -#else -LIBXML_DLL_IMPORT extern int xmlPedanticParserDefaultValue; -#endif - -extern int *__xmlSaveNoEmptyTags(void); -#ifdef LIBXML_THREAD_ENABLED -#define xmlSaveNoEmptyTags \ -(*(__xmlSaveNoEmptyTags())) -#else -LIBXML_DLL_IMPORT extern int xmlSaveNoEmptyTags; -#endif - -extern int *__xmlSubstituteEntitiesDefaultValue(void); -#ifdef LIBXML_THREAD_ENABLED -#define xmlSubstituteEntitiesDefaultValue \ -(*(__xmlSubstituteEntitiesDefaultValue())) -#else -LIBXML_DLL_IMPORT extern int xmlSubstituteEntitiesDefaultValue; -#endif - -extern xmlRegisterNodeFunc *__xmlRegisterNodeDefaultValue(void); -#ifdef LIBXML_THREAD_ENABLED -#define xmlRegisterNodeDefaultValue \ -(*(__xmlRegisterNodeDefaultValue())) -#else -LIBXML_DLL_IMPORT extern xmlRegisterNodeFunc xmlRegisterNodeDefaultValue; -#endif - -extern xmlDeregisterNodeFunc *__xmlDeregisterNodeDefaultValue(void); -#ifdef LIBXML_THREAD_ENABLED -#define xmlDeregisterNodeDefaultValue \ -(*(__xmlDeregisterNodeDefaultValue())) -#else -LIBXML_DLL_IMPORT extern xmlDeregisterNodeFunc xmlDeregisterNodeDefaultValue; -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* __XML_GLOBALS_H */ diff --git a/plugins/Variables/src/libxml/hash.h b/plugins/Variables/src/libxml/hash.h deleted file mode 100644 index 24c5f214c3..0000000000 --- a/plugins/Variables/src/libxml/hash.h +++ /dev/null @@ -1,166 +0,0 @@ -/* - * hash.h: chained hash tables - * - * Copyright (C) 2000 Bjorn Reese and Daniel Veillard. - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF - * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND - * CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER. - * - * Author: bjorn.reese@systematic.dk - */ - -#ifndef __XML_HASH_H__ -#define __XML_HASH_H__ - -#include "libxml/parser.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * The hash table. - */ -typedef struct _xmlHashTable xmlHashTable; -typedef xmlHashTable *xmlHashTablePtr; - -/* - * function types: - */ -/** - * xmlHashDeallocator: - * @payload: the data in the hash - * @name: the name associated - * - * Callback to free data from a hash. - */ -typedef void (*xmlHashDeallocator)(void *payload, xmlChar *name); -/** - * xmlHashCopier: - * @payload: the data in the hash - * @name: the name associated - * - * Callback to copy data from a hash. - * - * Returns a copy of the data or NULL in case of error. - */ -typedef void *(*xmlHashCopier)(void *payload, xmlChar *name); -/** - * xmlHashScanner: - * @payload: the data in the hash - * @data: extra scannner data - * @name: the name associated - * - * Callback when scanning data in a hash with the simple scanner. - */ -typedef void (*xmlHashScanner)(void *payload, void *data, xmlChar *name); -/** - * xmlHashScannerFull: - * @payload: the data in the hash - * @data: extra scannner data - * @name: the name associated - * @name2: the second name associated - * @name3: the third name associated - * - * Callback when scanning data in a hash with the full scanner. - */ -typedef void (*xmlHashScannerFull)(void *payload, void *data, - const xmlChar *name, const xmlChar *name2, - const xmlChar *name3); - -/* - * Constructor and destructor. - */ -xmlHashTablePtr xmlHashCreate (int size); -void xmlHashFree (xmlHashTablePtr table, - xmlHashDeallocator f); - -/* - * Add a new entry to the hash table. - */ -int xmlHashAddEntry (xmlHashTablePtr table, - const xmlChar *name, - void *userdata); -int xmlHashUpdateEntry(xmlHashTablePtr table, - const xmlChar *name, - void *userdata, - xmlHashDeallocator f); -int xmlHashAddEntry2(xmlHashTablePtr table, - const xmlChar *name, - const xmlChar *name2, - void *userdata); -int xmlHashUpdateEntry2(xmlHashTablePtr table, - const xmlChar *name, - const xmlChar *name2, - void *userdata, - xmlHashDeallocator f); -int xmlHashAddEntry3(xmlHashTablePtr table, - const xmlChar *name, - const xmlChar *name2, - const xmlChar *name3, - void *userdata); -int xmlHashUpdateEntry3(xmlHashTablePtr table, - const xmlChar *name, - const xmlChar *name2, - const xmlChar *name3, - void *userdata, - xmlHashDeallocator f); - -/* - * Remove an entry from the hash table. - */ -int xmlHashRemoveEntry(xmlHashTablePtr table, const xmlChar *name, - xmlHashDeallocator f); -int xmlHashRemoveEntry2(xmlHashTablePtr table, const xmlChar *name, - const xmlChar *name2, xmlHashDeallocator f); -int xmlHashRemoveEntry3(xmlHashTablePtr table, const xmlChar *name, - const xmlChar *name2, const xmlChar *name3, - xmlHashDeallocator f); - -/* - * Retrieve the userdata. - */ -void * xmlHashLookup (xmlHashTablePtr table, - const xmlChar *name); -void * xmlHashLookup2 (xmlHashTablePtr table, - const xmlChar *name, - const xmlChar *name2); -void * xmlHashLookup3 (xmlHashTablePtr table, - const xmlChar *name, - const xmlChar *name2, - const xmlChar *name3); - -/* - * Helpers. - */ -xmlHashTablePtr xmlHashCopy (xmlHashTablePtr table, - xmlHashCopier f); -int xmlHashSize (xmlHashTablePtr table); -void xmlHashScan (xmlHashTablePtr table, - xmlHashScanner f, - void *data); -void xmlHashScan3 (xmlHashTablePtr table, - const xmlChar *name, - const xmlChar *name2, - const xmlChar *name3, - xmlHashScanner f, - void *data); -void xmlHashScanFull (xmlHashTablePtr table, - xmlHashScannerFull f, - void *data); -void xmlHashScanFull3(xmlHashTablePtr table, - const xmlChar *name, - const xmlChar *name2, - const xmlChar *name3, - xmlHashScannerFull f, - void *data); -#ifdef __cplusplus -} -#endif -#endif /* ! __XML_HASH_H__ */ diff --git a/plugins/Variables/src/libxml/list.h b/plugins/Variables/src/libxml/list.h deleted file mode 100644 index 8c9515fe1d..0000000000 --- a/plugins/Variables/src/libxml/list.h +++ /dev/null @@ -1,116 +0,0 @@ -/* - * list.h: lists interfaces - * - * Copyright (C) 2000 Gary Pennington and Daniel Veillard. - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF - * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND - * CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER. - * - * Author: Gary.Pennington@uk.sun.com - */ - -#ifndef __XML_LINK_INCLUDE__ -#define __XML_LINK_INCLUDE__ - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct _xmlLink xmlLink; -typedef xmlLink *xmlLinkPtr; - -typedef struct _xmlList xmlList; -typedef xmlList *xmlListPtr; - -/** - * xmlListDeallocator: - * @lk: the data to deallocate - * - * Callback function used to free data from a list. - */ -typedef void (*xmlListDeallocator) (xmlLinkPtr lk); -/** - * xmlListDataCompare: - * @data0: the first data - * @data1: the second data - * - * Callback function used to compare 2 data. - * - * Returns 0 is equality, -1 or 1 otherwise depending on the ordering. - */ -typedef int (*xmlListDataCompare) (const void *data0, const void *data1); -/** - * xmlListWalker: - * @data: the data found in the list - * @user: extra user provided data to the walker - * - * Callback function used when walking a list with xmlListWalk(). - * - * Returns 0 to stop walking the list, 1 otherwise. - */ -typedef int (*xmlListWalker) (const void *data, const void *user); - -/* Creation/Deletion */ -xmlListPtr xmlListCreate (xmlListDeallocator deallocator, - xmlListDataCompare compare); -void xmlListDelete (xmlListPtr l); - -/* Basic Operators */ -void * xmlListSearch (xmlListPtr l, - void *data); -void * xmlListReverseSearch (xmlListPtr l, - void *data); -int xmlListInsert (xmlListPtr l, - void *data) ; -int xmlListAppend (xmlListPtr l, - void *data) ; -int xmlListRemoveFirst (xmlListPtr l, - void *data); -int xmlListRemoveLast (xmlListPtr l, - void *data); -int xmlListRemoveAll (xmlListPtr l, - void *data); -void xmlListClear (xmlListPtr l); -int xmlListEmpty (xmlListPtr l); -xmlLinkPtr xmlListFront (xmlListPtr l); -xmlLinkPtr xmlListEnd (xmlListPtr l); -int xmlListSize (xmlListPtr l); - -void xmlListPopFront (xmlListPtr l); -void xmlListPopBack (xmlListPtr l); -int xmlListPushFront (xmlListPtr l, - void *data); -int xmlListPushBack (xmlListPtr l, - void *data); - -/* Advanced Operators */ -void xmlListReverse (xmlListPtr l); -void xmlListSort (xmlListPtr l); -void xmlListWalk (xmlListPtr l, - xmlListWalker walker, - const void *user); -void xmlListReverseWalk (xmlListPtr l, - xmlListWalker walker, - const void *user); -void xmlListMerge (xmlListPtr l1, - xmlListPtr l2); -xmlListPtr xmlListDup (const xmlListPtr old); -int xmlListCopy (xmlListPtr cur, - const xmlListPtr old); -/* Link operators */ -void * xmlLinkGetData (xmlLinkPtr lk); - -/* xmlListUnique() */ -/* xmlListSwap */ - -#ifdef __cplusplus -} -#endif - -#endif /* __XML_LINK_INCLUDE__ */ diff --git a/plugins/Variables/src/libxml/parser.h b/plugins/Variables/src/libxml/parser.h deleted file mode 100644 index ac98f4b944..0000000000 --- a/plugins/Variables/src/libxml/parser.h +++ /dev/null @@ -1,869 +0,0 @@ -/* - * parser.h : Interfaces, constants and types related to the XML parser. - * - * See Copyright for the status of this software. - * - * daniel@veillard.com - */ - -#ifndef __XML_PARSER_H__ -#define __XML_PARSER_H__ - -#include "libxml/tree.h" -#include "libxml/valid.h" -#include "libxml/entities.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * XML_DEFAULT_VERSION: - * - * The default version of XML used: 1.0 - */ -#define XML_DEFAULT_VERSION "1.0" - -/** - * xmlParserInput: - * - * An xmlParserInput is an input flow for the XML processor. - * Each entity parsed is associated an xmlParserInput (except the - * few predefined ones). This is the case both for internal entities - * - in which case the flow is already completely in memory - or - * external entities - in which case we use the buf structure for - * progressive reading and I18N conversions to the internal UTF-8 format. - */ - -/** - * xmlParserInputDeallocate: - * @str: the string to deallocate - * - * Callback for freeing some parser input allocations. - */ -typedef void (* xmlParserInputDeallocate)(xmlChar *str); - -struct _xmlParserInput { - /* Input buffer */ - xmlParserInputBufferPtr buf; /* UTF-8 encoded buffer */ - - const char *filename; /* The file analyzed, if any */ - const char *directory; /* the directory/base of the file */ - const xmlChar *base; /* Base of the array to parse */ - const xmlChar *cur; /* Current char being parsed */ - const xmlChar *end; /* end of the array to parse */ - int length; /* length if known */ - int line; /* Current line */ - int col; /* Current column */ - int consumed; /* How many xmlChars already consumed */ - xmlParserInputDeallocate free; /* function to deallocate the base */ - const xmlChar *encoding; /* the encoding string for entity */ - const xmlChar *version; /* the version string for entity */ - int standalone; /* Was that entity marked standalone */ -}; - -/** - * xmlParserNodeInfo: - * - * The parser can be asked to collect Node informations, i.e. at what - * place in the file they were detected. - * NOTE: This is off by default and not very well tested. - */ -typedef struct _xmlParserNodeInfo xmlParserNodeInfo; -typedef xmlParserNodeInfo *xmlParserNodeInfoPtr; - -struct _xmlParserNodeInfo { - const struct _xmlNode* node; - /* Position & line # that text that created the node begins & ends on */ - unsigned long begin_pos; - unsigned long begin_line; - unsigned long end_pos; - unsigned long end_line; -}; - -typedef struct _xmlParserNodeInfoSeq xmlParserNodeInfoSeq; -typedef xmlParserNodeInfoSeq *xmlParserNodeInfoSeqPtr; -struct _xmlParserNodeInfoSeq { - unsigned long maximum; - unsigned long length; - xmlParserNodeInfo* buffer; -}; - -/** - * xmlParserInputState: - * - * The parser is now working also as a state based parser. - * The recursive one use the state info for entities processing. - */ -typedef enum { - XML_PARSER_EOF = -1, /* nothing is to be parsed */ - XML_PARSER_START = 0, /* nothing has been parsed */ - XML_PARSER_MISC, /* Misc* before int subset */ - XML_PARSER_PI, /* Within a processing instruction */ - XML_PARSER_DTD, /* within some DTD content */ - XML_PARSER_PROLOG, /* Misc* after internal subset */ - XML_PARSER_COMMENT, /* within a comment */ - XML_PARSER_START_TAG, /* within a start tag */ - XML_PARSER_CONTENT, /* within the content */ - XML_PARSER_CDATA_SECTION, /* within a CDATA section */ - XML_PARSER_END_TAG, /* within a closing tag */ - XML_PARSER_ENTITY_DECL, /* within an entity declaration */ - XML_PARSER_ENTITY_VALUE, /* within an entity value in a decl */ - XML_PARSER_ATTRIBUTE_VALUE, /* within an attribute value */ - 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 */ -} xmlParserInputState; - -/** - * XML_DETECT_IDS: - * - * Bit in the loadsubset context field to tell to do ID/REFs lookups. - * Use it to initialize xmlLoadExtDtdDefaultValue. - */ -#define XML_DETECT_IDS 2 - -/** - * XML_COMPLETE_ATTRS: - * - * Bit in the loadsubset context field to tell to do complete the - * elements attributes lists with the ones defaulted from the DTDs. - * Use it to initialize xmlLoadExtDtdDefaultValue. - */ -#define XML_COMPLETE_ATTRS 4 - -/** - * xmlParserCtxt: - * - * The parser context. - * NOTE This doesn't completely define the parser state, the (current ?) - * design of the parser uses recursive function calls since this allow - * and easy mapping from the production rules of the specification - * to the actual code. The drawback is that the actual function call - * also reflect the parser state. However most of the parsing routines - * takes as the only argument the parser context pointer, so migrating - * to a state based parser for progressive parsing shouldn't be too hard. - */ -struct _xmlParserCtxt { - struct _xmlSAXHandler *sax; /* The SAX handler */ - void *userData; /* For SAX interface only, used by DOM build */ - xmlDocPtr myDoc; /* the document being built */ - int wellFormed; /* is the document well formed */ - int replaceEntities; /* shall we replace entities ? */ - const xmlChar *version; /* the XML version string */ - const xmlChar *encoding; /* the declared encoding, if any */ - int standalone; /* standalone document */ - int html; /* an HTML(1)/Docbook(2) document */ - - /* Input stream stack */ - xmlParserInputPtr input; /* Current input stream */ - int inputNr; /* Number of current input streams */ - int inputMax; /* Max number of input streams */ - xmlParserInputPtr *inputTab; /* stack of inputs */ - - /* Node analysis stack only used for DOM building */ - xmlNodePtr node; /* Current parsed Node */ - int nodeNr; /* Depth of the parsing stack */ - int nodeMax; /* Max depth of the parsing stack */ - xmlNodePtr *nodeTab; /* array of nodes */ - - int record_info; /* Whether node info should be kept */ - xmlParserNodeInfoSeq node_seq; /* info about each node parsed */ - - int errNo; /* error code */ - - int hasExternalSubset; /* reference and external subset */ - int hasPErefs; /* the internal subset has PE refs */ - int external; /* are we parsing an external entity */ - - int valid; /* is the document valid */ - int validate; /* shall we try to validate ? */ - xmlValidCtxt vctxt; /* The validity context */ - - xmlParserInputState instate; /* current type of input */ - int token; /* next char look-ahead */ - - char *directory; /* the data directory */ - - /* Node name stack */ - xmlChar *name; /* Current parsed Node */ - int nameNr; /* Depth of the parsing stack */ - int nameMax; /* Max depth of the parsing stack */ - xmlChar * *nameTab; /* array of nodes */ - - long nbChars; /* number of xmlChar processed */ - long checkIndex; /* used by progressive parsing lookup */ - int keepBlanks; /* ugly but ... */ - int disableSAX; /* SAX callbacks are disabled */ - int inSubset; /* Parsing is in int 1/ext 2 subset */ - xmlChar * intSubName; /* name of subset */ - xmlChar * extSubURI; /* URI of external subset */ - xmlChar * extSubSystem; /* SYSTEM ID of external subset */ - - /* xml:space values */ - int * space; /* Should the parser preserve spaces */ - int spaceNr; /* Depth of the parsing stack */ - int spaceMax; /* Max depth of the parsing stack */ - int * spaceTab; /* array of space infos */ - - 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 nodelen; /* Those two fields are there to */ - int nodemem; /* Speed up large node parsing */ - int pedantic; /* signal pedantic warnings */ - void *_private; /* For user data, libxml won't touch it */ - - int loadsubset; /* should the external subset be loaded */ - int linenumbers; /* set line number in element content */ - void *catalogs; /* document's own catalog */ - int recovery; /* run in recovery mode */ -}; - -/** - * xmlSAXLocator: - * - * A SAX Locator. - */ -struct _xmlSAXLocator { - const xmlChar *(*getPublicId)(void *ctx); - const xmlChar *(*getSystemId)(void *ctx); - int (*getLineNumber)(void *ctx); - int (*getColumnNumber)(void *ctx); -}; - -/** - * xmlSAXHandler: - * - * A SAX handler is bunch of callbacks called by the parser when processing - * of the input generate data or structure informations. - */ - -/** - * resolveEntitySAXFunc: - * @ctx: the user data (XML parser context) - * @publicId: The public ID of the entity - * @systemId: The system ID of the entity - * - * Callback: - * The entity loader, to control the loading of external entities, - * the application can either: - * - override this resolveEntity() callback in the SAX block - * - or better use the xmlSetExternalEntityLoader() function to - * set up it's own entity resolution routine - * - * Returns the xmlParserInputPtr if inlined or NULL for DOM behaviour. - */ -typedef xmlParserInputPtr (*resolveEntitySAXFunc) (void *ctx, - const xmlChar *publicId, - const xmlChar *systemId); -/** - * internalSubsetSAXFunc: - * @ctx: the user data (XML parser context) - * @name: the root element name - * @ExternalID: the external ID - * @SystemID: the SYSTEM ID (e.g. filename or URL) - * - * Callback on internal subset declaration. - */ -typedef void (*internalSubsetSAXFunc) (void *ctx, - const xmlChar *name, - const xmlChar *ExternalID, - const xmlChar *SystemID); -/** - * externalSubsetSAXFunc: - * @ctx: the user data (XML parser context) - * @name: the root element name - * @ExternalID: the external ID - * @SystemID: the SYSTEM ID (e.g. filename or URL) - * - * Callback on external subset declaration. - */ -typedef void (*externalSubsetSAXFunc) (void *ctx, - const xmlChar *name, - const xmlChar *ExternalID, - const xmlChar *SystemID); -/** - * getEntitySAXFunc: - * @ctx: the user data (XML parser context) - * @name: The entity name - * - * Get an entity by name. - * - * Returns the xmlEntityPtr if found. - */ -typedef xmlEntityPtr (*getEntitySAXFunc) (void *ctx, - const xmlChar *name); -/** - * getParameterEntitySAXFunc: - * @ctx: the user data (XML parser context) - * @name: The entity name - * - * Get a parameter entity by name. - * - * Returns the xmlEntityPtr if found. - */ -typedef xmlEntityPtr (*getParameterEntitySAXFunc) (void *ctx, - const xmlChar *name); -/** - * entityDeclSAXFunc: - * @ctx: the user data (XML parser context) - * @name: the entity name - * @type: the entity type - * @publicId: The public ID of the entity - * @systemId: The system ID of the entity - * @content: the entity value (without processing). - * - * An entity definition has been parsed. - */ -typedef void (*entityDeclSAXFunc) (void *ctx, - const xmlChar *name, - int type, - const xmlChar *publicId, - const xmlChar *systemId, - xmlChar *content); -/** - * notationDeclSAXFunc: - * @ctx: the user data (XML parser context) - * @name: The name of the notation - * @publicId: The public ID of the entity - * @systemId: The system ID of the entity - * - * What to do when a notation declaration has been parsed. - */ -typedef void (*notationDeclSAXFunc)(void *ctx, - const xmlChar *name, - const xmlChar *publicId, - const xmlChar *systemId); -/** - * attributeDeclSAXFunc: - * @ctx: the user data (XML parser context) - * @elem: the name of the element - * @fullname: the attribute name - * @type: the attribute type - * @def: the type of default value - * @defaultValue: the attribute default value - * @tree: the tree of enumerated value set - * - * An attribute definition has been parsed. - */ -typedef void (*attributeDeclSAXFunc)(void *ctx, - const xmlChar *elem, - const xmlChar *fullname, - int type, - int def, - const xmlChar *defaultValue, - xmlEnumerationPtr tree); -/** - * elementDeclSAXFunc: - * @ctx: the user data (XML parser context) - * @name: the element name - * @type: the element type - * @content: the element value tree - * - * An element definition has been parsed. - */ -typedef void (*elementDeclSAXFunc)(void *ctx, - const xmlChar *name, - int type, - xmlElementContentPtr content); -/** - * unparsedEntityDeclSAXFunc: - * @ctx: the user data (XML parser context) - * @name: The name of the entity - * @publicId: The public ID of the entity - * @systemId: The system ID of the entity - * @notationName: the name of the notation - * - * What to do when an unparsed entity declaration is parsed. - */ -typedef void (*unparsedEntityDeclSAXFunc)(void *ctx, - const xmlChar *name, - const xmlChar *publicId, - const xmlChar *systemId, - const xmlChar *notationName); -/** - * setDocumentLocatorSAXFunc: - * @ctx: the user data (XML parser context) - * @loc: A SAX Locator - * - * Receive the document locator at startup, actually xmlDefaultSAXLocator. - * Everything is available on the context, so this is useless in our case. - */ -typedef void (*setDocumentLocatorSAXFunc) (void *ctx, - xmlSAXLocatorPtr loc); -/** - * startDocumentSAXFunc: - * @ctx: the user data (XML parser context) - * - * Called when the document start being processed. - */ -typedef void (*startDocumentSAXFunc) (void *ctx); -/** - * endDocumentSAXFunc: - * @ctx: the user data (XML parser context) - * - * Called when the document end has been detected. - */ -typedef void (*endDocumentSAXFunc) (void *ctx); -/** - * startElementSAXFunc: - * @ctx: the user data (XML parser context) - * @name: The element name, including namespace prefix - * @atts: An array of name/value attributes pairs, NULL terminated - * - * Called when an opening tag has been processed. - */ -typedef void (*startElementSAXFunc) (void *ctx, - const xmlChar *name, - const xmlChar **atts); -/** - * endElementSAXFunc: - * @ctx: the user data (XML parser context) - * @name: The element name - * - * Called when the end of an element has been detected. - */ -typedef void (*endElementSAXFunc) (void *ctx, - const xmlChar *name); -/** - * attributeSAXFunc: - * @ctx: the user data (XML parser context) - * @name: The attribute name, including namespace prefix - * @value: The attribute value - * - * Handle an attribute that has been read by the parser. - * The default handling is to convert the attribute into an - * DOM subtree and past it in a new xmlAttr element added to - * the element. - */ -typedef void (*attributeSAXFunc) (void *ctx, - const xmlChar *name, - const xmlChar *value); -/** - * referenceSAXFunc: - * @ctx: the user data (XML parser context) - * @name: The entity name - * - * Called when an entity reference is detected. - */ -typedef void (*referenceSAXFunc) (void *ctx, - const xmlChar *name); -/** - * charactersSAXFunc: - * @ctx: the user data (XML parser context) - * @ch: a xmlChar string - * @len: the number of xmlChar - * - * Receiving some chars from the parser. - */ -typedef void (*charactersSAXFunc) (void *ctx, - const xmlChar *ch, - int len); -/** - * ignorableWhitespaceSAXFunc: - * @ctx: the user data (XML parser context) - * @ch: a xmlChar string - * @len: the number of xmlChar - * - * Receiving some ignorable whitespaces from the parser. - * UNUSED: by default the DOM building will use characters. - */ -typedef void (*ignorableWhitespaceSAXFunc) (void *ctx, - const xmlChar *ch, - int len); -/** - * processingInstructionSAXFunc: - * @ctx: the user data (XML parser context) - * @target: the target name - * @data: the PI data's - * - * A processing instruction has been parsed. - */ -typedef void (*processingInstructionSAXFunc) (void *ctx, - const xmlChar *target, - const xmlChar *data); -/** - * commentSAXFunc: - * @ctx: the user data (XML parser context) - * @value: the comment content - * - * A comment has been parsed. - */ -typedef void (*commentSAXFunc) (void *ctx, - const xmlChar *value); -/** - * cdataBlockSAXFunc: - * @ctx: the user data (XML parser context) - * @value: The pcdata content - * @len: the block length - * - * Called when a pcdata block has been parsed. - */ -typedef void (*cdataBlockSAXFunc) ( - void *ctx, - const xmlChar *value, - int len); -/** - * warningSAXFunc: - * @ctx: an XML parser context - * @msg: the message to display/transmit - * @...: extra parameters for the message display - * - * Display and format a warning messages, callback. - */ -typedef void (*warningSAXFunc) (void *ctx, - const char *msg, ...); -/** - * errorSAXFunc: - * @ctx: an XML parser context - * @msg: the message to display/transmit - * @...: extra parameters for the message display - * - * Display and format an error messages, callback. - */ -typedef void (*errorSAXFunc) (void *ctx, - const char *msg, ...); -/** - * fatalErrorSAXFunc: - * @ctx: an XML parser context - * @msg: the message to display/transmit - * @...: extra parameters for the message display - * - * Display and format fatal error messages, callback. - * Note: so far fatalError() SAX callbacks are not used, error() - * get all the callbacks for errors. - */ -typedef void (*fatalErrorSAXFunc) (void *ctx, - const char *msg, ...); -/** - * isStandaloneSAXFunc: - * @ctx: the user data (XML parser context) - * - * Is this document tagged standalone? - * - * Returns 1 if true - */ -typedef int (*isStandaloneSAXFunc) (void *ctx); -/** - * hasInternalSubsetSAXFunc: - * @ctx: the user data (XML parser context) - * - * Does this document has an internal subset. - * - * Returns 1 if true - */ -typedef int (*hasInternalSubsetSAXFunc) (void *ctx); -/** - * hasExternalSubsetSAXFunc: - * @ctx: the user data (XML parser context) - * - * Does this document has an external subset? - * - * Returns 1 if true - */ -typedef int (*hasExternalSubsetSAXFunc) (void *ctx); - -struct _xmlSAXHandler { - internalSubsetSAXFunc internalSubset; - isStandaloneSAXFunc isStandalone; - hasInternalSubsetSAXFunc hasInternalSubset; - hasExternalSubsetSAXFunc hasExternalSubset; - resolveEntitySAXFunc resolveEntity; - getEntitySAXFunc getEntity; - entityDeclSAXFunc entityDecl; - notationDeclSAXFunc notationDecl; - attributeDeclSAXFunc attributeDecl; - elementDeclSAXFunc elementDecl; - unparsedEntityDeclSAXFunc unparsedEntityDecl; - setDocumentLocatorSAXFunc setDocumentLocator; - startDocumentSAXFunc startDocument; - endDocumentSAXFunc endDocument; - startElementSAXFunc startElement; - endElementSAXFunc endElement; - referenceSAXFunc reference; - charactersSAXFunc characters; - ignorableWhitespaceSAXFunc ignorableWhitespace; - processingInstructionSAXFunc processingInstruction; - commentSAXFunc comment; - warningSAXFunc warning; - errorSAXFunc error; - fatalErrorSAXFunc fatalError; /* unused error() get all the errors */ - getParameterEntitySAXFunc getParameterEntity; - cdataBlockSAXFunc cdataBlock; - externalSubsetSAXFunc externalSubset; - int initialized; -}; - -/** - * xmlExternalEntityLoader: - * @URL: The System ID of the resource requested - * @ID: The Public ID of the resource requested - * @context: the XML parser context - * - * External entity loaders types. - * - * Returns the entity input parser. - */ -typedef xmlParserInputPtr (*xmlExternalEntityLoader) (const char *URL, - const char *ID, - xmlParserCtxtPtr context); - -/* - * Global variables: just the default SAX interface tables and XML - * version infos. - */ -#if 0 -LIBXML_DLL_IMPORT extern const char *xmlParserVersion; -#endif - -/* -LIBXML_DLL_IMPORT extern xmlSAXLocator xmlDefaultSAXLocator; -LIBXML_DLL_IMPORT extern xmlSAXHandler xmlDefaultSAXHandler; -LIBXML_DLL_IMPORT extern xmlSAXHandler htmlDefaultSAXHandler; -LIBXML_DLL_IMPORT extern xmlSAXHandler docbDefaultSAXHandler; - */ - -/* - * Entity substitution default behavior. - */ - -#if 0 -LIBXML_DLL_IMPORT extern int xmlSubstituteEntitiesDefaultValue; -LIBXML_DLL_IMPORT extern int xmlGetWarningsDefaultValue; -#endif - -#ifdef __cplusplus -} -#endif -#include "libxml/encoding.h" -#include "libxml/xmlIO.h" -#include "libxml/globals.h" -#ifdef __cplusplus -extern "C" { -#endif - - -/* - * Init/Cleanup - */ -void xmlInitParser (void); -void xmlCleanupParser (void); - -/* - * Input functions - */ -int xmlParserInputRead (xmlParserInputPtr in, - int len); -int xmlParserInputGrow (xmlParserInputPtr in, - int len); - -/* - * xmlChar handling - */ -xmlChar * xmlStrdup (const xmlChar *cur); -xmlChar * xmlStrndup (const xmlChar *cur, - int len); -xmlChar * xmlCharStrndup (const char *cur, - int len); -xmlChar * xmlCharStrdup (const char *cur); -xmlChar * xmlStrsub (const xmlChar *str, - int start, - int len); -const xmlChar * xmlStrchr (const xmlChar *str, - xmlChar val); -const xmlChar * xmlStrstr (const xmlChar *str, - const xmlChar *val); -const xmlChar * xmlStrcasestr (const xmlChar *str, - xmlChar *val); -int xmlStrcmp (const xmlChar *str1, - const xmlChar *str2); -int xmlStrncmp (const xmlChar *str1, - const xmlChar *str2, - int len); -int xmlStrcasecmp (const xmlChar *str1, - const xmlChar *str2); -int xmlStrncasecmp (const xmlChar *str1, - const xmlChar *str2, - int len); -int xmlStrEqual (const xmlChar *str1, - const xmlChar *str2); -int xmlStrlen (const xmlChar *str); -xmlChar * xmlStrcat (xmlChar *cur, - const xmlChar *add); -xmlChar * xmlStrncat (xmlChar *cur, - const xmlChar *add, - int len); - -/* - * Basic parsing Interfaces - */ -xmlDocPtr xmlParseDoc (xmlChar *cur); -xmlDocPtr xmlParseMemory (const char *buffer, - int size); -xmlDocPtr xmlParseFile (const char *filename); -int xmlSubstituteEntitiesDefault(int val); -int xmlKeepBlanksDefault (int val); -void xmlStopParser (xmlParserCtxtPtr ctxt); -int xmlPedanticParserDefault(int val); -int xmlLineNumbersDefault (int val); - -/* - * Recovery mode - */ -xmlDocPtr xmlRecoverDoc (xmlChar *cur); -xmlDocPtr xmlRecoverMemory (const char *buffer, - int size); -xmlDocPtr xmlRecoverFile (const char *filename); - -/* - * Less common routines and SAX interfaces - */ -int xmlParseDocument (xmlParserCtxtPtr ctxt); -int xmlParseExtParsedEnt (xmlParserCtxtPtr ctxt); -xmlDocPtr xmlSAXParseDoc (xmlSAXHandlerPtr sax, - xmlChar *cur, - int recovery); -int xmlSAXUserParseFile (xmlSAXHandlerPtr sax, - void *user_data, - const char *filename); -int xmlSAXUserParseMemory (xmlSAXHandlerPtr sax, - void *user_data, - const char *buffer, - int size); -xmlDocPtr xmlSAXParseMemory (xmlSAXHandlerPtr sax, - const char *buffer, - int size, - int recovery); -xmlDocPtr xmlSAXParseMemoryWithData (xmlSAXHandlerPtr sax, - const char *buffer, - int size, - int recovery, - void *data); -xmlDocPtr xmlSAXParseFile (xmlSAXHandlerPtr sax, - const char *filename, - int recovery); -xmlDocPtr xmlSAXParseFileWithData (xmlSAXHandlerPtr sax, - const char *filename, - int recovery, - void *data); -xmlDocPtr xmlSAXParseEntity (xmlSAXHandlerPtr sax, - const char *filename); -xmlDocPtr xmlParseEntity (const char *filename); -xmlDtdPtr xmlParseDTD (const xmlChar *ExternalID, - const xmlChar *SystemID); -xmlDtdPtr xmlSAXParseDTD (xmlSAXHandlerPtr sax, - const xmlChar *ExternalID, - const xmlChar *SystemID); -xmlDtdPtr xmlIOParseDTD (xmlSAXHandlerPtr sax, - xmlParserInputBufferPtr input, - xmlCharEncoding enc); -int xmlParseBalancedChunkMemory(xmlDocPtr doc, - xmlSAXHandlerPtr sax, - void *user_data, - int depth, - const xmlChar *string, - xmlNodePtr *lst); -int xmlParseBalancedChunkMemoryRecover(xmlDocPtr doc, - xmlSAXHandlerPtr sax, - void *user_data, - int depth, - const xmlChar *string, - xmlNodePtr *lst, - int recover); -int xmlParseExternalEntity (xmlDocPtr doc, - xmlSAXHandlerPtr sax, - void *user_data, - int depth, - const xmlChar *URL, - const xmlChar *ID, - xmlNodePtr *lst); -int xmlParseCtxtExternalEntity(xmlParserCtxtPtr ctx, - const xmlChar *URL, - const xmlChar *ID, - xmlNodePtr *lst); - -/* - * Parser contexts handling. - */ -void xmlInitParserCtxt (xmlParserCtxtPtr ctxt); -void xmlClearParserCtxt (xmlParserCtxtPtr ctxt); -void xmlFreeParserCtxt (xmlParserCtxtPtr ctxt); -void xmlSetupParserForBuffer (xmlParserCtxtPtr ctxt, - const xmlChar* buffer, - const char *filename); -xmlParserCtxtPtr xmlCreateDocParserCtxt (xmlChar *cur); - -/* - * Reading/setting optional parsing features. - */ - -int xmlGetFeaturesList (int *len, - const char **result); -int xmlGetFeature (xmlParserCtxtPtr ctxt, - const char *name, - void *result); -int xmlSetFeature (xmlParserCtxtPtr ctxt, - const char *name, - void *value); - -/* - * Interfaces for the Push mode. - */ -xmlParserCtxtPtr xmlCreatePushParserCtxt(xmlSAXHandlerPtr sax, - void *user_data, - const char *chunk, - int size, - const char *filename); -int xmlParseChunk (xmlParserCtxtPtr ctxt, - const char *chunk, - int size, - int terminate); - -/* - * Special I/O mode. - */ - -xmlParserCtxtPtr xmlCreateIOParserCtxt (xmlSAXHandlerPtr sax, - void *user_data, - xmlInputReadCallback ioread, - xmlInputCloseCallback ioclose, - void *ioctx, - xmlCharEncoding enc); - -xmlParserInputPtr xmlNewIOInputStream (xmlParserCtxtPtr ctxt, - xmlParserInputBufferPtr input, - xmlCharEncoding enc); - -/* - * Node infos. - */ -const xmlParserNodeInfo* - xmlParserFindNodeInfo (const xmlParserCtxtPtr ctxt, - const xmlNodePtr node); -void xmlInitNodeInfoSeq (xmlParserNodeInfoSeqPtr seq); -void xmlClearNodeInfoSeq (xmlParserNodeInfoSeqPtr seq); -unsigned long xmlParserFindNodeInfoIndex(const xmlParserNodeInfoSeqPtr seq, - const xmlNodePtr node); -void xmlParserAddNodeInfo (xmlParserCtxtPtr ctxt, - const xmlParserNodeInfoPtr info); - -/* - * External entities handling actually implemented in xmlIO. - */ - -void xmlSetExternalEntityLoader(xmlExternalEntityLoader f); -xmlExternalEntityLoader - xmlGetExternalEntityLoader(void); -xmlParserInputPtr - xmlLoadExternalEntity (const char *URL, - const char *ID, - xmlParserCtxtPtr ctxt); - -#ifdef __cplusplus -} -#endif -#endif /* __XML_PARSER_H__ */ - diff --git a/plugins/Variables/src/libxml/threads.h b/plugins/Variables/src/libxml/threads.h deleted file mode 100644 index 4ef7a17386..0000000000 --- a/plugins/Variables/src/libxml/threads.h +++ /dev/null @@ -1,62 +0,0 @@ -/** - * threads.c: set of generic threading related routines - * - * See Copyright for the status of this software. - * - * daniel@veillard.com - */ - -#ifndef __XML_THREADS_H__ -#define __XML_THREADS_H__ - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * xmlMutex are a simple mutual exception locks. - */ -typedef struct _xmlMutex xmlMutex; -typedef xmlMutex *xmlMutexPtr; - -/* - * xmlRMutex are reentrant mutual exception locks. - */ -typedef struct _xmlRMutex xmlRMutex; -typedef xmlRMutex *xmlRMutexPtr; - -#ifdef __cplusplus -} -#endif -#include "libxml/globals.h" -#ifdef __cplusplus -extern "C" { -#endif - -xmlMutexPtr xmlNewMutex (void); -void xmlMutexLock (xmlMutexPtr tok); -void xmlMutexUnlock (xmlMutexPtr tok); -void xmlFreeMutex (xmlMutexPtr tok); - -xmlRMutexPtr xmlNewRMutex (void); -void xmlRMutexLock (xmlRMutexPtr tok); -void xmlRMutexUnlock (xmlRMutexPtr tok); -void xmlFreeRMutex (xmlRMutexPtr tok); - -/* - * Library wide APIs. - */ -void xmlInitThreads (void); -void xmlLockLibrary (void); -void xmlUnlockLibrary(void); -int xmlGetThreadId (void); -int xmlIsMainThread (void); -void xmlCleanupThreads(void); -xmlGlobalStatePtr xmlGetGlobalState(void); - -#ifdef __cplusplus -} -#endif - - -#endif /* __XML_THREADS_H__ */ diff --git a/plugins/Variables/src/libxml/tree.h b/plugins/Variables/src/libxml/tree.h deleted file mode 100644 index 1a9fb0036d..0000000000 --- a/plugins/Variables/src/libxml/tree.h +++ /dev/null @@ -1,905 +0,0 @@ -/* - * tree.h : describes the structures found in an tree resulting - * from an XML parsing. - * - * See Copyright for the status of this software. - * - * daniel@veillard.com - * - */ - -#ifndef __XML_TREE_H__ -#define __XML_TREE_H__ - -#include <stdio.h> -#include "libxml/xmlversion.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Some of the basic types pointer to structures: - */ -/* xmlIO.h */ -typedef struct _xmlParserInputBuffer xmlParserInputBuffer; -typedef xmlParserInputBuffer *xmlParserInputBufferPtr; - -typedef struct _xmlOutputBuffer xmlOutputBuffer; -typedef xmlOutputBuffer *xmlOutputBufferPtr; - -/* parser.h */ -typedef struct _xmlParserInput xmlParserInput; -typedef xmlParserInput *xmlParserInputPtr; - -typedef struct _xmlParserCtxt xmlParserCtxt; -typedef xmlParserCtxt *xmlParserCtxtPtr; - -typedef struct _xmlSAXLocator xmlSAXLocator; -typedef xmlSAXLocator *xmlSAXLocatorPtr; - -typedef struct _xmlSAXHandler xmlSAXHandler; -typedef xmlSAXHandler *xmlSAXHandlerPtr; - -/* entities.h */ -typedef struct _xmlEntity xmlEntity; -typedef xmlEntity *xmlEntityPtr; - -/** - * BASE_BUFFER_SIZE: - * - * default buffer size 4000. - */ -#define BASE_BUFFER_SIZE 4000 - -/** - * XML_XML_NAMESPACE: - * - * This is the namespace for the special xml: prefix predefined in the - * XML Namespace specification. - */ -#define XML_XML_NAMESPACE \ - (const xmlChar *) "http://www.w3.org/XML/1998/namespace" - -/* - * The different element types carried by an XML tree. - * - * NOTE: This is synchronized with DOM Level1 values - * See http://www.w3.org/TR/REC-DOM-Level-1/ - * - * Actually this had diverged a bit, and now XML_DOCUMENT_TYPE_NODE should - * be deprecated to use an XML_DTD_NODE. - */ -typedef enum { - XML_ELEMENT_NODE= 1, - XML_ATTRIBUTE_NODE= 2, - XML_TEXT_NODE= 3, - XML_CDATA_SECTION_NODE= 4, - XML_ENTITY_REF_NODE= 5, - XML_ENTITY_NODE= 6, - XML_PI_NODE= 7, - XML_COMMENT_NODE= 8, - XML_DOCUMENT_NODE= 9, - XML_DOCUMENT_TYPE_NODE= 10, - XML_DOCUMENT_FRAG_NODE= 11, - XML_NOTATION_NODE= 12, - XML_HTML_DOCUMENT_NODE= 13, - XML_DTD_NODE= 14, - XML_ELEMENT_DECL= 15, - XML_ATTRIBUTE_DECL= 16, - XML_ENTITY_DECL= 17, - XML_NAMESPACE_DECL= 18, - XML_XINCLUDE_START= 19, - XML_XINCLUDE_END= 20 -#ifdef LIBXML_DOCB_ENABLED - ,XML_DOCB_DOCUMENT_NODE= 21 -#endif -} xmlElementType; - -/** - * xmlChar: - * - * This is a basic byte in an UTF-8 encoded string. - * It's unsigned allowing to pinpoint case where char * are assigned - * to xmlChar * (possibly making serialization back impossible). - */ - -typedef unsigned char xmlChar; - -/** - * BAD_CAST: - * - * Macro to cast a string to an xmlChar * when one know its safe. - */ -#define BAD_CAST (xmlChar *) - -/** - * xmlNotation: - * - * A DTD Notation definition. - */ - -typedef struct _xmlNotation xmlNotation; -typedef xmlNotation *xmlNotationPtr; -struct _xmlNotation { - const xmlChar *name; /* Notation name */ - const xmlChar *PublicID; /* Public identifier, if any */ - const xmlChar *SystemID; /* System identifier, if any */ -}; - -/** - * xmlAttributeType: - * - * A DTD Attribute type definition. - */ - -typedef enum { - XML_ATTRIBUTE_CDATA = 1, - XML_ATTRIBUTE_ID, - XML_ATTRIBUTE_IDREF , - XML_ATTRIBUTE_IDREFS, - XML_ATTRIBUTE_ENTITY, - XML_ATTRIBUTE_ENTITIES, - XML_ATTRIBUTE_NMTOKEN, - XML_ATTRIBUTE_NMTOKENS, - XML_ATTRIBUTE_ENUMERATION, - XML_ATTRIBUTE_NOTATION -} xmlAttributeType; - -/** - * xmlAttributeDefault: - * - * A DTD Attribute default definition. - */ - -typedef enum { - XML_ATTRIBUTE_NONE = 1, - XML_ATTRIBUTE_REQUIRED, - XML_ATTRIBUTE_IMPLIED, - XML_ATTRIBUTE_FIXED -} xmlAttributeDefault; - -/** - * xmlEnumeration: - * - * List structure used when there is an enumeration in DTDs. - */ - -typedef struct _xmlEnumeration xmlEnumeration; -typedef xmlEnumeration *xmlEnumerationPtr; -struct _xmlEnumeration { - struct _xmlEnumeration *next; /* next one */ - const xmlChar *name; /* Enumeration name */ -}; - -/** - * xmlAttribute: - * - * An Attribute declaration in a DTD. - */ - -typedef struct _xmlAttribute xmlAttribute; -typedef xmlAttribute *xmlAttributePtr; -struct _xmlAttribute { - void *_private; /* application data */ - xmlElementType type; /* XML_ATTRIBUTE_DECL, must be second ! */ - const xmlChar *name; /* Attribute name */ - struct _xmlNode *children; /* NULL */ - struct _xmlNode *last; /* NULL */ - struct _xmlDtd *parent; /* -> DTD */ - struct _xmlNode *next; /* next sibling link */ - struct _xmlNode *prev; /* previous sibling link */ - struct _xmlDoc *doc; /* the containing document */ - - struct _xmlAttribute *nexth; /* next in hash table */ - xmlAttributeType atype; /* The attribute type */ - xmlAttributeDefault def; /* the default */ - const xmlChar *defaultValue; /* or the default value */ - xmlEnumerationPtr tree; /* or the enumeration tree if any */ - const xmlChar *prefix; /* the namespace prefix if any */ - const xmlChar *elem; /* Element holding the attribute */ -}; - -/** - * xmlElementContentType: - * - * Possible definitions of element content types. - */ -typedef enum { - XML_ELEMENT_CONTENT_PCDATA = 1, - XML_ELEMENT_CONTENT_ELEMENT, - XML_ELEMENT_CONTENT_SEQ, - XML_ELEMENT_CONTENT_OR -} xmlElementContentType; - -/** - * xmlElementContentOccur: - * - * Possible definitions of element content occurrences. - */ -typedef enum { - XML_ELEMENT_CONTENT_ONCE = 1, - XML_ELEMENT_CONTENT_OPT, - XML_ELEMENT_CONTENT_MULT, - XML_ELEMENT_CONTENT_PLUS -} xmlElementContentOccur; - -/** - * xmlElementContent: - * - * An XML Element content as stored after parsing an element definition - * in a DTD. - */ - -typedef struct _xmlElementContent xmlElementContent; -typedef xmlElementContent *xmlElementContentPtr; -struct _xmlElementContent { - xmlElementContentType type; /* PCDATA, ELEMENT, SEQ or OR */ - xmlElementContentOccur ocur; /* ONCE, OPT, MULT or PLUS */ - const xmlChar *name; /* Element name */ - struct _xmlElementContent *c1; /* first child */ - struct _xmlElementContent *c2; /* second child */ - struct _xmlElementContent *parent; /* parent */ - const xmlChar *prefix; /* Namespace prefix */ -}; - -/** - * xmlElementTypeVal: - * - * The different possibilities for an element content type. - */ - -typedef enum { - XML_ELEMENT_TYPE_UNDEFINED = 0, - XML_ELEMENT_TYPE_EMPTY = 1, - XML_ELEMENT_TYPE_ANY, - XML_ELEMENT_TYPE_MIXED, - XML_ELEMENT_TYPE_ELEMENT -} xmlElementTypeVal; - - -#ifdef __cplusplus -} -#endif -#include "libxml/xmlregexp.h" -#ifdef __cplusplus -extern "C" { -#endif - -/** - * xmlElement: - * - * An XML Element declaration from a DTD. - */ - -typedef struct _xmlElement xmlElement; -typedef xmlElement *xmlElementPtr; -struct _xmlElement { - void *_private; /* application data */ - xmlElementType type; /* XML_ELEMENT_DECL, must be second ! */ - const xmlChar *name; /* Element name */ - struct _xmlNode *children; /* NULL */ - struct _xmlNode *last; /* NULL */ - struct _xmlDtd *parent; /* -> DTD */ - struct _xmlNode *next; /* next sibling link */ - struct _xmlNode *prev; /* previous sibling link */ - struct _xmlDoc *doc; /* the containing document */ - - xmlElementTypeVal etype; /* The type */ - xmlElementContentPtr content; /* the allowed element content */ - xmlAttributePtr attributes; /* List of the declared attributes */ - const xmlChar *prefix; /* the namespace prefix if any */ -#ifdef LIBXML_REGEXP_ENABLED - xmlRegexpPtr contModel; /* the validating regexp */ -#else - void *contModel; -#endif -}; - - -/** - * XML_LOCAL_NAMESPACE: - * - * A namespace declaration node. - */ -#define XML_LOCAL_NAMESPACE XML_NAMESPACE_DECL -typedef xmlElementType xmlNsType; - -/** - * xmlNs: - * - * An XML namespace. - * Note that prefix == NULL is valid, it defines the default namespace - * within the subtree (until overridden). - * - * xmlNsType is unified with xmlElementType. - */ - -typedef struct _xmlNs xmlNs; -typedef xmlNs *xmlNsPtr; -struct _xmlNs { - struct _xmlNs *next; /* next Ns link for this node */ - xmlNsType type; /* global or local */ - const xmlChar *href; /* URL for the namespace */ - const xmlChar *prefix; /* prefix for the namespace */ - void *_private; /* application data */ -}; - -/** - * xmlDtd: - * - * An XML DTD, as defined by <!DOCTYPE ... There is actually one for - * the internal subset and for the external subset. - */ -typedef struct _xmlDtd xmlDtd; -typedef xmlDtd *xmlDtdPtr; -struct _xmlDtd { - void *_private; /* application data */ - xmlElementType type; /* XML_DTD_NODE, must be second ! */ - const xmlChar *name; /* Name of the DTD */ - struct _xmlNode *children; /* the value of the property link */ - struct _xmlNode *last; /* last child link */ - struct _xmlDoc *parent; /* child->parent link */ - struct _xmlNode *next; /* next sibling link */ - struct _xmlNode *prev; /* previous sibling link */ - struct _xmlDoc *doc; /* the containing document */ - - /* End of common part */ - void *notations; /* Hash table for notations if any */ - void *elements; /* Hash table for elements if any */ - void *attributes; /* Hash table for attributes if any */ - void *entities; /* Hash table for entities if any */ - const xmlChar *ExternalID; /* External identifier for PUBLIC DTD */ - const xmlChar *SystemID; /* URI for a SYSTEM or PUBLIC DTD */ - void *pentities; /* Hash table for param entities if any */ -}; - -/** - * xmlAttr: - * - * An attribute on an XML node. - */ -typedef struct _xmlAttr xmlAttr; -typedef xmlAttr *xmlAttrPtr; -struct _xmlAttr { - void *_private; /* application data */ - xmlElementType type; /* XML_ATTRIBUTE_NODE, must be second ! */ - const xmlChar *name; /* the name of the property */ - struct _xmlNode *children; /* the value of the property */ - struct _xmlNode *last; /* NULL */ - struct _xmlNode *parent; /* child->parent link */ - struct _xmlAttr *next; /* next sibling link */ - struct _xmlAttr *prev; /* previous sibling link */ - struct _xmlDoc *doc; /* the containing document */ - xmlNs *ns; /* pointer to the associated namespace */ - xmlAttributeType atype; /* the attribute type if validating */ -}; - -/** - * xmlID: - * - * An XML ID instance. - */ - -typedef struct _xmlID xmlID; -typedef xmlID *xmlIDPtr; -struct _xmlID { - struct _xmlID *next; /* next ID */ - const xmlChar *value; /* The ID name */ - xmlAttrPtr attr; /* The attribute holding it */ - const xmlChar *name; /* The attribute if attr is not available */ - int lineno; /* The line number if attr is not available */ -}; - -/** - * xmlRef: - * - * An XML IDREF instance. - */ - -typedef struct _xmlRef xmlRef; -typedef xmlRef *xmlRefPtr; -struct _xmlRef { - struct _xmlRef *next; /* next Ref */ - const xmlChar *value; /* The Ref name */ - xmlAttrPtr attr; /* The attribute holding it */ - const xmlChar *name; /* The attribute if attr is not available */ - int lineno; /* The line number if attr is not available */ -}; - -/** - * xmlBufferAllocationScheme: - * - * A buffer allocation scheme can be defined to either match exactly the - * need or double it's allocated size each time it is found too small. - */ - -typedef enum { - XML_BUFFER_ALLOC_DOUBLEIT, - XML_BUFFER_ALLOC_EXACT -} xmlBufferAllocationScheme; - -/** - * xmlBuffer: - * - * A buffer structure. - */ -typedef struct _xmlBuffer xmlBuffer; -typedef xmlBuffer *xmlBufferPtr; -struct _xmlBuffer { - xmlChar *content; /* The buffer content UTF8 */ - unsigned int use; /* The buffer size used */ - unsigned int size; /* The buffer size */ - xmlBufferAllocationScheme alloc; /* The realloc method */ -}; - -/** - * xmlNode: - * - * A node in an XML tree. - */ -typedef struct _xmlNode xmlNode; -typedef xmlNode *xmlNodePtr; -struct _xmlNode { - void *_private; /* application data */ - xmlElementType type; /* type number, must be second ! */ - const xmlChar *name; /* the name of the node, or the entity */ - struct _xmlNode *children; /* parent->childs link */ - struct _xmlNode *last; /* last child link */ - struct _xmlNode *parent; /* child->parent link */ - struct _xmlNode *next; /* next sibling link */ - struct _xmlNode *prev; /* previous sibling link */ - struct _xmlDoc *doc; /* the containing document */ - - /* End of common part */ - xmlNs *ns; /* pointer to the associated namespace */ - xmlChar *content; /* the content */ - struct _xmlAttr *properties;/* properties list */ - xmlNs *nsDef; /* namespace definitions on this node */ -}; - -/** - * XML_GET_CONTENT: - * - * Macro to extract the content pointer of a node. - */ -#define XML_GET_CONTENT(n) \ - ((n)->type == XML_ELEMENT_NODE ? NULL : (n)->content) - -/** - * XML_GET_LINE: - * - * Macro to extract the line number of an element node. - * This will work only if line numbering is activated by - * calling xmlLineNumbersDefault(1) before parsing. - */ -#define XML_GET_LINE(n) \ - ((n)->type == XML_ELEMENT_NODE ? (int) (n)->content : 0) - -/** - * xmlDoc: - * - * An XML document. - */ -typedef struct _xmlDoc xmlDoc; -typedef xmlDoc *xmlDocPtr; -struct _xmlDoc { - void *_private; /* application data */ - xmlElementType type; /* XML_DOCUMENT_NODE, must be second ! */ - char *name; /* name/filename/URI of the document */ - struct _xmlNode *children; /* the document tree */ - struct _xmlNode *last; /* last child link */ - struct _xmlNode *parent; /* child->parent link */ - struct _xmlNode *next; /* next sibling link */ - struct _xmlNode *prev; /* previous sibling link */ - struct _xmlDoc *doc; /* autoreference to itself */ - - /* End of common part */ - int compression;/* level of zlib compression */ - int standalone; /* standalone document (no external refs) */ - struct _xmlDtd *intSubset; /* the document internal subset */ - 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 */ - 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; /* encoding of the in-memory content - actually an xmlCharEncoding */ -}; - -/** - * xmlChildrenNode: - * - * Macro for compatibility naming layer with libxml1. - */ -#ifndef xmlChildrenNode -#define xmlChildrenNode children -#endif - -/** - * xmlRootNode: - * - * Macro for compatibility naming layer with libxml1. - */ -#ifndef xmlRootNode -#define xmlRootNode children -#endif - -/* - * Variables. - */ -#if 0 -LIBXML_DLL_IMPORT extern int oldXMLWDcompatibility;/* maintain compatibility with old WD */ -LIBXML_DLL_IMPORT extern int xmlIndentTreeOutput; /* try to indent the tree dumps */ -LIBXML_DLL_IMPORT extern xmlBufferAllocationScheme xmlBufferAllocScheme; /* alloc scheme to use */ -LIBXML_DLL_IMPORT extern int xmlSaveNoEmptyTags; /* save empty tags as <empty></empty> */ -LIBXML_DLL_IMPORT extern int xmlDefaultBufferSize; /* default buffer size */ -#endif - -int xmlValidateNCName (const xmlChar *value, int space); -int xmlValidateQName (const xmlChar *value, int space); -int xmlValidateName (const xmlChar *value, int space); -int xmlValidateNMToken (const xmlChar *value, int space); - -/* - * Handling Buffers. - */ - -void xmlSetBufferAllocationScheme(xmlBufferAllocationScheme scheme); -xmlBufferAllocationScheme xmlGetBufferAllocationScheme(void); - -xmlBufferPtr xmlBufferCreate (void); -xmlBufferPtr xmlBufferCreateSize (size_t size); -int xmlBufferResize (xmlBufferPtr buf, - unsigned int size); -void xmlBufferFree (xmlBufferPtr buf); -int xmlBufferDump (FILE *file, - xmlBufferPtr buf); -void xmlBufferAdd (xmlBufferPtr buf, - const xmlChar *str, - int len); -void xmlBufferAddHead (xmlBufferPtr buf, - const xmlChar *str, - int len); -void xmlBufferCat (xmlBufferPtr buf, - const xmlChar *str); -void xmlBufferCCat (xmlBufferPtr buf, - const char *str); -int xmlBufferShrink (xmlBufferPtr buf, - unsigned int len); -int xmlBufferGrow (xmlBufferPtr buf, - unsigned int len); -void xmlBufferEmpty (xmlBufferPtr buf); -const xmlChar* xmlBufferContent (const xmlBufferPtr buf); -void xmlBufferSetAllocationScheme(xmlBufferPtr buf, - xmlBufferAllocationScheme scheme); -int xmlBufferLength (const xmlBufferPtr buf); - -/* - * Creating/freeing new structures. - */ -xmlDtdPtr xmlCreateIntSubset (xmlDocPtr doc, - const xmlChar *name, - const xmlChar *ExternalID, - const xmlChar *SystemID); -xmlDtdPtr xmlNewDtd (xmlDocPtr doc, - const xmlChar *name, - const xmlChar *ExternalID, - const xmlChar *SystemID); -xmlDtdPtr xmlGetIntSubset (xmlDocPtr doc); -void xmlFreeDtd (xmlDtdPtr cur); -xmlNsPtr xmlNewGlobalNs (xmlDocPtr doc, - const xmlChar *href, - const xmlChar *prefix); -xmlNsPtr xmlNewNs (xmlNodePtr node, - const xmlChar *href, - const xmlChar *prefix); -void xmlFreeNs (xmlNsPtr cur); -void xmlFreeNsList (xmlNsPtr cur); -xmlDocPtr xmlNewDoc (const xmlChar *version); -void xmlFreeDoc (xmlDocPtr cur); -xmlAttrPtr xmlNewDocProp (xmlDocPtr doc, - const xmlChar *name, - const xmlChar *value); -xmlAttrPtr xmlNewProp (xmlNodePtr node, - const xmlChar *name, - const xmlChar *value); -xmlAttrPtr xmlNewNsProp (xmlNodePtr node, - xmlNsPtr ns, - const xmlChar *name, - const xmlChar *value); -xmlAttrPtr xmlNewNsPropEatName (xmlNodePtr node, - xmlNsPtr ns, - xmlChar *name, - const xmlChar *value); -void xmlFreePropList (xmlAttrPtr cur); -void xmlFreeProp (xmlAttrPtr cur); -xmlAttrPtr xmlCopyProp (xmlNodePtr target, - xmlAttrPtr cur); -xmlAttrPtr xmlCopyPropList (xmlNodePtr target, - xmlAttrPtr cur); -xmlDtdPtr xmlCopyDtd (xmlDtdPtr dtd); -xmlDocPtr xmlCopyDoc (xmlDocPtr doc, - int recursive); - -/* - * Creating new nodes. - */ -xmlNodePtr xmlNewDocNode (xmlDocPtr doc, - xmlNsPtr ns, - const xmlChar *name, - const xmlChar *content); -xmlNodePtr xmlNewDocNodeEatName (xmlDocPtr doc, - xmlNsPtr ns, - xmlChar *name, - const xmlChar *content); -xmlNodePtr xmlNewDocRawNode (xmlDocPtr doc, - xmlNsPtr ns, - const xmlChar *name, - const xmlChar *content); -xmlNodePtr xmlNewNode (xmlNsPtr ns, - const xmlChar *name); -xmlNodePtr xmlNewNodeEatName (xmlNsPtr ns, - xmlChar *name); -xmlNodePtr xmlNewChild (xmlNodePtr parent, - xmlNsPtr ns, - const xmlChar *name, - const xmlChar *content); -xmlNodePtr xmlNewTextChild (xmlNodePtr parent, - xmlNsPtr ns, - const xmlChar *name, - const xmlChar *content); -xmlNodePtr xmlNewDocText (xmlDocPtr doc, - const xmlChar *content); -xmlNodePtr xmlNewText (const xmlChar *content); -xmlNodePtr xmlNewPI (const xmlChar *name, - const xmlChar *content); -xmlNodePtr xmlNewDocTextLen (xmlDocPtr doc, - const xmlChar *content, - int len); -xmlNodePtr xmlNewTextLen (const xmlChar *content, - int len); -xmlNodePtr xmlNewDocComment (xmlDocPtr doc, - const xmlChar *content); -xmlNodePtr xmlNewComment (const xmlChar *content); -xmlNodePtr xmlNewCDataBlock (xmlDocPtr doc, - const xmlChar *content, - int len); -xmlNodePtr xmlNewCharRef (xmlDocPtr doc, - const xmlChar *name); -xmlNodePtr xmlNewReference (xmlDocPtr doc, - const xmlChar *name); -xmlNodePtr xmlCopyNode (const xmlNodePtr node, - int recursive); -xmlNodePtr xmlDocCopyNode (const xmlNodePtr node, - xmlDocPtr doc, - int recursive); -xmlNodePtr xmlCopyNodeList (const xmlNodePtr node); -xmlNodePtr xmlNewDocFragment (xmlDocPtr doc); - -/* - * Navigating. - */ -long xmlGetLineNo (xmlNodePtr node); -xmlChar * xmlGetNodePath (xmlNodePtr node); -xmlNodePtr xmlDocGetRootElement (xmlDocPtr doc); -xmlNodePtr xmlGetLastChild (xmlNodePtr parent); -int xmlNodeIsText (xmlNodePtr node); -int xmlIsBlankNode (xmlNodePtr node); - -/* - * Changing the structure. - */ -xmlNodePtr xmlDocSetRootElement (xmlDocPtr doc, - xmlNodePtr root); -void xmlNodeSetName (xmlNodePtr cur, - const xmlChar *name); -xmlNodePtr xmlAddChild (xmlNodePtr parent, - xmlNodePtr cur); -xmlNodePtr xmlAddChildList (xmlNodePtr parent, - xmlNodePtr cur); -xmlNodePtr xmlReplaceNode (xmlNodePtr old, - xmlNodePtr cur); -xmlNodePtr xmlAddSibling (xmlNodePtr cur, - xmlNodePtr elem); -xmlNodePtr xmlAddPrevSibling (xmlNodePtr cur, - xmlNodePtr elem); -xmlNodePtr xmlAddNextSibling (xmlNodePtr cur, - xmlNodePtr elem); -void xmlUnlinkNode (xmlNodePtr cur); -xmlNodePtr xmlTextMerge (xmlNodePtr first, - xmlNodePtr second); -void xmlTextConcat (xmlNodePtr node, - const xmlChar *content, - int len); -void xmlFreeNodeList (xmlNodePtr cur); -void xmlFreeNode (xmlNodePtr cur); -void xmlSetTreeDoc (xmlNodePtr tree, - xmlDocPtr doc); -void xmlSetListDoc (xmlNodePtr list, - xmlDocPtr doc); - -/* - * Namespaces. - */ -xmlNsPtr xmlSearchNs (xmlDocPtr doc, - xmlNodePtr node, - const xmlChar *nameSpace); -xmlNsPtr xmlSearchNsByHref (xmlDocPtr doc, - xmlNodePtr node, - const xmlChar *href); -xmlNsPtr * xmlGetNsList (xmlDocPtr doc, - xmlNodePtr node); -void xmlSetNs (xmlNodePtr node, - xmlNsPtr ns); -xmlNsPtr xmlCopyNamespace (xmlNsPtr cur); -xmlNsPtr xmlCopyNamespaceList (xmlNsPtr cur); - -/* - * Changing the content. - */ -xmlAttrPtr xmlSetProp (xmlNodePtr node, - const xmlChar *name, - const xmlChar *value); -xmlChar * xmlGetProp (xmlNodePtr node, - const xmlChar *name); -xmlChar * xmlGetNoNsProp (xmlNodePtr node, - const xmlChar *name); -xmlAttrPtr xmlHasProp (xmlNodePtr node, - const xmlChar *name); -xmlAttrPtr xmlHasNsProp (xmlNodePtr node, - const xmlChar *name, - const xmlChar *nameSpace); -xmlAttrPtr xmlSetNsProp (xmlNodePtr node, - xmlNsPtr ns, - const xmlChar *name, - const xmlChar *value); -xmlChar * xmlGetNsProp (xmlNodePtr node, - const xmlChar *name, - const xmlChar *nameSpace); -xmlNodePtr xmlStringGetNodeList (xmlDocPtr doc, - const xmlChar *value); -xmlNodePtr xmlStringLenGetNodeList (xmlDocPtr doc, - const xmlChar *value, - int len); -xmlChar * xmlNodeListGetString (xmlDocPtr doc, - xmlNodePtr list, - int inLine); -xmlChar * xmlNodeListGetRawString (xmlDocPtr doc, - xmlNodePtr list, - int inLine); -void xmlNodeSetContent (xmlNodePtr cur, - const xmlChar *content); -void xmlNodeSetContentLen (xmlNodePtr cur, - const xmlChar *content, - int len); -void xmlNodeAddContent (xmlNodePtr cur, - const xmlChar *content); -void xmlNodeAddContentLen (xmlNodePtr cur, - const xmlChar *content, - int len); -xmlChar * xmlNodeGetContent (xmlNodePtr cur); -xmlChar * xmlNodeGetLang (xmlNodePtr cur); -void xmlNodeSetLang (xmlNodePtr cur, - const xmlChar *lang); -int xmlNodeGetSpacePreserve (xmlNodePtr cur); -void xmlNodeSetSpacePreserve (xmlNodePtr cur, - int val); -xmlChar * xmlNodeGetBase (xmlDocPtr doc, - xmlNodePtr cur); -void xmlNodeSetBase (xmlNodePtr cur, - xmlChar *uri); - -/* - * Removing content. - */ -int xmlRemoveProp (xmlAttrPtr cur); -int xmlUnsetProp (xmlNodePtr node, - const xmlChar *name); -int xmlUnsetNsProp (xmlNodePtr node, - xmlNsPtr ns, - const xmlChar *name); - -/* - * Internal, don't use. - */ -void xmlBufferWriteCHAR (xmlBufferPtr buf, - const xmlChar *string); -void xmlBufferWriteChar (xmlBufferPtr buf, - const char *string); -void xmlBufferWriteQuotedString(xmlBufferPtr buf, - const xmlChar *string); - -/* - * Namespace handling. - */ -int xmlReconciliateNs (xmlDocPtr doc, - xmlNodePtr tree); - -/* - * Saving. - */ -void xmlDocDumpFormatMemory (xmlDocPtr cur, - xmlChar **mem, - int *size, - int format); -void xmlDocDumpMemory (xmlDocPtr cur, - xmlChar **mem, - int *size); -void xmlDocDumpMemoryEnc (xmlDocPtr out_doc, - xmlChar **doc_txt_ptr, - int * doc_txt_len, - const char *txt_encoding); -void xmlDocDumpFormatMemoryEnc(xmlDocPtr out_doc, - xmlChar **doc_txt_ptr, - int * doc_txt_len, - const char *txt_encoding, - int format); -int xmlDocFormatDump(FILE *f, - xmlDocPtr cur, - int format); -int xmlDocDump (FILE *f, - xmlDocPtr cur); -void xmlElemDump (FILE *f, - xmlDocPtr doc, - xmlNodePtr cur); -int xmlSaveFile (const char *filename, - xmlDocPtr cur); -int xmlSaveFormatFile (const char *filename, - xmlDocPtr cur, - int format); -int xmlNodeDump (xmlBufferPtr buf, - xmlDocPtr doc, - xmlNodePtr cur, - int level, - int format); - -int xmlSaveFileTo (xmlOutputBufferPtr buf, - xmlDocPtr cur, - const char *encoding); -int xmlSaveFormatFileTo (xmlOutputBufferPtr buf, - xmlDocPtr cur, - const char *encoding, - int format); -void xmlNodeDumpOutput (xmlOutputBufferPtr buf, - xmlDocPtr doc, - xmlNodePtr cur, - int level, - int format, - const char *encoding); - -int xmlSaveFormatFileEnc (const char *filename, - xmlDocPtr cur, - const char *encoding, - int format); - -int xmlSaveFileEnc (const char *filename, - xmlDocPtr cur, - const char *encoding); - -/* - * XHTML - */ -int xmlIsXHTML (const xmlChar *systemID, - const xmlChar *publicID); - -/* - * Compression. - */ -int xmlGetDocCompressMode (xmlDocPtr doc); -void xmlSetDocCompressMode (xmlDocPtr doc, - int mode); -int xmlGetCompressMode (void); -void xmlSetCompressMode (int mode); - -#ifdef __cplusplus -} -#endif -#ifndef __XML_PARSER_H__ -#include <libxml/xmlmemory.h> -#endif - -#endif /* __XML_TREE_H__ */ - diff --git a/plugins/Variables/src/libxml/valid.h b/plugins/Variables/src/libxml/valid.h deleted file mode 100644 index dbf2aba562..0000000000 --- a/plugins/Variables/src/libxml/valid.h +++ /dev/null @@ -1,330 +0,0 @@ -/* - * valid.h : interface to the DTD handling and the validity checking - * - * See Copyright for the status of this software. - * - * daniel@veillard.com - */ - - -#ifndef __XML_VALID_H__ -#define __XML_VALID_H__ - -#include "libxml/tree.h" -#include "libxml/list.h" -#include "libxml/xmlautomata.h" -#include "libxml/xmlregexp.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Validation state added for non-determinist content model. - */ -typedef struct _xmlValidState xmlValidState; -typedef xmlValidState *xmlValidStatePtr; - -/** - * xmlValidityErrorFunc: - * @ctx: an xmlValidCtxtPtr validity error context - * @msg: the string to format *printf like vararg - * @...: remaining arguments to the format - * - * Callback called when a validity error is found. This is a message - * oriented function similar to an *printf function. - */ -typedef void (*xmlValidityErrorFunc) (void *ctx, - const char *msg, - ...); - -/** - * xmlValidityWarningFunc: - * @ctx: an xmlValidCtxtPtr validity error context - * @msg: the string to format *printf like vararg - * @...: remaining arguments to the format - * - * Callback called when a validity warning is found. This is a message - * oriented function similar to an *printf function. - */ -typedef void (*xmlValidityWarningFunc) (void *ctx, - const char *msg, - ...); - -/** - * xmlValidCtxt: - * An xmlValidCtxt is used for error reporting when validating. - */ -typedef struct _xmlValidCtxt xmlValidCtxt; -typedef xmlValidCtxt *xmlValidCtxtPtr; -struct _xmlValidCtxt { - void *userData; /* user specific data block */ - xmlValidityErrorFunc error; /* the callback in case of errors */ - xmlValidityWarningFunc warning; /* the callback in case of warning */ - - /* Node analysis stack used when validating within entities */ - xmlNodePtr node; /* Current parsed Node */ - int nodeNr; /* Depth of the parsing stack */ - int nodeMax; /* Max depth of the parsing stack */ - xmlNodePtr *nodeTab; /* array of nodes */ - - int finishDtd; /* finished validating the Dtd ? */ - xmlDocPtr doc; /* the document */ - int valid; /* temporary validity check result */ - - /* state state used for non-determinist content validation */ - xmlValidState *vstate; /* current state */ - int vstateNr; /* Depth of the validation stack */ - int vstateMax; /* Max depth of the validation stack */ - xmlValidState *vstateTab; /* array of validation states */ - -#ifdef LIBXML_REGEXP_ENABLED - xmlAutomataPtr am; /* the automata */ - xmlAutomataStatePtr state; /* used to build the automata */ -#else - void *am; - void *state; -#endif -}; - -/* - * ALL notation declarations are stored in a table. - * There is one table per DTD. - */ - -typedef struct _xmlHashTable xmlNotationTable; -typedef xmlNotationTable *xmlNotationTablePtr; - -/* - * ALL element declarations are stored in a table. - * There is one table per DTD. - */ - -typedef struct _xmlHashTable xmlElementTable; -typedef xmlElementTable *xmlElementTablePtr; - -/* - * ALL attribute declarations are stored in a table. - * There is one table per DTD. - */ - -typedef struct _xmlHashTable xmlAttributeTable; -typedef xmlAttributeTable *xmlAttributeTablePtr; - -/* - * ALL IDs attributes are stored in a table. - * There is one table per document. - */ - -typedef struct _xmlHashTable xmlIDTable; -typedef xmlIDTable *xmlIDTablePtr; - -/* - * ALL Refs attributes are stored in a table. - * There is one table per document. - */ - -typedef struct _xmlHashTable xmlRefTable; -typedef xmlRefTable *xmlRefTablePtr; - -/* helper */ -xmlChar * xmlSplitQName2 (const xmlChar *name, - xmlChar **prefix); - -/* Notation */ -xmlNotationPtr xmlAddNotationDecl (xmlValidCtxtPtr ctxt, - xmlDtdPtr dtd, - const xmlChar *name, - const xmlChar *PublicID, - const xmlChar *SystemID); -xmlNotationTablePtr xmlCopyNotationTable(xmlNotationTablePtr table); -void xmlFreeNotationTable(xmlNotationTablePtr table); -void xmlDumpNotationDecl (xmlBufferPtr buf, - xmlNotationPtr nota); -void xmlDumpNotationTable(xmlBufferPtr buf, - xmlNotationTablePtr table); - -/* Element Content */ -xmlElementContentPtr xmlNewElementContent (xmlChar *name, - xmlElementContentType type); -xmlElementContentPtr xmlCopyElementContent(xmlElementContentPtr content); -void xmlFreeElementContent(xmlElementContentPtr cur); -void xmlSnprintfElementContent(char *buf, - int size, - xmlElementContentPtr content, - int glob); -/* DEPRECATED */ -void xmlSprintfElementContent(char *buf, - xmlElementContentPtr content, - int glob); -/* DEPRECATED */ - -/* Element */ -xmlElementPtr xmlAddElementDecl (xmlValidCtxtPtr ctxt, - xmlDtdPtr dtd, - const xmlChar *name, - xmlElementTypeVal type, - xmlElementContentPtr content); -xmlElementTablePtr xmlCopyElementTable (xmlElementTablePtr table); -void xmlFreeElementTable (xmlElementTablePtr table); -void xmlDumpElementTable (xmlBufferPtr buf, - xmlElementTablePtr table); -void xmlDumpElementDecl (xmlBufferPtr buf, - xmlElementPtr elem); - -/* Enumeration */ -xmlEnumerationPtr xmlCreateEnumeration (xmlChar *name); -void xmlFreeEnumeration (xmlEnumerationPtr cur); -xmlEnumerationPtr xmlCopyEnumeration (xmlEnumerationPtr cur); - -/* Attribute */ -xmlAttributePtr xmlAddAttributeDecl (xmlValidCtxtPtr ctxt, - xmlDtdPtr dtd, - const xmlChar *elem, - const xmlChar *name, - const xmlChar *ns, - xmlAttributeType type, - xmlAttributeDefault def, - const xmlChar *defaultValue, - xmlEnumerationPtr tree); -xmlAttributeTablePtr xmlCopyAttributeTable (xmlAttributeTablePtr table); -void xmlFreeAttributeTable (xmlAttributeTablePtr table); -void xmlDumpAttributeTable (xmlBufferPtr buf, - xmlAttributeTablePtr table); -void xmlDumpAttributeDecl (xmlBufferPtr buf, - xmlAttributePtr attr); - -/* IDs */ -xmlIDPtr xmlAddID (xmlValidCtxtPtr ctxt, - xmlDocPtr doc, - const xmlChar *value, - xmlAttrPtr attr); -void xmlFreeIDTable (xmlIDTablePtr table); -xmlAttrPtr xmlGetID (xmlDocPtr doc, - const xmlChar *ID); -int xmlIsID (xmlDocPtr doc, - xmlNodePtr elem, - xmlAttrPtr attr); -int xmlRemoveID (xmlDocPtr doc, xmlAttrPtr attr); - -/* IDREFs */ -xmlRefPtr xmlAddRef (xmlValidCtxtPtr ctxt, - xmlDocPtr doc, - const xmlChar *value, - xmlAttrPtr attr); -void xmlFreeRefTable (xmlRefTablePtr table); -int xmlIsRef (xmlDocPtr doc, - xmlNodePtr elem, - xmlAttrPtr attr); -int xmlRemoveRef (xmlDocPtr doc, xmlAttrPtr attr); -xmlListPtr xmlGetRefs (xmlDocPtr doc, - const xmlChar *ID); - -/** - * The public function calls related to validity checking. - */ - -int xmlValidateRoot (xmlValidCtxtPtr ctxt, - xmlDocPtr doc); -int xmlValidateElementDecl (xmlValidCtxtPtr ctxt, - xmlDocPtr doc, - xmlElementPtr elem); -xmlChar * xmlValidNormalizeAttributeValue(xmlDocPtr doc, - xmlNodePtr elem, - const xmlChar *name, - const xmlChar *value); -xmlChar * xmlValidCtxtNormalizeAttributeValue(xmlValidCtxtPtr ctxt, - xmlDocPtr doc, - xmlNodePtr elem, - const xmlChar *name, - const xmlChar *value); -int xmlValidateAttributeDecl(xmlValidCtxtPtr ctxt, - xmlDocPtr doc, - xmlAttributePtr attr); -int xmlValidateAttributeValue(xmlAttributeType type, - const xmlChar *value); -int xmlValidateNotationDecl (xmlValidCtxtPtr ctxt, - xmlDocPtr doc, - xmlNotationPtr nota); -int xmlValidateDtd (xmlValidCtxtPtr ctxt, - xmlDocPtr doc, - xmlDtdPtr dtd); -int xmlValidateDtdFinal (xmlValidCtxtPtr ctxt, - xmlDocPtr doc); -int xmlValidateDocument (xmlValidCtxtPtr ctxt, - xmlDocPtr doc); -int xmlValidateElement (xmlValidCtxtPtr ctxt, - xmlDocPtr doc, - xmlNodePtr elem); -int xmlValidateOneElement (xmlValidCtxtPtr ctxt, - xmlDocPtr doc, - xmlNodePtr elem); -int xmlValidateOneAttribute (xmlValidCtxtPtr ctxt, - xmlDocPtr doc, - xmlNodePtr elem, - xmlAttrPtr attr, - const xmlChar *value); -int xmlValidateOneNamespace (xmlValidCtxtPtr ctxt, - xmlDocPtr doc, - xmlNodePtr elem, - const xmlChar *prefix, - xmlNsPtr ns, - const xmlChar *value); -int xmlValidateDocumentFinal(xmlValidCtxtPtr ctxt, - xmlDocPtr doc); -int xmlValidateNotationUse (xmlValidCtxtPtr ctxt, - xmlDocPtr doc, - const xmlChar *notationName); -int xmlIsMixedElement (xmlDocPtr doc, - const xmlChar *name); -xmlAttributePtr xmlGetDtdAttrDesc (xmlDtdPtr dtd, - const xmlChar *elem, - const xmlChar *name); -xmlAttributePtr xmlGetDtdQAttrDesc (xmlDtdPtr dtd, - const xmlChar *elem, - const xmlChar *name, - const xmlChar *prefix); -xmlNotationPtr xmlGetDtdNotationDesc (xmlDtdPtr dtd, - const xmlChar *name); -xmlElementPtr xmlGetDtdQElementDesc (xmlDtdPtr dtd, - const xmlChar *name, - const xmlChar *prefix); -xmlElementPtr xmlGetDtdElementDesc (xmlDtdPtr dtd, - const xmlChar *name); - -int xmlValidGetValidElements(xmlNode *prev, - xmlNode *next, - const xmlChar **list, - int max); -int xmlValidGetPotentialChildren(xmlElementContent *ctree, - const xmlChar **list, - int *len, - int max); -int xmlValidateNameValue (const xmlChar *value); -int xmlValidateNamesValue (const xmlChar *value); -int xmlValidateNmtokenValue (const xmlChar *value); -int xmlValidateNmtokensValue(const xmlChar *value); - -#ifdef LIBXML_REGEXP_ENABLED -/* - * Validation based on the regexp support - */ -int xmlValidBuildContentModel(xmlValidCtxtPtr ctxt, - xmlElementPtr elem); - -int xmlValidatePushElement (xmlValidCtxtPtr ctxt, - xmlDocPtr doc, - xmlNodePtr elem, - const xmlChar *qname); -int xmlValidatePushCData (xmlValidCtxtPtr ctxt, - const xmlChar *data, - int len); -int xmlValidatePopElement (xmlValidCtxtPtr ctxt, - xmlDocPtr doc, - xmlNodePtr elem, - const xmlChar *qname); -#endif /* LIBXML_REGEXP_ENABLED */ -#ifdef __cplusplus -} -#endif -#endif /* __XML_VALID_H__ */ diff --git a/plugins/Variables/src/libxml/xinclude.h b/plugins/Variables/src/libxml/xinclude.h deleted file mode 100644 index f59020f7a2..0000000000 --- a/plugins/Variables/src/libxml/xinclude.h +++ /dev/null @@ -1,26 +0,0 @@ -/* - * xinclude.c : API to handle XInclude processing - * - * World Wide Web Consortium Working Draft 26 October 2000 - * http://www.w3.org/TR/2000/WD-xinclude-20001026 - * - * See Copyright for the status of this software. - * - * daniel@veillard.com - */ - -#ifndef __XML_XINCLUDE_H__ -#define __XML_XINCLUDE_H__ - -#include "libxml/tree.h" - -#ifdef __cplusplus -extern "C" { -#endif - -int xmlXIncludeProcess (xmlDocPtr doc); - -#ifdef __cplusplus -} -#endif -#endif /* __XML_XINCLUDE_H__ */ diff --git a/plugins/Variables/src/libxml/xlink.h b/plugins/Variables/src/libxml/xlink.h deleted file mode 100644 index b5a0f91067..0000000000 --- a/plugins/Variables/src/libxml/xlink.h +++ /dev/null @@ -1,180 +0,0 @@ -/* - * xlink.h : interfaces to the hyperlinks detection module - * - * See Copyright for the status of this software. - * - * Related specification: http://www.w3.org/TR/xlink - * http://www.w3.org/HTML/ - * and XBase - * - * daniel@veillard.com - */ - -#ifndef __XML_XLINK_H__ -#define __XML_XLINK_H__ - -#include "libxml/tree.h" - -#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-Refences 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. - */ - -xlinkNodeDetectFunc xlinkGetDefaultDetect (void); -void xlinkSetDefaultDetect (xlinkNodeDetectFunc func); - -/* - * Routines to set/get the default handlers. - */ -xlinkHandlerPtr xlinkGetDefaultHandler (void); -void xlinkSetDefaultHandler (xlinkHandlerPtr handler); - -/* - * Link detection module itself. - */ -xlinkType xlinkIsLink (xmlDocPtr doc, - xmlNodePtr node); - -#ifdef __cplusplus -} -#endif -#endif /* __XML_XLINK_H__ */ diff --git a/plugins/Variables/src/libxml/xmlIO.h b/plugins/Variables/src/libxml/xmlIO.h deleted file mode 100644 index a6870fc51b..0000000000 --- a/plugins/Variables/src/libxml/xmlIO.h +++ /dev/null @@ -1,287 +0,0 @@ -/* - * xmlIO.h : interface for the I/O interfaces used by the parser - * - * See Copyright for the status of this software. - * - * daniel@veillard.com - * - */ - -#ifndef __XML_IO_H__ -#define __XML_IO_H__ - -#include <stdio.h> -#include "libxml/xmlversion.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Those are the functions and datatypes for the parser input - * I/O structures. - */ - -/** - * xmlInputMatchCallback: - * @filename: the filename or URI - * - * Callback used in the I/O Input API to detect if the current handler - * can provide input fonctionnalities for this resource. - * - * Returns 1 if yes and 0 if another Input module should be used - */ -typedef int (*xmlInputMatchCallback) (char const *filename); -/** - * xmlInputOpenCallback: - * @filename: the filename or URI - * - * Callback used in the I/O Input API to open the resource - * - * Returns an Input context or NULL in case or error - */ -typedef void * (*xmlInputOpenCallback) (char const *filename); -/** - * xmlInputReadCallback: - * @context: an Input context - * @buffer: the buffer to store data read - * @len: the length of the buffer in bytes - * - * Callback used in the I/O Input API to read the resource - * - * Returns the number of bytes read or -1 in case of error - */ -typedef int (*xmlInputReadCallback) (void * context, char * buffer, int len); -/** - * xmlInputCloseCallback: - * @context: an Input context - * - * Callback used in the I/O Input API to close the resource - * - * Returns 0 or -1 in case of error - */ -typedef int (*xmlInputCloseCallback) (void * context); - -/* - * Those are the functions and datatypes for the library output - * I/O structures. - */ - -/** - * xmlOutputMatchCallback: - * @filename: the filename or URI - * - * Callback used in the I/O Output API to detect if the current handler - * can provide output fonctionnalities for this resource. - * - * Returns 1 if yes and 0 if another Output module should be used - */ -typedef int (*xmlOutputMatchCallback) (char const *filename); -/** - * xmlOutputOpenCallback: - * @filename: the filename or URI - * - * Callback used in the I/O Output API to open the resource - * - * Returns an Output context or NULL in case or error - */ -typedef void * (*xmlOutputOpenCallback) (char const *filename); -/** - * xmlOutputWriteCallback: - * @context: an Output context - * @buffer: the buffer of data to write - * @len: the length of the buffer in bytes - * - * Callback used in the I/O Output API to write to the resource - * - * Returns the number of bytes written or -1 in case of error - */ -typedef int (*xmlOutputWriteCallback) (void * context, const char * buffer, - int len); -/** - * xmlOutputCloseCallback: - * @context: an Output context - * - * Callback used in the I/O Output API to close the resource - * - * Returns 0 or -1 in case of error - */ -typedef int (*xmlOutputCloseCallback) (void * context); - -#ifdef __cplusplus -} -#endif - -#include "libxml/globals.h" -#include "libxml/tree.h" -#include "libxml/parser.h" -#include "libxml/encoding.h" - -#ifdef __cplusplus -extern "C" { -#endif -struct _xmlParserInputBuffer { - void* context; - xmlInputReadCallback readcallback; - xmlInputCloseCallback closecallback; - - xmlCharEncodingHandlerPtr encoder; /* I18N conversions to UTF-8 */ - - xmlBufferPtr buffer; /* Local buffer encoded in UTF-8 */ - xmlBufferPtr raw; /* if encoder != NULL buffer for raw input */ -}; - - -struct _xmlOutputBuffer { - void* context; - xmlOutputWriteCallback writecallback; - xmlOutputCloseCallback closecallback; - - xmlCharEncodingHandlerPtr encoder; /* I18N conversions to UTF-8 */ - - xmlBufferPtr buffer; /* Local buffer encoded in UTF-8 or ISOLatin */ - xmlBufferPtr conv; /* if encoder != NULL buffer for output */ - int written; /* total number of byte written */ -}; - -/* - * Interfaces for input - */ -void xmlCleanupInputCallbacks (void); -void xmlCleanupOutputCallbacks (void); - -void xmlRegisterDefaultInputCallbacks (void); -xmlParserInputBufferPtr - xmlAllocParserInputBuffer (xmlCharEncoding enc); - -xmlParserInputBufferPtr - xmlParserInputBufferCreateFilename (const char *URI, - xmlCharEncoding enc); -xmlParserInputBufferPtr - xmlParserInputBufferCreateFile (FILE *file, - xmlCharEncoding enc); -xmlParserInputBufferPtr - xmlParserInputBufferCreateFd (int fd, - xmlCharEncoding enc); -xmlParserInputBufferPtr - xmlParserInputBufferCreateMem (const char *mem, int size, - xmlCharEncoding enc); -xmlParserInputBufferPtr - xmlParserInputBufferCreateIO (xmlInputReadCallback ioread, - xmlInputCloseCallback ioclose, - void *ioctx, - xmlCharEncoding enc); -int xmlParserInputBufferRead (xmlParserInputBufferPtr in, - int len); -int xmlParserInputBufferGrow (xmlParserInputBufferPtr in, - int len); -int xmlParserInputBufferPush (xmlParserInputBufferPtr in, - int len, - const char *buf); -void xmlFreeParserInputBuffer (xmlParserInputBufferPtr in); -char * xmlParserGetDirectory (const char *filename); - -int xmlRegisterInputCallbacks (xmlInputMatchCallback matchFunc, - xmlInputOpenCallback openFunc, - xmlInputReadCallback readFunc, - xmlInputCloseCallback closeFunc); -/* - * Interfaces for output - */ -void xmlRegisterDefaultOutputCallbacks(void); -xmlOutputBufferPtr - xmlAllocOutputBuffer (xmlCharEncodingHandlerPtr encoder); - -xmlOutputBufferPtr - xmlOutputBufferCreateFilename (const char *URI, - xmlCharEncodingHandlerPtr encoder, - int compression); - -xmlOutputBufferPtr - xmlOutputBufferCreateFile (FILE *file, - xmlCharEncodingHandlerPtr encoder); - -xmlOutputBufferPtr - xmlOutputBufferCreateFd (int fd, - xmlCharEncodingHandlerPtr encoder); - -xmlOutputBufferPtr - xmlOutputBufferCreateIO (xmlOutputWriteCallback iowrite, - xmlOutputCloseCallback ioclose, - void *ioctx, - xmlCharEncodingHandlerPtr encoder); - -int xmlOutputBufferWrite (xmlOutputBufferPtr out, - int len, - const char *buf); -int xmlOutputBufferWriteString (xmlOutputBufferPtr out, - const char *str); - -int xmlOutputBufferFlush (xmlOutputBufferPtr out); -int xmlOutputBufferClose (xmlOutputBufferPtr out); - -int xmlRegisterOutputCallbacks (xmlOutputMatchCallback matchFunc, - xmlOutputOpenCallback openFunc, - xmlOutputWriteCallback writeFunc, - xmlOutputCloseCallback closeFunc); - -/* This function only exists if HTTP support built into the library */ -#ifdef LIBXML_HTTP_ENABLED -void * xmlIOHTTPOpenW (const char * post_uri, - int compression ); -void xmlRegisterHTTPPostCallbacks (void ); -#endif - -/* - * A predefined entity loader disabling network accesses - */ -xmlParserInputPtr xmlNoNetExternalEntityLoader(const char *URL, - const char *ID, - xmlParserCtxtPtr ctxt); - -/* - * xmlNormalizeWindowsPath is obsolete, don't use it. - * Check xmlCanonicPath in uri.h for a better alternative. - */ -xmlChar * xmlNormalizeWindowsPath (const xmlChar *path); - -int xmlCheckFilename (const char *path); -/** - * Default 'file://' protocol callbacks - */ -int xmlFileMatch (const char *filename); -void * xmlFileOpen (const char *filename); -int xmlFileRead (void * context, - char * buffer, - int len); -int xmlFileClose (void * context); - -/** - * Default 'http://' protocol callbacks - */ -#ifdef LIBXML_HTTP_ENABLED -int xmlIOHTTPMatch (const char *filename); -void * xmlIOHTTPOpen (const char *filename); -int xmlIOHTTPRead (void * context, - char * buffer, - int len); -int xmlIOHTTPClose (void * context); -#endif /* LIBXML_HTTP_ENABLED */ - -/** - * Default 'ftp://' protocol callbacks - */ -#ifdef LIBXML_FTP_ENABLED -int xmlIOFTPMatch (const char *filename); -void * xmlIOFTPOpen (const char *filename); -int xmlIOFTPRead (void * context, - char * buffer, - int len); -int xmlIOFTPClose (void * context); -#endif /* LIBXML_FTP_ENABLED */ - -#ifdef __cplusplus -} -#endif - -#endif /* __XML_IO_H__ */ diff --git a/plugins/Variables/src/libxml/xmlautomata.h b/plugins/Variables/src/libxml/xmlautomata.h deleted file mode 100644 index cc25e0b715..0000000000 --- a/plugins/Variables/src/libxml/xmlautomata.h +++ /dev/null @@ -1,94 +0,0 @@ -/* - * automata.h : description of the API to build regexp automats - * - * See Copyright for the status of this software. - * - * Daniel Veillard <veillard@redhat.com> - */ - -#ifndef __XML_AUTOMATA_H__ -#define __XML_AUTOMATA_H__ - -#include "libxml/xmlversion.h" -#include "libxml/tree.h" - -#ifdef LIBXML_AUTOMATA_ENABLED -#include "libxml/xmlregexp.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * xmlAutomataPtr: - * - * A libxml automata description, It can be compiled into a regexp - */ -typedef struct _xmlAutomata xmlAutomata; -typedef xmlAutomata *xmlAutomataPtr; - -/** - * xmlAutomataStatePtr: - * - * A state int the automata description, - */ -typedef struct _xmlAutomataState xmlAutomataState; -typedef xmlAutomataState *xmlAutomataStatePtr; - -/* - * Building API - */ -xmlAutomataPtr xmlNewAutomata (void); -void xmlFreeAutomata (xmlAutomataPtr am); - -xmlAutomataStatePtr xmlAutomataGetInitState (xmlAutomataPtr am); -int xmlAutomataSetFinalState(xmlAutomataPtr am, - xmlAutomataStatePtr state); -xmlAutomataStatePtr xmlAutomataNewState (xmlAutomataPtr am); -xmlAutomataStatePtr xmlAutomataNewTransition(xmlAutomataPtr am, - xmlAutomataStatePtr from, - xmlAutomataStatePtr to, - const xmlChar *token, - void *data); -xmlAutomataStatePtr xmlAutomataNewCountTrans(xmlAutomataPtr am, - xmlAutomataStatePtr from, - xmlAutomataStatePtr to, - const xmlChar *token, - int min, - int max, - void *data); -xmlAutomataStatePtr xmlAutomataNewOnceTrans (xmlAutomataPtr am, - xmlAutomataStatePtr from, - xmlAutomataStatePtr to, - const xmlChar *token, - int min, - int max, - void *data); -xmlAutomataStatePtr xmlAutomataNewAllTrans (xmlAutomataPtr am, - xmlAutomataStatePtr from, - xmlAutomataStatePtr to, - int lax); -xmlAutomataStatePtr xmlAutomataNewEpsilon (xmlAutomataPtr am, - xmlAutomataStatePtr from, - xmlAutomataStatePtr to); -xmlAutomataStatePtr xmlAutomataNewCountedTrans(xmlAutomataPtr am, - xmlAutomataStatePtr from, - xmlAutomataStatePtr to, - int counter); -xmlAutomataStatePtr xmlAutomataNewCounterTrans(xmlAutomataPtr am, - xmlAutomataStatePtr from, - xmlAutomataStatePtr to, - int counter); -int xmlAutomataNewCounter (xmlAutomataPtr am, - int min, - int max); - -xmlRegexpPtr xmlAutomataCompile (xmlAutomataPtr am); -int xmlAutomataIsDeterminist(xmlAutomataPtr am); - -#ifdef __cplusplus -} -#endif - -#endif /* LIBXML_AUTOMATA_ENABLED */ -#endif /* __XML_AUTOMATA_H__ */ diff --git a/plugins/Variables/src/libxml/xmlerror.h b/plugins/Variables/src/libxml/xmlerror.h deleted file mode 100644 index a40a1ec7ab..0000000000 --- a/plugins/Variables/src/libxml/xmlerror.h +++ /dev/null @@ -1,184 +0,0 @@ -#include "libxml/parser.h" - -#ifndef __XML_ERROR_H__ -#define __XML_ERROR_H__ - -#ifdef __cplusplus -extern "C" { -#endif - -typedef enum { - XML_ERR_OK = 0, - XML_ERR_INTERNAL_ERROR, - XML_ERR_NO_MEMORY, - - XML_ERR_DOCUMENT_START, /* 3 */ - XML_ERR_DOCUMENT_EMPTY, - XML_ERR_DOCUMENT_END, - - XML_ERR_INVALID_HEX_CHARREF, /* 6 */ - XML_ERR_INVALID_DEC_CHARREF, - XML_ERR_INVALID_CHARREF, - XML_ERR_INVALID_CHAR, - - XML_ERR_CHARREF_AT_EOF, /* 10 */ - XML_ERR_CHARREF_IN_PROLOG, - XML_ERR_CHARREF_IN_EPILOG, - XML_ERR_CHARREF_IN_DTD, - XML_ERR_ENTITYREF_AT_EOF, - XML_ERR_ENTITYREF_IN_PROLOG, - XML_ERR_ENTITYREF_IN_EPILOG, - XML_ERR_ENTITYREF_IN_DTD, - XML_ERR_PEREF_AT_EOF, - XML_ERR_PEREF_IN_PROLOG, - XML_ERR_PEREF_IN_EPILOG, - XML_ERR_PEREF_IN_INT_SUBSET, - - XML_ERR_ENTITYREF_NO_NAME, /* 22 */ - XML_ERR_ENTITYREF_SEMICOL_MISSING, - - XML_ERR_PEREF_NO_NAME, /* 24 */ - XML_ERR_PEREF_SEMICOL_MISSING, - - XML_ERR_UNDECLARED_ENTITY, /* 26 */ - XML_WAR_UNDECLARED_ENTITY, - XML_ERR_UNPARSED_ENTITY, - XML_ERR_ENTITY_IS_EXTERNAL, - XML_ERR_ENTITY_IS_PARAMETER, - - XML_ERR_UNKNOWN_ENCODING, /* 31 */ - XML_ERR_UNSUPPORTED_ENCODING, - - XML_ERR_STRING_NOT_STARTED, /* 33 */ - XML_ERR_STRING_NOT_CLOSED, - XML_ERR_NS_DECL_ERROR, - - XML_ERR_ENTITY_NOT_STARTED, /* 36 */ - XML_ERR_ENTITY_NOT_FINISHED, - - XML_ERR_LT_IN_ATTRIBUTE, /* 38 */ - XML_ERR_ATTRIBUTE_NOT_STARTED, - XML_ERR_ATTRIBUTE_NOT_FINISHED, - XML_ERR_ATTRIBUTE_WITHOUT_VALUE, - XML_ERR_ATTRIBUTE_REDEFINED, - - XML_ERR_LITERAL_NOT_STARTED, /* 43 */ - XML_ERR_LITERAL_NOT_FINISHED, - - XML_ERR_COMMENT_NOT_FINISHED, /* 45 */ - - XML_ERR_PI_NOT_STARTED, /* 47 */ - XML_ERR_PI_NOT_FINISHED, - - XML_ERR_NOTATION_NOT_STARTED, /* 49 */ - XML_ERR_NOTATION_NOT_FINISHED, - - XML_ERR_ATTLIST_NOT_STARTED, /* 51 */ - XML_ERR_ATTLIST_NOT_FINISHED, - - XML_ERR_MIXED_NOT_STARTED, /* 53 */ - XML_ERR_MIXED_NOT_FINISHED, - - XML_ERR_ELEMCONTENT_NOT_STARTED, /* 55 */ - XML_ERR_ELEMCONTENT_NOT_FINISHED, - - XML_ERR_XMLDECL_NOT_STARTED, /* 57 */ - XML_ERR_XMLDECL_NOT_FINISHED, - - XML_ERR_CONDSEC_NOT_STARTED, /* 59 */ - XML_ERR_CONDSEC_NOT_FINISHED, - - XML_ERR_EXT_SUBSET_NOT_FINISHED, /* 61 */ - - XML_ERR_DOCTYPE_NOT_FINISHED, /* 62 */ - - XML_ERR_MISPLACED_CDATA_END, /* 63 */ - XML_ERR_CDATA_NOT_FINISHED, - - XML_ERR_RESERVED_XML_NAME, /* 65 */ - - XML_ERR_SPACE_REQUIRED, /* 66 */ - XML_ERR_SEPARATOR_REQUIRED, - XML_ERR_NMTOKEN_REQUIRED, - XML_ERR_NAME_REQUIRED, - XML_ERR_PCDATA_REQUIRED, - XML_ERR_URI_REQUIRED, - XML_ERR_PUBID_REQUIRED, - XML_ERR_LT_REQUIRED, - XML_ERR_GT_REQUIRED, - XML_ERR_LTSLASH_REQUIRED, - XML_ERR_EQUAL_REQUIRED, - - XML_ERR_TAG_NAME_MISMATCH, /* 77 */ - XML_ERR_TAG_NOT_FINISHED, - - XML_ERR_STANDALONE_VALUE, /* 79 */ - - XML_ERR_ENCODING_NAME, /* 80 */ - - XML_ERR_HYPHEN_IN_COMMENT, /* 81 */ - - XML_ERR_INVALID_ENCODING, /* 82 */ - - XML_ERR_EXT_ENTITY_STANDALONE, /* 83 */ - - XML_ERR_CONDSEC_INVALID, /* 84 */ - - XML_ERR_VALUE_REQUIRED, /* 85 */ - - XML_ERR_NOT_WELL_BALANCED, /* 86 */ - XML_ERR_EXTRA_CONTENT, /* 87 */ - XML_ERR_ENTITY_CHAR_ERROR, /* 88 */ - XML_ERR_ENTITY_PE_INTERNAL, /* 88 */ - XML_ERR_ENTITY_LOOP, /* 89 */ - XML_ERR_ENTITY_BOUNDARY, /* 90 */ - XML_ERR_INVALID_URI, /* 91 */ - XML_ERR_URI_FRAGMENT, /* 92 */ - XML_WAR_CATALOG_PI, /* 93 */ - XML_ERR_NO_DTD /* 94 */ -}xmlParserErrors; - -/** - * xmlGenericErrorFunc: - * @ctx: a parsing context - * @msg: the message - * @...: the extra arguments of the varags to format the message - * - * Signature of the function to use when there is an error and - * no parsing or validity context available . - */ -typedef void (*xmlGenericErrorFunc) (void *ctx, - const char *msg, - ...); - -/* - * Use the following function to reset the two global variables - * xmlGenericError and xmlGenericErrorContext. - */ -void xmlSetGenericErrorFunc (void *ctx, - xmlGenericErrorFunc handler); -void initGenericErrorDefaultFunc(xmlGenericErrorFunc *handler); - -/* - * Default message routines used by SAX and Valid context for error - * and warning reporting. - */ -void xmlParserError (void *ctx, - const char *msg, - ...); -void xmlParserWarning (void *ctx, - const char *msg, - ...); -void xmlParserValidityError (void *ctx, - const char *msg, - ...); -void xmlParserValidityWarning(void *ctx, - const char *msg, - ...); -void xmlParserPrintFileInfo (xmlParserInputPtr input); -void xmlParserPrintFileContext(xmlParserInputPtr input); - -#ifdef __cplusplus -} -#endif -#endif /* __XML_ERROR_H__ */ diff --git a/plugins/Variables/src/libxml/xmlmemory.h b/plugins/Variables/src/libxml/xmlmemory.h deleted file mode 100644 index 314d8f8339..0000000000 --- a/plugins/Variables/src/libxml/xmlmemory.h +++ /dev/null @@ -1,169 +0,0 @@ -/* - * xmlmemory.h: interface for the memory allocation debug. - * - * daniel@veillard.com - */ - - -#ifndef _DEBUG_MEMORY_ALLOC_ -#define _DEBUG_MEMORY_ALLOC_ - -#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 - -/* - * The XML memory wrapper support 4 basic overloadable functions. - */ -/** - * xmlFreeFunc: - * @mem: an already allocated block of memory - * - * Signature for a free() implementation. - */ -typedef void (*xmlFreeFunc)(void *mem); -/** - * xmlMallocFunc: - * @size: the size requested in bytes - * - * Signature for a malloc() implementation. - * - * Returns a pointer to the newly allocated block or NULL in case of error. - */ -typedef void *(*xmlMallocFunc)(size_t size); - -/** - * xmlReallocFunc: - * @mem: an already allocated block of memory - * @size: the new size requested in bytes - * - * Signature for a realloc() implementation. - * - * Returns a pointer to the newly reallocated block or NULL in case of error. - */ -typedef void *(*xmlReallocFunc)(void *mem, size_t size); - -/** - * xmlStrdupFunc: - * @str: a zero terminated string - * - * Signature for an strdup() implementation. - * - * Returns the copy of the string or NULL in case of error. - */ -typedef char *(*xmlStrdupFunc)(const char *str); - -/* - * The 4 interfaces used for all memory handling within libxml. -LIBXML_DLL_IMPORT extern xmlFreeFunc xmlFree; -LIBXML_DLL_IMPORT extern xmlMallocFunc xmlMalloc; -LIBXML_DLL_IMPORT extern xmlReallocFunc xmlRealloc; -LIBXML_DLL_IMPORT extern xmlStrdupFunc xmlMemStrdup; - */ - -/* - * The way to overload the existing functions. - */ -int xmlMemSetup (xmlFreeFunc freeFunc, - xmlMallocFunc mallocFunc, - xmlReallocFunc reallocFunc, - xmlStrdupFunc strdupFunc); -int xmlMemGet (xmlFreeFunc *freeFunc, - xmlMallocFunc *mallocFunc, - xmlReallocFunc *reallocFunc, - xmlStrdupFunc *strdupFunc); - -/* - * Initialization of the memory layer. - */ -int xmlInitMemory (void); - -/* - * Those are specific to the XML debug memory wrapper. - */ -int xmlMemUsed (void); -void xmlMemDisplay (FILE *fp); -void xmlMemShow (FILE *fp, int nr); -void xmlMemoryDump (void); -void * xmlMemMalloc (size_t size); -void * xmlMemRealloc (void *ptr,size_t size); -void xmlMemFree (void *ptr); -char * xmlMemoryStrdup (const char *str); - -#ifdef DEBUG_MEMORY_LOCATION -/** - * xmlMalloc: - * @size: number of bytes to allocate - * - * Wrapper for the malloc() function used in the XML library. - * - * Returns the pointer to the allocated area or NULL in case of error. - */ -#define xmlMalloc(size) xmlMallocLoc((size), __FILE__, __LINE__) -/** - * xmlRealloc: - * @ptr: pointer to the existing allocated area - * @size: number of bytes to allocate - * - * Wrapper for the realloc() function used in the XML library. - * - * Returns the pointer to the allocated area or NULL in case of error. - */ -#define xmlRealloc(ptr, size) xmlReallocLoc((ptr), (size), __FILE__, __LINE__) -/** - * xmlMemStrdup: - * @str: pointer to the existing string - * - * Wrapper for the strdup() function, xmlStrdup() is usually preferred. - * - * Returns the pointer to the allocated area or NULL in case of error. - */ -#define xmlMemStrdup(str) xmlMemStrdupLoc((str), __FILE__, __LINE__) - -void * xmlMallocLoc(size_t size, const char *file, int line); -void * xmlReallocLoc(void *ptr,size_t size, const char *file, int line); -char * xmlMemStrdupLoc(const char *str, const char *file, int line); -#endif /* DEBUG_MEMORY_LOCATION */ - -#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_ */ - diff --git a/plugins/Variables/src/libxml/xmlregexp.h b/plugins/Variables/src/libxml/xmlregexp.h deleted file mode 100644 index f15ead03ae..0000000000 --- a/plugins/Variables/src/libxml/xmlregexp.h +++ /dev/null @@ -1,81 +0,0 @@ -/* - * regexp.h : describes the basic API for libxml regular expressions handling - * - * See Copyright for the status of this software. - * - * Daniel Veillard <veillard@redhat.com> - */ - -#ifndef __XML_REGEXP_H__ -#define __XML_REGEXP_H__ - -#include "libxml/xmlversion.h" - -#ifdef LIBXML_REGEXP_ENABLED - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * xmlRegexpPtr: - * - * A libxml regular expression, they can actually be far more complex - * thank the POSIX regex expressions. - */ -typedef struct _xmlRegexp xmlRegexp; -typedef xmlRegexp *xmlRegexpPtr; - -/** - * xmlRegExecCtxtPtr: - * - * A libxml progressive regular expression evaluation context - */ -typedef struct _xmlRegExecCtxt xmlRegExecCtxt; -typedef xmlRegExecCtxt *xmlRegExecCtxtPtr; - -#ifdef __cplusplus -} -#endif -#include "libxml/tree.h" -#ifdef __cplusplus -extern "C" { -#endif - -/* - * The POSIX like API - */ -xmlRegexpPtr xmlRegexpCompile(const xmlChar *regexp); -void xmlRegFreeRegexp(xmlRegexpPtr regexp); -int xmlRegexpExec (xmlRegexpPtr comp, - const xmlChar *value); -void xmlRegexpPrint (FILE *output, - xmlRegexpPtr regexp); -int xmlRegexpIsDeterminist(xmlRegexpPtr comp); - -/* - * Callback function when doing a transition in the automata - */ -typedef void (*xmlRegExecCallbacks) (xmlRegExecCtxtPtr exec, - const xmlChar *token, - void *transdata, - void *inputdata); - -/* - * The progressive API - */ -xmlRegExecCtxtPtr xmlRegNewExecCtxt (xmlRegexpPtr comp, - xmlRegExecCallbacks callback, - void *data); -void xmlRegFreeExecCtxt (xmlRegExecCtxtPtr exec); -int xmlRegExecPushString (xmlRegExecCtxtPtr exec, - const xmlChar *value, - void *data); - -#ifdef __cplusplus -} -#endif - -#endif /* LIBXML_REGEXP_ENABLED */ - -#endif /*__XML_REGEXP_H__ */ diff --git a/plugins/Variables/src/libxml/xmlversion.h b/plugins/Variables/src/libxml/xmlversion.h deleted file mode 100644 index 1342eba969..0000000000 --- a/plugins/Variables/src/libxml/xmlversion.h +++ /dev/null @@ -1,272 +0,0 @@ -/* - * xmlversion.h : compile-time version informations for the XML parser. - * - * See Copyright for the status of this software. - * - * daniel@veillard.com - */ - -#ifndef __XML_VERSION_H__ -#define __XML_VERSION_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 -extern void xmlCheckVersion(int version); -#endif /* LIBXML2_COMPILING_MSCCDEF */ - -/** - * LIBXML_DOTTED_VERSION: - * - * the version string like "1.2.3" - */ -#define LIBXML_DOTTED_VERSION "2.5.4" - -/** - * LIBXML_VERSION: - * - * the version number: 1.2.3 value is 1002003 - */ -#define LIBXML_VERSION 20504 - -/** - * LIBXML_VERSION_STRING: - * - * the version number string, 1.2.3 value is "1002003" - */ -#define LIBXML_VERSION_STRING "20504" - -/** - * 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(20504); - -#ifndef VMS -#if 0 -/** - * 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 */ -#define WITH_TRIO 1 -#endif /* VMS */ - -/** - * LIBXML_THREAD_ENABLED: - * - * Whether the thread support is configured in - */ -#if 0 -#if defined(_REENTRANT) || (_POSIX_C_SOURCE - 0 >= 199506L) -#define LIBXML_THREAD_ENABLED -#endif -#endif - -/** - * LIBXML_FTP_ENABLED: - * - * Whether the FTP support is configured in - */ -#if 1 -#define LIBXML_FTP_ENABLED -#endif - -/** - * LIBXML_HTTP_ENABLED: - * - * Whether the HTTP support is configured in - */ -#if 1 -#define LIBXML_HTTP_ENABLED -#endif - -/** - * LIBXML_HTML_ENABLED: - * - * Whether the HTML support is configured in - */ -#if 1 -#define LIBXML_HTML_ENABLED -#endif - -/** - * LIBXML_C14N_ENABLED: - * - * Whether the Canonicalization support is configured in - */ -#if 1 -#define LIBXML_C14N_ENABLED -#endif - -/** - * LIBXML_CATALOG_ENABLED: - * - * Whether the Catalog support is configured in - */ -#if 1 -#define LIBXML_CATALOG_ENABLED -#endif - -/** - * LIBXML_DOCB_ENABLED: - * - * Whether the SGML Docbook support is configured in - */ -#if 1 -#define LIBXML_DOCB_ENABLED -#endif - -/** - * LIBXML_XPATH_ENABLED: - * - * Whether XPath is configured in - */ -#if 1 -#define LIBXML_XPATH_ENABLED -#endif - -/** - * LIBXML_XPTR_ENABLED: - * - * Whether XPointer is configured in - */ -#if 1 -#define LIBXML_XPTR_ENABLED -#endif - -/** - * LIBXML_XINCLUDE_ENABLED: - * - * Whether XInclude is configured in - */ -#if 1 -#define LIBXML_XINCLUDE_ENABLED -#endif - -/** - * LIBXML_ICONV_ENABLED: - * - * Whether iconv support is available - */ -#if 0 -#define LIBXML_ICONV_ENABLED -#endif - -/** - * LIBXML_DEBUG_ENABLED: - * - * Whether Debugging module is configured in - */ -#if 1 -#define LIBXML_DEBUG_ENABLED -#endif - -/** - * DEBUG_MEMORY_LOCATION: - * - * Whether the memory debugging is configured in - */ -#if 0 -#define DEBUG_MEMORY_LOCATION -#endif - -/** - * LIBXML_UNICODE_ENABLED - * - * Whether the Unicode related interfaces are compiled in - */ -#if 1 -#define LIBXML_UNICODE_ENABLED -#endif - -/** - * LIBXML_REGEXP_ENABLED - * - * Whether the regular expressions interfaces are compiled in - */ -#if 1 -#define LIBXML_REGEXP_ENABLED -#endif - -/** - * LIBXML_AUTOMATA_ENABLED - * - * Whether the automata interfaces are compiled in - */ -#if 1 -#define LIBXML_AUTOMATA_ENABLED -#endif - -/** - * LIBXML_SCHEMAS_ENABLED - * - * Whether the Schemas validation interfaces are compiled in - */ -#if 1 -#define LIBXML_SCHEMAS_ENABLED -#endif - -/** - * LIBXML_DLL_IMPORT: - * - * Used on Windows (MS C compiler only) to declare a variable as - * imported from the library. This macro should be empty when compiling - * libxml itself. It should expand to __declspec(dllimport) - * when the client code includes this header, and that only if the client - * links dynamically against libxml. - * For this to work, we need three macros. One tells us which compiler is - * being used and luckily the compiler defines such a thing: _MSC_VER. The - * second macro tells us if we are compiling libxml or the client code and - * we define the macro IN_LIBXML on the compiler's command line for this - * purpose. The third macro, LIBXML_STATIC, must be defined by any client - * code which links against libxml statically. - */ -#ifndef LIBXML_DLL_IMPORT -#if (defined(_MSC_VER) || defined(__CYGWIN__)) && !defined(IN_LIBXML) && !defined(LIBXML_STATIC) -#define LIBXML_DLL_IMPORT __declspec(dllimport) -#else -#define LIBXML_DLL_IMPORT -#endif -#endif - -/** - * ATTRIBUTE_UNUSED: - * - * Macro used to signal to GCC unused function parameters - */ -#ifdef __GNUC__ -#ifdef HAVE_ANSIDECL_H -#include <ansidecl.h> -#endif -#ifndef ATTRIBUTE_UNUSED -#define ATTRIBUTE_UNUSED -#endif -#else -#define ATTRIBUTE_UNUSED -#endif - -#ifdef __cplusplus -} -#endif /* __cplusplus */ -#endif - - diff --git a/plugins/Variables/src/libxml/xpath.h b/plugins/Variables/src/libxml/xpath.h deleted file mode 100644 index 9ec5453d88..0000000000 --- a/plugins/Variables/src/libxml/xpath.h +++ /dev/null @@ -1,410 +0,0 @@ -/* - * xpath.c: interface for XML Path Language implementation - * - * Reference: W3C Working Draft 5 July 1999 - * http://www.w3.org/Style/XSL/Group/1999/07/xpath-19990705.html - * - * See COPYRIGHT for the status of this software - * - * Author: daniel@veillard.com - */ - -#ifndef __XML_XPATH_H__ -#define __XML_XPATH_H__ - -#include "libxml/tree.h" -#include "libxml/hash.h" - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct _xmlXPathContext xmlXPathContext; -typedef xmlXPathContext *xmlXPathContextPtr; -typedef struct _xmlXPathParserContext xmlXPathParserContext; -typedef xmlXPathParserContext *xmlXPathParserContextPtr; - -/** - * The set of XPath error codes. - */ - -typedef enum { - XPATH_EXPRESSION_OK = 0, - XPATH_NUMBER_ERROR, - XPATH_UNFINISHED_LITERAL_ERROR, - XPATH_START_LITERAL_ERROR, - XPATH_VARIABLE_REF_ERROR, - XPATH_UNDEF_VARIABLE_ERROR, - XPATH_INVALID_PREDICATE_ERROR, - XPATH_EXPR_ERROR, - XPATH_UNCLOSED_ERROR, - XPATH_UNKNOWN_FUNC_ERROR, - XPATH_INVALID_OPERAND, - XPATH_INVALID_TYPE, - XPATH_INVALID_ARITY, - XPATH_INVALID_CTXT_SIZE, - XPATH_INVALID_CTXT_POSITION, - XPATH_MEMORY_ERROR, - XPTR_SYNTAX_ERROR, - XPTR_RESOURCE_ERROR, - XPTR_SUB_RESOURCE_ERROR, - XPATH_UNDEF_PREFIX_ERROR, - XPATH_ENCODING_ERROR, - XPATH_INVALID_CHAR_ERROR -} xmlXPathError; - -/* - * A node-set (an unordered collection of nodes without duplicates). - */ -typedef struct _xmlNodeSet xmlNodeSet; -typedef xmlNodeSet *xmlNodeSetPtr; -struct _xmlNodeSet { - int nodeNr; /* number of nodes in the set */ - int nodeMax; /* size of the array as allocated */ - xmlNodePtr *nodeTab; /* array of nodes in no particular order */ - /* @@ with_ns to check wether namespace nodes should be looked at @@ */ -}; - -/* - * An expression is evaluated to yield an object, which - * has one of the following four basic types: - * - node-set - * - boolean - * - number - * - string - * - * @@ XPointer will add more types ! - */ - -typedef enum { - XPATH_UNDEFINED = 0, - XPATH_NODESET = 1, - XPATH_BOOLEAN = 2, - XPATH_NUMBER = 3, - XPATH_STRING = 4, - XPATH_POINT = 5, - XPATH_RANGE = 6, - XPATH_LOCATIONSET = 7, - XPATH_USERS = 8, - XPATH_XSLT_TREE = 9 /* An XSLT value tree, non modifiable */ -} xmlXPathObjectType; - -typedef struct _xmlXPathObject xmlXPathObject; -typedef xmlXPathObject *xmlXPathObjectPtr; -struct _xmlXPathObject { - xmlXPathObjectType type; - xmlNodeSetPtr nodesetval; - int boolval; - double floatval; - xmlChar *stringval; - void *user; - int index; - void *user2; - int index2; -}; - -/** - * xmlXPathConvertFunc: - * @obj: an XPath object - * @type: the number of the target type - * - * A conversion function is associated to a type and used to cast - * the new type to primitive values. - * - * Returns -1 in case of error, 0 otherwise - */ -typedef int (*xmlXPathConvertFunc) (xmlXPathObjectPtr obj, int type); - -/* - * Extra type: a name and a conversion function. - */ - -typedef struct _xmlXPathType xmlXPathType; -typedef xmlXPathType *xmlXPathTypePtr; -struct _xmlXPathType { - const xmlChar *name; /* the type name */ - xmlXPathConvertFunc func; /* the conversion function */ -}; - -/* - * Extra variable: a name and a value. - */ - -typedef struct _xmlXPathVariable xmlXPathVariable; -typedef xmlXPathVariable *xmlXPathVariablePtr; -struct _xmlXPathVariable { - const xmlChar *name; /* the variable name */ - xmlXPathObjectPtr value; /* the value */ -}; - -/** - * xmlXPathEvalFunc: - * @ctxt: an XPath parser context - * @nargs: the number of arguments passed to the function - * - * An XPath evaluation function, the parameters are on the XPath context stack. - */ - -typedef void (*xmlXPathEvalFunc)(xmlXPathParserContextPtr ctxt, - int nargs); - -/* - * Extra function: a name and a evaluation function. - */ - -typedef struct _xmlXPathFunct xmlXPathFunct; -typedef xmlXPathFunct *xmlXPathFuncPtr; -struct _xmlXPathFunct { - const xmlChar *name; /* the function name */ - xmlXPathEvalFunc func; /* the evaluation function */ -}; - -/** - * xmlXPathAxisFunc: - * @ctxt: the XPath interpreter context - * @cur: the previous node being explored on that axis - * - * An axis traversal function. To traverse an axis, the engine calls - * the first time with cur == NULL and repeat until the function returns - * NULL indicating the end of the axis traversal. - * - * Returns the next node in that axis or NULL if at the end of the axis. - */ - -typedef xmlXPathObjectPtr (*xmlXPathAxisFunc) (xmlXPathParserContextPtr ctxt, - xmlXPathObjectPtr cur); - -/* - * Extra axis: a name and an axis function. - */ - -typedef struct _xmlXPathAxis xmlXPathAxis; -typedef xmlXPathAxis *xmlXPathAxisPtr; -struct _xmlXPathAxis { - const xmlChar *name; /* the axis name */ - xmlXPathAxisFunc func; /* the search function */ -}; - -/** - * xmlXPathContext: - * - * Expression evaluation occurs with respect to a context. - * he context consists of: - * - a node (the context node) - * - a node list (the context node list) - * - a set of variable bindings - * - a function library - * - the set of namespace declarations in scope for the expression - * Following the switch to hash tables, this need to be trimmed up at - * the next binary incompatible release. - */ - -struct _xmlXPathContext { - xmlDocPtr doc; /* The current document */ - xmlNodePtr node; /* The current node */ - - int nb_variables_unused; /* unused (hash table) */ - int max_variables_unused; /* unused (hash table) */ - xmlHashTablePtr varHash; /* Hash table of defined variables */ - - int nb_types; /* number of defined types */ - int max_types; /* max number of types */ - xmlXPathTypePtr types; /* Array of defined types */ - - int nb_funcs_unused; /* unused (hash table) */ - int max_funcs_unused; /* unused (hash table) */ - xmlHashTablePtr funcHash; /* Hash table of defined funcs */ - - int nb_axis; /* number of defined axis */ - int max_axis; /* max number of axis */ - xmlXPathAxisPtr axis; /* Array of defined axis */ - - /* the namespace nodes of the context node */ - xmlNsPtr *namespaces; /* Array of namespaces */ - int nsNr; /* number of namespace in scope */ - void *user; /* function to free */ - - /* extra variables */ - int contextSize; /* the context size */ - int proximityPosition; /* the proximity position */ - - /* extra stuff for XPointer */ - int xptr; /* it this an XPointer context */ - xmlNodePtr here; /* for here() */ - xmlNodePtr origin; /* for origin() */ - - /* the set of namespace declarations in scope for the expression */ - xmlHashTablePtr nsHash; /* The namespaces hash table */ - void *varLookupFunc; /* variable lookup func */ - void *varLookupData; /* variable lookup data */ - - /* Possibility to link in an extra item */ - void *extra; /* needed for XSLT */ - - /* The function name and URI when calling a function */ - const xmlChar *function; - const xmlChar *functionURI; - - /* function lookup function and data */ - void *funcLookupFunc; /* function lookup func */ - void *funcLookupData; /* function lookup data */ - - /* temporary namespace lists kept for walking the namespace axis */ - xmlNsPtr *tmpNsList; /* Array of namespaces */ - int tmpNsNr; /* number of namespace in scope */ -}; - -/* - * The structure of a compiled expression form is not public. - */ - -typedef struct _xmlXPathCompExpr xmlXPathCompExpr; -typedef xmlXPathCompExpr *xmlXPathCompExprPtr; - -/** - * xmlXPathParserContext: - * - * An XPath parser context. It contains pure parsing informations, - * an xmlXPathContext, and the stack of objects. - */ -struct _xmlXPathParserContext { - const xmlChar *cur; /* the current char being parsed */ - const xmlChar *base; /* the full expression */ - - int error; /* error code */ - - xmlXPathContextPtr context; /* the evaluation context */ - xmlXPathObjectPtr value; /* the current value */ - int valueNr; /* number of values stacked */ - int valueMax; /* max number of values stacked */ - xmlXPathObjectPtr *valueTab; /* stack of values */ - - xmlXPathCompExprPtr comp; /* the precompiled expression */ - int xptr; /* it this an XPointer expression */ - xmlNodePtr ancestor; /* used for walking preceding axis */ -}; - -/** - * xmlXPathFunction: - * @ctxt: the XPath interprestation context - * @nargs: the number of arguments - * - * An XPath function. - * The arguments (if any) are popped out from the context stack - * and the result is pushed on the stack. - */ - -typedef void (*xmlXPathFunction) (xmlXPathParserContextPtr ctxt, int nargs); - -/************************************************************************ - * * - * Public API * - * * - ************************************************************************/ - -/** - * Objects and Nodesets handling - */ - -LIBXML_DLL_IMPORT extern double xmlXPathNAN; -LIBXML_DLL_IMPORT extern double xmlXPathPINF; -LIBXML_DLL_IMPORT extern double xmlXPathNINF; - -int xmlXPathIsNaN (double val); -int xmlXPathIsInf (double val); - -/* These macros may later turn into functions */ -/** - * xmlXPathNodeSetGetLength: - * @ns: a node-set - * - * Implement a functionality similar to the DOM NodeList.length. - * - * Returns the number of nodes in the node-set. - */ -#define xmlXPathNodeSetGetLength(ns) ((ns) ? (ns)->nodeNr : 0) -/** - * xmlXPathNodeSetItem: - * @ns: a node-set - * @index: index of a node in the set - * - * Implements a functionality similar to the DOM NodeList.item(). - * - * Returns the xmlNodePtr at the given @index in @ns or NULL if - * @index is out of range (0 to length-1) - */ -#define xmlXPathNodeSetItem(ns, index) \ - ((((ns) != NULL) && \ - ((index) >= 0) && ((index) < (ns)->nodeNr)) ? \ - (ns)->nodeTab[(index)] \ - : NULL) -/** - * xmlXPathNodeSetIsEmpty: - * @ns: a node-set - * - * Checks whether @ns is empty or not. - * - * Returns %TRUE if @ns is an empty node-set. - */ -#define xmlXPathNodeSetIsEmpty(ns) \ - (((ns) == NULL) || ((ns)->nodeNr == 0) || ((ns)->nodeTab == NULL)) - - -void xmlXPathFreeObject (xmlXPathObjectPtr obj); -xmlNodeSetPtr xmlXPathNodeSetCreate (xmlNodePtr val); -void xmlXPathFreeNodeSetList (xmlXPathObjectPtr obj); -void xmlXPathFreeNodeSet (xmlNodeSetPtr obj); -xmlXPathObjectPtr xmlXPathObjectCopy (xmlXPathObjectPtr val); -int xmlXPathCmpNodes (xmlNodePtr node1, - xmlNodePtr node2); -/** - * Conversion functions to basic types. - */ -int xmlXPathCastNumberToBoolean (double val); -int xmlXPathCastStringToBoolean (const xmlChar * val); -int xmlXPathCastNodeSetToBoolean (xmlNodeSetPtr ns); -int xmlXPathCastToBoolean (xmlXPathObjectPtr val); - -double xmlXPathCastBooleanToNumber (int val); -double xmlXPathCastStringToNumber (const xmlChar * val); -double xmlXPathCastNodeToNumber (xmlNodePtr node); -double xmlXPathCastNodeSetToNumber (xmlNodeSetPtr ns); -double xmlXPathCastToNumber (xmlXPathObjectPtr val); - -xmlChar * xmlXPathCastBooleanToString (int val); -xmlChar * xmlXPathCastNumberToString (double val); -xmlChar * xmlXPathCastNodeToString (xmlNodePtr node); -xmlChar * xmlXPathCastNodeSetToString (xmlNodeSetPtr ns); -xmlChar * xmlXPathCastToString (xmlXPathObjectPtr val); - -xmlXPathObjectPtr xmlXPathConvertBoolean (xmlXPathObjectPtr val); -xmlXPathObjectPtr xmlXPathConvertNumber (xmlXPathObjectPtr val); -xmlXPathObjectPtr xmlXPathConvertString (xmlXPathObjectPtr val); - -/** - * Context handling. - */ -void xmlXPathInit (void); -xmlXPathContextPtr xmlXPathNewContext (xmlDocPtr doc); -void xmlXPathFreeContext (xmlXPathContextPtr ctxt); - -/** - * Evaluation functions. - */ -xmlXPathObjectPtr xmlXPathEval (const xmlChar *str, - xmlXPathContextPtr ctx); -xmlXPathObjectPtr xmlXPathEvalExpression (const xmlChar *str, - xmlXPathContextPtr ctxt); -int xmlXPathEvalPredicate (xmlXPathContextPtr ctxt, - xmlXPathObjectPtr res); -/** - * Separate compilation/evaluation entry points. - */ -xmlXPathCompExprPtr xmlXPathCompile (const xmlChar *str); -xmlXPathObjectPtr xmlXPathCompiledEval (xmlXPathCompExprPtr comp, - xmlXPathContextPtr ctx); -void xmlXPathFreeCompExpr (xmlXPathCompExprPtr comp); -#ifdef __cplusplus -} -#endif -#endif /* ! __XML_XPATH_H__ */ diff --git a/plugins/Variables/src/libxslt/numbersInternals.h b/plugins/Variables/src/libxslt/numbersInternals.h deleted file mode 100644 index 8707789521..0000000000 --- a/plugins/Variables/src/libxslt/numbersInternals.h +++ /dev/null @@ -1,69 +0,0 @@ -/* - * numbers.h: Implementation of the XSLT number functions - * - * See Copyright for the status of this software. - * - * daniel@veillard.com - * Bjorn Reese <breese@users.sourceforge.net> - */ - -#ifndef __XML_XSLT_NUMBERSINTERNALS_H__ -#define __XML_XSLT_NUMBERSINTERNALS_H__ - -#include "libxml/tree.h" -#include "xsltexports.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * xsltNumberData: - * - * This data structure is just a wrapper to pass xsl:number data in. - */ -typedef struct _xsltNumberData xsltNumberData; -typedef xsltNumberData *xsltNumberDataPtr; - -struct _xsltNumberData { - xmlChar *level; - xmlChar *count; - xmlChar *from; - xmlChar *value; - xmlChar *format; - int has_format; - int digitsPerGroup; - int groupingCharacter; - int groupingCharacterLen; - xmlDocPtr doc; - xmlNodePtr node; - - /* - * accelerators - */ -}; - -/** - * xsltFormatNumberInfo,: - * - * This data structure lists the various parameters needed to format numbers. - */ -typedef struct _xsltFormatNumberInfo xsltFormatNumberInfo; -typedef xsltFormatNumberInfo *xsltFormatNumberInfoPtr; - -struct _xsltFormatNumberInfo { - int integer_hash; /* Number of '#' in integer part */ - int integer_digits; /* Number of '0' in integer part */ - int frac_digits; /* Number of '0' in fractional part */ - int frac_hash; /* Number of '#' in fractional part */ - int group; /* Number of chars per display 'group' */ - int multiplier; /* Scaling for percent or permille */ - char add_decimal; /* Flag for whether decimal point appears in pattern */ - char is_multiplier_set; /* Flag to catch multiple occurences of percent/permille */ - char is_negative_pattern;/* Flag for processing -ve prefix/suffix */ -}; - -#ifdef __cplusplus -} -#endif -#endif /* __XML_XSLT_NUMBERSINTERNALS_H__ */ diff --git a/plugins/Variables/src/libxslt/transform.h b/plugins/Variables/src/libxslt/transform.h deleted file mode 100644 index 10d3d2d55a..0000000000 --- a/plugins/Variables/src/libxslt/transform.h +++ /dev/null @@ -1,191 +0,0 @@ -/* - * transform.h: Interfaces, constants and types related to the XSLT engine - * transform part. - * - * See Copyright for the status of this software. - * - * daniel@veillard.com - */ - -#ifndef __XML_XSLT_TRANSFORM_H__ -#define __XML_XSLT_TRANSFORM_H__ - -#include "libxml/parser.h" -#include "libxml/xmlIO.h" -#include "xsltexports.h" -#include "libxslt/xsltInternals.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * XInclude default processing. - */ -XSLTPUBFUN void XSLTCALL - xsltSetXIncludeDefault (int xinclude); -XSLTPUBFUN int XSLTCALL - xsltGetXIncludeDefault (void); - -/** - * Export context to users. - */ -XSLTPUBFUN xsltTransformContextPtr XSLTCALL - xsltNewTransformContext (xsltStylesheetPtr style, - xmlDocPtr doc); - -XSLTPUBFUN void XSLTCALL - xsltFreeTransformContext(xsltTransformContextPtr ctxt); - -XSLTPUBFUN xmlDocPtr XSLTCALL - xsltApplyStylesheetUser (xsltStylesheetPtr style, - xmlDocPtr doc, - const char **params, - const char *output, - FILE * profile, - xsltTransformContextPtr userCtxt); -/** - * Private Interfaces. - */ -XSLTPUBFUN void XSLTCALL - xsltApplyStripSpaces (xsltTransformContextPtr ctxt, - xmlNodePtr node); -XSLTPUBFUN xmlDocPtr XSLTCALL - xsltApplyStylesheet (xsltStylesheetPtr style, - xmlDocPtr doc, - const char **params); -XSLTPUBFUN xmlDocPtr XSLTCALL - xsltProfileStylesheet (xsltStylesheetPtr style, - xmlDocPtr doc, - const char **params, - FILE * output); -XSLTPUBFUN int XSLTCALL - xsltRunStylesheet (xsltStylesheetPtr style, - xmlDocPtr doc, - const char **params, - const char *output, - xmlSAXHandlerPtr SAX, - xmlOutputBufferPtr IObuf); -XSLTPUBFUN int XSLTCALL - xsltRunStylesheetUser (xsltStylesheetPtr style, - xmlDocPtr doc, - const char **params, - const char *output, - xmlSAXHandlerPtr SAX, - xmlOutputBufferPtr IObuf, - FILE * profile, - xsltTransformContextPtr userCtxt); -XSLTPUBFUN void XSLTCALL - xsltApplyOneTemplate (xsltTransformContextPtr ctxt, - xmlNodePtr node, - xmlNodePtr list, - xsltTemplatePtr templ, - xsltStackElemPtr params); -XSLTPUBFUN void XSLTCALL - xsltDocumentElem (xsltTransformContextPtr ctxt, - xmlNodePtr node, - xmlNodePtr inst, - xsltStylePreCompPtr comp); -XSLTPUBFUN void XSLTCALL - xsltSort (xsltTransformContextPtr ctxt, - xmlNodePtr node, - xmlNodePtr inst, - xsltStylePreCompPtr comp); -XSLTPUBFUN void XSLTCALL - xsltCopy (xsltTransformContextPtr ctxt, - xmlNodePtr node, - xmlNodePtr inst, - xsltStylePreCompPtr comp); -XSLTPUBFUN void XSLTCALL - xsltText (xsltTransformContextPtr ctxt, - xmlNodePtr node, - xmlNodePtr inst, - xsltStylePreCompPtr comp); -XSLTPUBFUN void XSLTCALL - xsltElement (xsltTransformContextPtr ctxt, - xmlNodePtr node, - xmlNodePtr inst, - xsltStylePreCompPtr comp); -XSLTPUBFUN void XSLTCALL - xsltComment (xsltTransformContextPtr ctxt, - xmlNodePtr node, - xmlNodePtr inst, - xsltStylePreCompPtr comp); -XSLTPUBFUN void XSLTCALL - xsltAttribute (xsltTransformContextPtr ctxt, - xmlNodePtr node, - xmlNodePtr inst, - xsltStylePreCompPtr comp); -XSLTPUBFUN void XSLTCALL - xsltProcessingInstruction(xsltTransformContextPtr ctxt, - xmlNodePtr node, - xmlNodePtr inst, - xsltStylePreCompPtr comp); -XSLTPUBFUN void XSLTCALL - xsltCopyOf (xsltTransformContextPtr ctxt, - xmlNodePtr node, - xmlNodePtr inst, - xsltStylePreCompPtr comp); -XSLTPUBFUN void XSLTCALL - xsltValueOf (xsltTransformContextPtr ctxt, - xmlNodePtr node, - xmlNodePtr inst, - xsltStylePreCompPtr comp); -XSLTPUBFUN void XSLTCALL - xsltNumber (xsltTransformContextPtr ctxt, - xmlNodePtr node, - xmlNodePtr inst, - xsltStylePreCompPtr comp); -XSLTPUBFUN void XSLTCALL - xsltApplyImports (xsltTransformContextPtr ctxt, - xmlNodePtr node, - xmlNodePtr inst, - xsltStylePreCompPtr comp); -XSLTPUBFUN void XSLTCALL - xsltCallTemplate (xsltTransformContextPtr ctxt, - xmlNodePtr node, - xmlNodePtr inst, - xsltStylePreCompPtr comp); -XSLTPUBFUN void XSLTCALL - xsltApplyTemplates (xsltTransformContextPtr ctxt, - xmlNodePtr node, - xmlNodePtr inst, - xsltStylePreCompPtr comp); -XSLTPUBFUN void XSLTCALL - xsltChoose (xsltTransformContextPtr ctxt, - xmlNodePtr node, - xmlNodePtr inst, - xsltStylePreCompPtr comp); -XSLTPUBFUN void XSLTCALL - xsltIf (xsltTransformContextPtr ctxt, - xmlNodePtr node, - xmlNodePtr inst, - xsltStylePreCompPtr comp); -XSLTPUBFUN void XSLTCALL - xsltForEach (xsltTransformContextPtr ctxt, - xmlNodePtr node, - xmlNodePtr inst, - xsltStylePreCompPtr comp); -XSLTPUBFUN void XSLTCALL - xsltRegisterAllElement (xsltTransformContextPtr ctxt); - -XSLTPUBFUN xmlNodePtr XSLTCALL - xsltCopyTextString (xsltTransformContextPtr ctxt, - xmlNodePtr target, - const xmlChar *string, - int noescape); -/* - * Hook for the debugger if activated. - */ -XSLTPUBFUN void XSLTCALL - xslHandleDebugger (xmlNodePtr cur, - xmlNodePtr node, - xsltTemplatePtr templ, - xsltTransformContextPtr ctxt); - -#ifdef __cplusplus -} -#endif - -#endif /* __XML_XSLT_TRANSFORM_H__ */ - diff --git a/plugins/Variables/src/libxslt/win32config.h b/plugins/Variables/src/libxslt/win32config.h deleted file mode 100644 index 249408b54a..0000000000 --- a/plugins/Variables/src/libxslt/win32config.h +++ /dev/null @@ -1,96 +0,0 @@ -#ifndef __LIBXSLT_WIN32_CONFIG__ -#define __LIBXSLT_WIN32_CONFIG__ - -#define HAVE_CTYPE_H 1 -#define HAVE_STDLIB_H 1 -#define HAVE_MALLOC_H 1 -#define HAVE_TIME_H 1 -#define HAVE_LOCALTIME 1 -#define HAVE_GMTIME 1 -#define HAVE_TIME 1 -#define HAVE_MATH_H 1 -#define HAVE_FCNTL_H 1 - -#include <io.h> - -#define HAVE_ISINF -#define HAVE_ISNAN - -#include <math.h> -#ifdef _MSC_VER -/* MS C-runtime has functions which can be used in order to determine if - a given floating-point variable contains NaN, (+-)INF. These are - preferred, because floating-point technology is considered propriatary - by MS and we can assume that their functions know more about their - oddities than we do. */ -#include <float.h> -/* Bjorn Reese figured a quite nice construct for isinf() using the - _fpclass() function. */ -#ifndef isinf -#define isinf(d) ((_fpclass(d) == _FPCLASS_PINF) ? 1 \ - : ((_fpclass(d) == _FPCLASS_NINF) ? -1 : 0)) -#endif -/* _isnan(x) returns nonzero if (x == NaN) and zero otherwise. */ -#ifndef isnan -#define isnan(d) (_isnan(d)) -#endif -#else /* _MSC_VER */ -static int isinf (double d) { - int expon = 0; - double val = frexp (d, &expon); - if (expon == 1025) { - if (val == 0.5) { - return 1; - } else if (val == -0.5) { - return -1; - } else { - return 0; - } - } else { - return 0; - } -} -static int isnan (double d) { - int expon = 0; - double val = frexp (d, &expon); - if (expon == 1025) { - if (val == 0.5) { - return 0; - } else if (val == -0.5) { - return 0; - } else { - return 1; - } - } else { - return 0; - } -} -#endif /* _MSC_VER */ - -#include <direct.h> -#if defined(_MSC_VER) || defined(__MINGW32__) -#define mkdir(p,m) _mkdir(p) -#define snprintf _snprintf -#define vsnprintf(b,c,f,a) _vsnprintf(b,c,f,a) -#endif - -#define HAVE_SYS_STAT_H -#define HAVE__STAT -#define HAVE_STRING_H - -#include "libxml/xmlversion.h" - -#if !defined LIBXSLT_PUBLIC -#if defined _MSC_VER && !defined IN_LIBXSLT && !defined LIBXSLT_STATIC -#define LIBXSLT_PUBLIC __declspec(dllimport) -#else -#define LIBXSLT_PUBLIC -#endif -#endif - -#ifndef ATTRIBUTE_UNUSED -#define ATTRIBUTE_UNUSED -#endif - -#endif /* __LIBXSLT_WIN32_CONFIG__ */ - diff --git a/plugins/Variables/src/libxslt/xslt.h b/plugins/Variables/src/libxslt/xslt.h deleted file mode 100644 index 4d3462fd25..0000000000 --- a/plugins/Variables/src/libxslt/xslt.h +++ /dev/null @@ -1,97 +0,0 @@ -/* - * xslt.h: Interfaces, constants and types related to the XSLT engine - * - * See Copyright for the status of this software. - * - * daniel@veillard.com - */ - -#ifndef __XML_XSLT_H__ -#define __XML_XSLT_H__ - -#include "libxml/tree.h" -#include "xsltexports.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * XSLT_DEFAULT_VERSION: - * - * The default version of XSLT supported. - */ -#define XSLT_DEFAULT_VERSION "1.0" - -/** - * XSLT_DEFAULT_VENDOR: - * - * The XSLT "vendor" string for this processor. - */ -#define XSLT_DEFAULT_VENDOR "libxslt" - -/** - * XSLT_DEFAULT_URL: - * - * The XSLT "vendor" URL for this processor. - */ -#define XSLT_DEFAULT_URL "http://xmlsoft.org/XSLT/" - -/** - * XSLT_NAMESPACE: - * - * The XSLT specification namespace. - */ -#define XSLT_NAMESPACE ((xmlChar *) "http://www.w3.org/1999/XSL/Transform") - -#if LIBXML_VERSION >= 20600 -/** - * XSLT_PARSE_OPTIONS: - * - * The set of options to pass to an xmlReadxxx when loading files for - * XSLT consumption. - */ -#define XSLT_PARSE_OPTIONS \ - XML_PARSE_NOENT | XML_PARSE_DTDLOAD | XML_PARSE_DTDATTR | XML_PARSE_NOCDATA -#endif - -/** - * xsltMaxDepth: - * - * This value is used to detect templates loops. - */ -XSLTPUBVAR int xsltMaxDepth; - -/** - * xsltEngineVersion: - * - * The version string for libxslt. - */ -XSLTPUBVAR const char *xsltEngineVersion; - -/** - * xsltLibxsltVersion: - * - * The version of libxslt compiled. - */ -XSLTPUBVAR const int xsltLibxsltVersion; - -/** - * xsltLibxmlVersion: - * - * The version of libxml libxslt was compiled against. - */ -XSLTPUBVAR const int xsltLibxmlVersion; - -/* - * Global cleanup function. - */ -XSLTPUBFUN void XSLTCALL - xsltCleanupGlobals (void); - -#ifdef __cplusplus -} -#endif - -#endif /* __XML_XSLT_H__ */ - diff --git a/plugins/Variables/src/libxslt/xsltInternals.h b/plugins/Variables/src/libxslt/xsltInternals.h deleted file mode 100644 index 78b80661da..0000000000 --- a/plugins/Variables/src/libxslt/xsltInternals.h +++ /dev/null @@ -1,609 +0,0 @@ -/* - * xsltInternals.h: internal data structures, constants and functions used - * by the XSLT engine. - * They are not part of the API or ABI, i.e. they can change - * without prior notice, use carefully. - * - * See Copyright for the status of this software. - * - * daniel@veillard.com - */ - -#ifndef __XML_XSLT_INTERNALS_H__ -#define __XML_XSLT_INTERNALS_H__ - -#include "libxml/tree.h" -#include "libxml/hash.h" -#include "libxml/xpath.h" -#include "libxml/xmlerror.h" -#include "libxslt/xslt.h" -#include "xsltexports.h" -#include "numbersInternals.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * XSLT_MAX_SORT: - * - * Max number of specified xsl:sort on an element. - */ -#define XSLT_MAX_SORT 15 - -/** - * XSLT_PAT_NO_PRIORITY: - * - * Specific value for pattern without priority expressed. - */ -#define XSLT_PAT_NO_PRIORITY -12345789 - -/** - * xsltRuntimeExtra: - * - * Extra information added to the transformation context. - */ -typedef struct _xsltRuntimeExtra xsltRuntimeExtra; -typedef xsltRuntimeExtra *xsltRuntimeExtraPtr; -struct _xsltRuntimeExtra { - void *info; /* pointer to the extra data */ - xmlFreeFunc deallocate; /* pointer to the deallocation routine */ - void *val; /* data not needing deallocation */ -}; - -/** - * XSLT_RUNTIME_EXTRA_LST: - * @ctxt: the transformation context - * @nr: the index - * - * Macro used to access extra information stored in the context - */ -#define XSLT_RUNTIME_EXTRA_LST(ctxt, nr) (ctxt)->extras[(nr)].info -/** - * XSLT_RUNTIME_EXTRA_FREE: - * @ctxt: the transformation context - * @nr: the index - * - * Macro used to free extra information stored in the context - */ -#define XSLT_RUNTIME_EXTRA_FREE(ctxt, nr) (ctxt)->extras[(nr)].deallocate -/** - * XSLT_RUNTIME_EXTRA: - * @ctxt: the transformation context - * @nr: the index - * - * Macro used to define extra information stored in the context - */ -#define XSLT_RUNTIME_EXTRA(ctxt, nr) (ctxt)->extras[(nr)].val - -/** - * xsltTemplate: - * - * The in-memory structure corresponding to an XSLT Template. - */ -typedef struct _xsltTemplate xsltTemplate; -typedef xsltTemplate *xsltTemplatePtr; -struct _xsltTemplate { - struct _xsltTemplate *next;/* chained list sorted by priority */ - struct _xsltStylesheet *style;/* the containing stylesheet */ - xmlChar *match; /* the matching string */ - float priority; /* as given from the stylesheet, not computed */ - xmlChar *name; /* the local part of the name QName */ - xmlChar *nameURI; /* the URI part of the name QName */ - xmlChar *mode; /* the local part of the mode QName */ - xmlChar *modeURI; /* the URI part of the mode QName */ - xmlNodePtr content; /* the template replacement value */ - xmlNodePtr elem; /* the source element */ - - int inheritedNsNr; /* number of inherited namespaces */ - xmlNsPtr *inheritedNs;/* inherited non-excluded namespaces */ - - /* Profiling informations */ - int nbCalls; /* the number of time the template was called */ - unsigned long time; /* the time spent in this template */ -}; - -/** - * xsltDecimalFormat: - * - * Data structure of decimal-format. - */ -typedef struct _xsltDecimalFormat xsltDecimalFormat; -typedef xsltDecimalFormat *xsltDecimalFormatPtr; -struct _xsltDecimalFormat { - struct _xsltDecimalFormat *next; /* chained list */ - xmlChar *name; - /* Used for interpretation of pattern */ - xmlChar *digit; - xmlChar *patternSeparator; - /* May appear in result */ - xmlChar *minusSign; - xmlChar *infinity; - xmlChar *noNumber; /* Not-a-number */ - /* Used for interpretation of pattern and may appear in result */ - xmlChar *decimalPoint; - xmlChar *grouping; - xmlChar *percent; - xmlChar *permille; - xmlChar *zeroDigit; -}; - -/** - * xsltDocument: - * - * Data structure associated to a parsed document. - */ - -typedef struct _xsltDocument xsltDocument; -typedef xsltDocument *xsltDocumentPtr; -struct _xsltDocument { - struct _xsltDocument *next; /* documents are kept in a chained list */ - int main; /* is this the main document */ - xmlDocPtr doc; /* the parsed document */ - void *keys; /* key tables storage */ -}; - -typedef struct _xsltTransformContext xsltTransformContext; -typedef xsltTransformContext *xsltTransformContextPtr; - -/** - * xsltElemPreComp: - * - * The in-memory structure corresponding to element precomputed data, - * designed to be extended by extension implementors. - */ -typedef struct _xsltElemPreComp xsltElemPreComp; -typedef xsltElemPreComp *xsltElemPreCompPtr; - -/** - * xsltTransformFunction: - * @ctxt: the XSLT transformation context - * @node: the input node - * @inst: the stylesheet node - * @comp: the compiled information from the stylesheet - * - * Signature of the function associated to elements part of the - * stylesheet language like xsl:if or xsl:apply-templates. - */ -typedef void (*xsltTransformFunction) (xsltTransformContextPtr ctxt, - xmlNodePtr node, - xmlNodePtr inst, - xsltElemPreCompPtr comp); - -/** - * xsltSortFunc: - * @ctxt: a transformation context - * @sorts: the node-set to sort - * @nbsorts: the number of sorts - * - * Signature of the function to use during sorting - */ -typedef void (*xsltSortFunc) (xsltTransformContextPtr ctxt, xmlNodePtr *sorts, - int nbsorts); - -typedef enum { - XSLT_FUNC_COPY=1, - XSLT_FUNC_SORT, - XSLT_FUNC_TEXT, - XSLT_FUNC_ELEMENT, - XSLT_FUNC_ATTRIBUTE, - XSLT_FUNC_COMMENT, - XSLT_FUNC_PI, - XSLT_FUNC_COPYOF, - XSLT_FUNC_VALUEOF, - XSLT_FUNC_NUMBER, - XSLT_FUNC_APPLYIMPORTS, - XSLT_FUNC_CALLTEMPLATE, - XSLT_FUNC_APPLYTEMPLATES, - XSLT_FUNC_CHOOSE, - XSLT_FUNC_IF, - XSLT_FUNC_FOREACH, - XSLT_FUNC_DOCUMENT, - XSLT_FUNC_WITHPARAM, - XSLT_FUNC_PARAM, - XSLT_FUNC_VARIABLE, - XSLT_FUNC_WHEN, - XSLT_FUNC_EXTENSION -} xsltStyleType; - -/** - * xsltElemPreCompDeallocator: - * @comp: the #xsltElemPreComp to free up - * - * Deallocates an #xsltElemPreComp structure. - */ -typedef void (*xsltElemPreCompDeallocator) (xsltElemPreCompPtr comp); - -/** - * xsltElemPreComp: - * - * The in-memory structure corresponding to element precomputed data, - * designed to be extended by extension implementors. - */ -struct _xsltElemPreComp { - xsltElemPreCompPtr next; /* chained list */ - xsltStyleType type; /* type of the element */ - xsltTransformFunction func; /* handling function */ - xmlNodePtr inst; /* the instruction */ - - /* end of common part */ - xsltElemPreCompDeallocator free; /* the deallocator */ -}; - -/** - * xsltStylePreComp: - * - * The in-memory structure corresponding to XSLT stylesheet constructs - * precomputed data. - */ -typedef struct _xsltStylePreComp xsltStylePreComp; - -typedef xsltStylePreComp *xsltStylePreCompPtr; - -struct _xsltStylePreComp { - xsltElemPreCompPtr next; /* chained list */ - xsltStyleType type; /* type of the element */ - xsltTransformFunction func; /* handling function */ - xmlNodePtr inst; /* the instruction */ - - /* - * Pre computed values. - */ - - xmlChar *stype; /* sort */ - int has_stype; /* sort */ - int number; /* sort */ - xmlChar *order; /* sort */ - int has_order; /* sort */ - int descending; /* sort */ - xmlChar *lang; /* sort */ - int has_lang; /* sort */ - xmlChar *case_order; /* sort */ - int lower_first; /* sort */ - - xmlChar *use; /* copy, element */ - int has_use; /* copy, element */ - - int noescape; /* text */ - - xmlChar *name; /* element, attribute, pi */ - int has_name; /* element, attribute, pi */ - xmlChar *ns; /* element */ - int has_ns; /* element */ - - xmlChar *mode; /* apply-templates */ - xmlChar *modeURI; /* apply-templates */ - - xmlChar *test; /* if */ - - xsltTemplatePtr templ; /* call-template */ - - xmlChar *select; /* sort, copy-of, value-of, apply-templates */ - - int ver11; /* document */ - xmlChar *filename; /* document URL */ - int has_filename; /* document */ - - xsltNumberData numdata; /* number */ - - xmlXPathCompExprPtr comp; /* a precompiled XPath expression */ - xmlNsPtr *nsList; /* the namespaces in scope */ - int nsNr; /* the number of namespaces in scope */ -}; - -/* - * The in-memory structure corresponding to an XSLT Variable - * or Param. - */ - -typedef struct _xsltStackElem xsltStackElem; -typedef xsltStackElem *xsltStackElemPtr; -struct _xsltStackElem { - struct _xsltStackElem *next;/* chained list */ - xsltStylePreCompPtr comp; /* the compiled form */ - int computed; /* was the evaluation done */ - xmlChar *name; /* the local part of the name QName */ - xmlChar *nameURI; /* the URI part of the name QName */ - xmlChar *select; /* the eval string */ - xmlNodePtr tree; /* the tree if no eval string or the location */ - xmlXPathObjectPtr value; /* The value if computed */ -}; - -/* - * The in-memory structure corresponding to an XSLT Stylesheet. - * NOTE: most of the content is simply linked from the doc tree - * structure, no specific allocation is made. - */ -typedef struct _xsltStylesheet xsltStylesheet; -typedef xsltStylesheet *xsltStylesheetPtr; -struct _xsltStylesheet { - /* - * The stylesheet import relation is kept as a tree. - */ - struct _xsltStylesheet *parent; - struct _xsltStylesheet *next; - struct _xsltStylesheet *imports; - - xsltDocumentPtr docList; /* the include document list */ - - /* - * General data on the style sheet document. - */ - xmlDocPtr doc; /* the parsed XML stylesheet */ - xmlHashTablePtr stripSpaces;/* the hash table of the strip-space and - preserve space elements */ - int stripAll; /* strip-space * (1) preserve-space * (-1) */ - xmlHashTablePtr cdataSection;/* the hash table of the cdata-section */ - - /* - * Global variable or parameters. - */ - xsltStackElemPtr variables; /* linked list of param and variables */ - - /* - * Template descriptions. - */ - xsltTemplatePtr templates; /* the ordered list of templates */ - void *templatesHash; /* hash table or wherever compiled templates - informations are stored */ - void *rootMatch; /* template based on / */ - void *keyMatch; /* template based on key() */ - void *elemMatch; /* template based on * */ - void *attrMatch; /* template based on @* */ - void *parentMatch; /* template based on .. */ - void *textMatch; /* template based on text() */ - void *piMatch; /* template based on processing-instruction() */ - void *commentMatch; /* template based on comment() */ - - /* - * Namespace aliases. - */ - xmlHashTablePtr nsAliases; /* the namespace alias hash tables */ - - /* - * Attribute sets. - */ - xmlHashTablePtr attributeSets;/* the attribute sets hash tables */ - - /* - * Namespaces. - */ - xmlHashTablePtr nsHash; /* the set of namespaces in use */ - void *nsDefs; /* the namespaces defined */ - - /* - * Key definitions. - */ - void *keys; /* key definitions */ - - /* - * Output related stuff. - */ - xmlChar *method; /* the output method */ - xmlChar *methodURI; /* associated namespace if any */ - xmlChar *version; /* version string */ - xmlChar *encoding; /* encoding string */ - int omitXmlDeclaration; /* omit-xml-declaration = "yes" | "no" */ - - /* - * Number formatting. - */ - xsltDecimalFormatPtr decimalFormat; - int standalone; /* standalone = "yes" | "no" */ - xmlChar *doctypePublic; /* doctype-public string */ - xmlChar *doctypeSystem; /* doctype-system string */ - int indent; /* should output being indented */ - xmlChar *mediaType; /* media-type string */ - - /* - * Precomputed blocks. - */ - xsltElemPreCompPtr preComps;/* list of precomputed blocks */ - int warnings; /* number of warnings found at compilation */ - int errors; /* number of errors found at compilation */ - - xmlChar *exclPrefix; /* last excluded prefixes */ - xmlChar **exclPrefixTab; /* array of excluded prefixes */ - int exclPrefixNr; /* number of excluded prefixes in scope */ - int exclPrefixMax; /* size of the array */ - - void *_private; /* user defined data */ - - /* - * Extensions. - */ - xmlHashTablePtr extInfos; /* the extension data */ - int extrasNr; /* the number of extras required */ -}; - -/* - * The in-memory structure corresponding to an XSLT Transformation. - */ -typedef enum { - XSLT_OUTPUT_XML = 0, - XSLT_OUTPUT_HTML, - XSLT_OUTPUT_TEXT -} xsltOutputType; - -typedef enum { - XSLT_STATE_OK = 0, - XSLT_STATE_ERROR, - XSLT_STATE_STOPPED -} xsltTransformState; - -struct _xsltTransformContext { - xsltStylesheetPtr style; /* the stylesheet used */ - xsltOutputType type; /* the type of output */ - - xsltTemplatePtr templ; /* the current template */ - int templNr; /* Nb of templates in the stack */ - int templMax; /* Size of the templtes stack */ - xsltTemplatePtr *templTab; /* the template stack */ - - xsltStackElemPtr vars; /* the current variable list */ - int varsNr; /* Nb of variable list in the stack */ - int varsMax; /* Size of the variable list stack */ - xsltStackElemPtr *varsTab; /* the variable list stack */ - int varsBase; /* the var base for current templ */ - - /* - * Extensions - */ - xmlHashTablePtr extFunctions; /* the extension functions */ - xmlHashTablePtr extElements; /* the extension elements */ - xmlHashTablePtr extInfos; /* the extension data */ - - const xmlChar *mode; /* the current mode */ - const xmlChar *modeURI; /* the current mode URI */ - - xsltDocumentPtr docList; /* the document list */ - - xsltDocumentPtr document; /* the current document */ - xmlNodePtr node; /* the current node being processed */ - xmlNodeSetPtr nodeList; /* the current node list */ - /* xmlNodePtr current; the node */ - - xmlDocPtr output; /* the resulting document */ - xmlNodePtr insert; /* the insertion node */ - - xmlXPathContextPtr xpathCtxt; /* the XPath context */ - xsltTransformState state; /* the current state */ - - /* - * Global variables - */ - xmlHashTablePtr globalVars; /* the global variables and params */ - - xmlNodePtr inst; /* the instruction in the stylesheet */ - - int xinclude; /* should XInclude be processed */ - - const char * outputFile; /* the output URI if known */ - - int profile; /* is this run profiled */ - long prof; /* the current profiled value */ - int profNr; /* Nb of templates in the stack */ - int profMax; /* Size of the templtaes stack */ - long *profTab; /* the profile template stack */ - - void *_private; /* user defined data */ - - int extrasNr; /* the number of extras used */ - int extrasMax; /* the number of extras allocated */ - xsltRuntimeExtraPtr extras; /* extra per runtime informations */ - - xsltDocumentPtr styleList; /* the stylesheet docs list */ - void * sec; /* the security preferences if any */ - - xmlGenericErrorFunc error; /* a specific error handler */ - void * errctx; /* context for the error handler */ - - xsltSortFunc sortfunc; /* a ctxt specific sort routine */ - - /* - * handling of temporary Result Value Tree - */ - xmlDocPtr tmpRVT; /* list of RVT without persistance */ - xmlDocPtr persistRVT; /* list of persistant RVTs */ - int ctxtflags; /* context processing flags */ - - /* - * Speed optimization when coalescing text nodes - */ - const xmlChar *lasttext; /* last text node content */ - unsigned int lasttsize; /* last text node size */ - unsigned int lasttuse; /* last text node use */ -}; - -/** - * CHECK_STOPPED: - * - * Macro to check if the XSLT processing should be stopped. - * Will return from the function. - */ -#define CHECK_STOPPED if (ctxt->state == XSLT_STATE_STOPPED) return; - -/** - * CHECK_STOPPEDE: - * - * Macro to check if the XSLT processing should be stopped. - * Will goto the error: label. - */ -#define CHECK_STOPPEDE if (ctxt->state == XSLT_STATE_STOPPED) goto error; - -/** - * CHECK_STOPPED0: - * - * Macro to check if the XSLT processing should be stopped. - * Will return from the function with a 0 value. - */ -#define CHECK_STOPPED0 if (ctxt->state == XSLT_STATE_STOPPED) return(0); - -/* - * Functions associated to the internal types -xsltDecimalFormatPtr xsltDecimalFormatGetByName(xsltStylesheetPtr sheet, - xmlChar *name); - */ -XSLTPUBFUN xsltStylesheetPtr XSLTCALL - xsltNewStylesheet (void); -XSLTPUBFUN xsltStylesheetPtr XSLTCALL - xsltParseStylesheetFile (const xmlChar* filename); -XSLTPUBFUN void XSLTCALL - xsltFreeStylesheet (xsltStylesheetPtr sheet); -XSLTPUBFUN int XSLTCALL - xsltIsBlank (xmlChar *str); -XSLTPUBFUN void XSLTCALL - xsltFreeStackElemList (xsltStackElemPtr elem); -XSLTPUBFUN xsltDecimalFormatPtr XSLTCALL - xsltDecimalFormatGetByName(xsltStylesheetPtr sheet, - xmlChar *name); - -XSLTPUBFUN xsltStylesheetPtr XSLTCALL - xsltParseStylesheetProcess(xsltStylesheetPtr ret, - xmlDocPtr doc); -XSLTPUBFUN void XSLTCALL - xsltParseStylesheetOutput(xsltStylesheetPtr style, - xmlNodePtr cur); -XSLTPUBFUN xsltStylesheetPtr XSLTCALL - xsltParseStylesheetDoc (xmlDocPtr doc); -XSLTPUBFUN xsltStylesheetPtr XSLTCALL - xsltParseStylesheetImportedDoc(xmlDocPtr doc); -XSLTPUBFUN xsltStylesheetPtr XSLTCALL - xsltLoadStylesheetPI (xmlDocPtr doc); -XSLTPUBFUN void XSLTCALL - xsltNumberFormat (xsltTransformContextPtr ctxt, - xsltNumberDataPtr data, - xmlNodePtr node); -XSLTPUBFUN xmlXPathError XSLTCALL - xsltFormatNumberConversion(xsltDecimalFormatPtr self, - xmlChar *format, - double number, - xmlChar **result); - -XSLTPUBFUN void XSLTCALL - xsltParseTemplateContent(xsltStylesheetPtr style, - xmlNodePtr templ); -XSLTPUBFUN int XSLTCALL - xsltAllocateExtra (xsltStylesheetPtr style); -XSLTPUBFUN int XSLTCALL - xsltAllocateExtraCtxt (xsltTransformContextPtr ctxt); -/* - * Extra functions for Result Value Trees - */ -XSLTPUBFUN xmlDocPtr XSLTCALL - xsltCreateRVT (xsltTransformContextPtr ctxt); -XSLTPUBFUN int XSLTCALL - xsltRegisterTmpRVT (xsltTransformContextPtr ctxt, - xmlDocPtr RVT); -XSLTPUBFUN int XSLTCALL - xsltRegisterPersistRVT (xsltTransformContextPtr ctxt, - xmlDocPtr RVT); -XSLTPUBFUN void XSLTCALL - xsltFreeRVTs (xsltTransformContextPtr ctxt); - -#ifdef __cplusplus -} -#endif - -#endif /* __XML_XSLT_H__ */ - diff --git a/plugins/Variables/src/libxslt/xsltexports.h b/plugins/Variables/src/libxslt/xsltexports.h deleted file mode 100644 index aab58025b8..0000000000 --- a/plugins/Variables/src/libxslt/xsltexports.h +++ /dev/null @@ -1,106 +0,0 @@ -/* - * xsltexports.h : macros for marking symbols as exportable/importable. - * - * See Copyright for the status of this software. - * - * igor@zlatkovic.com - */ - -#ifndef __XSLT_EXPORTS_H__ -#define __XSLT_EXPORTS_H__ - -/** - * XSLTPUBFUN: - * XSLTPUBFUN, XSLTPUBVAR, XSLTCALL - * - * Macros which declare an exportable function, an exportable variable and - * the calling convention used for functions. - * - * Please use an extra block for every platform/compiler combination when - * modifying this, rather than overlong #ifdef lines. This helps - * readability as well as the fact that different compilers on the same - * platform might need different definitions. - */ - -#define XSLTPUBFUN -#define XSLTPUBVAR extern -#define XSLTCALL - -/* Windows platform with MS compiler */ -#if defined(_WIN32) && defined(_MSC_VER) - #undef XSLTPUBFUN - #undef XSLTPUBVAR - #undef XSLTCALL - #if defined(IN_LIBXSLT) && !defined(LIBXSLT_STATIC) - #define XSLTPUBFUN __declspec(dllexport) - #define XSLTPUBVAR __declspec(dllexport) - #else - #define XSLTPUBFUN - #if !defined(LIBXSLT_STATIC) - #define XSLTPUBVAR __declspec(dllimport) extern - #else - #define XSLTPUBVAR extern - #endif - #endif - #define XSLTCALL __cdecl - #if !defined _REENTRANT - #define _REENTRANT - #endif -#endif - -/* Windows platform with Borland compiler */ -#if defined(_WIN32) && defined(__BORLANDC__) - #undef XSLTPUBFUN - #undef XSLTPUBVAR - #undef XSLTCALL - #if defined(IN_LIBXSLT) && !defined(LIBXSLT_STATIC) - #define XSLTPUBFUN __declspec(dllexport) - #define XSLTPUBVAR __declspec(dllexport) extern - #else - #define XSLTPUBFUN - #if !defined(LIBXSLT_STATIC) - #define XSLTPUBVAR __declspec(dllimport) extern - #else - #define XSLTPUBVAR extern - #endif - #endif - #define XSLTCALL __cdecl - #if !defined _REENTRANT - #define _REENTRANT - #endif -#endif - -/* Windows platform with GNU compiler (Mingw) */ -#if defined(_WIN32) && defined(__MINGW__) - #if !defined _REENTRANT - #define _REENTRANT - #endif -#endif - -/* Cygwin platform, GNU compiler */ -#if defined(_WIN32) && defined(__CYGWIN__) - #undef XSLTPUBFUN - #undef XSLTPUBVAR - #undef XSLTCALL - #if defined(IN_LIBXSLT) && !defined(LIBXSLT_STATIC) - #define XSLTPUBFUN __declspec(dllexport) - #define XSLTPUBVAR __declspec(dllexport) - #else - #define XSLTPUBFUN - #if !defined(LIBXSLT_STATIC) - #define XSLTPUBVAR __declspec(dllimport) extern - #else - #define XSLTPUBVAR - #endif - #endif - #define XSLTCALL __cdecl -#endif - -/* Compatibility */ -#if !defined(LIBXSLT_PUBLIC) -#define LIBXSLT_PUBLIC XSLTPUBVAR -#endif - -#endif /* __XSLT_EXPORTS_H__ */ - - diff --git a/plugins/Variables/src/libxslt/xsltutils.h b/plugins/Variables/src/libxslt/xsltutils.h deleted file mode 100644 index 699fd4ab1c..0000000000 --- a/plugins/Variables/src/libxslt/xsltutils.h +++ /dev/null @@ -1,240 +0,0 @@ -/* - * xsltutils.h: interfaces for the utilities module of the XSLT engine. - * - * See Copyright for the status of this software. - * - * daniel@veillard.com - */ - -#ifndef __XML_XSLTUTILS_H__ -#define __XML_XSLTUTILS_H__ - -#if defined(WIN32) && defined(_MSC_VER) -#include "libxslt/xsltwin32config.h" -#else -#include "libxslt/xsltconfig.h" -#endif - -#include "libxml/xpath.h" -#include "libxml/xmlerror.h" -#include "xsltexports.h" -#include "xsltInternals.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * XSLT_TODO: - * - * Macro to flag unimplemented blocks. - */ -#define XSLT_TODO \ - xsltGenericError(xsltGenericErrorContext, \ - "Unimplemented block at %s:%d\n", \ - __FILE__, __LINE__); - -/** - * XSLT_STRANGE: - * - * Macro to flag that a problem was detected internally. - */ -#define XSLT_STRANGE \ - xsltGenericError(xsltGenericErrorContext, \ - "Internal error at %s:%d\n", \ - __FILE__, __LINE__); - -/** - * IS_XSLT_ELEM: - * - * Checks that the element pertains to XSLT namespace. - */ -#define IS_XSLT_ELEM(n) \ - (((n) != NULL) && ((n)->ns != NULL) && \ - (xmlStrEqual((n)->ns->href, XSLT_NAMESPACE))) - -/** - * IS_XSLT_NAME: - * - * Checks the value of an element in XSLT namespace. - */ -#define IS_XSLT_NAME(n, val) \ - (xmlStrEqual((n)->name, (const xmlChar *) (val))) - -/** - * IS_XSLT_REAL_NODE: - * - * Check that a node is a 'real' one: document, element, text or attribute. - */ -#define IS_XSLT_REAL_NODE(n) \ - (((n) != NULL) && \ - (((n)->type == XML_ELEMENT_NODE) || \ - ((n)->type == XML_TEXT_NODE) || \ - ((n)->type == XML_ATTRIBUTE_NODE) || \ - ((n)->type == XML_DOCUMENT_NODE) || \ - ((n)->type == XML_HTML_DOCUMENT_NODE) || \ - ((n)->type == XML_PI_NODE))) - -/* - * Our own version of namespaced atributes lookup. - */ -XSLTPUBFUN xmlChar * XSLTCALL xsltGetNsProp (xmlNodePtr node, - const xmlChar *name, - const xmlChar *nameSpace); -XSLTPUBFUN int XSLTCALL xsltGetUTF8Char (const unsigned char *utf, - int *len); - -/* - * XSLT specific error and debug reporting functions. - */ -XSLTPUBVAR xmlGenericErrorFunc xsltGenericError; -XSLTPUBVAR void *xsltGenericErrorContext; -XSLTPUBVAR xmlGenericErrorFunc xsltGenericDebug; -XSLTPUBVAR void *xsltGenericDebugContext; - -XSLTPUBFUN void XSLTCALL - xsltPrintErrorContext (xsltTransformContextPtr ctxt, - xsltStylesheetPtr style, - xmlNodePtr node); -XSLTPUBFUN void XSLTCALL - xsltMessage (xsltTransformContextPtr ctxt, - xmlNodePtr node, - xmlNodePtr inst); -XSLTPUBFUN void XSLTCALL - xsltSetGenericErrorFunc (void *ctx, - xmlGenericErrorFunc handler); -XSLTPUBFUN void XSLTCALL - xsltSetGenericDebugFunc (void *ctx, - xmlGenericErrorFunc handler); -XSLTPUBFUN void XSLTCALL - xsltSetTransformErrorFunc (xsltTransformContextPtr ctxt, - void *ctx, - xmlGenericErrorFunc handler); -XSLTPUBFUN void XSLTCALL - xsltTransformError (xsltTransformContextPtr ctxt, - xsltStylesheetPtr style, - xmlNodePtr node, - const char *msg, - ...); - -/* - * Sorting. - */ - -XSLTPUBFUN void XSLTCALL - xsltDocumentSortFunction (xmlNodeSetPtr list); -XSLTPUBFUN void XSLTCALL - xsltSetSortFunc (xsltSortFunc handler); -XSLTPUBFUN void XSLTCALL - xsltSetCtxtSortFunc (xsltTransformContextPtr ctxt, - xsltSortFunc handler); -XSLTPUBFUN void XSLTCALL - xsltDefaultSortFunction (xsltTransformContextPtr ctxt, - xmlNodePtr *sorts, - int nbsorts); -XSLTPUBFUN void XSLTCALL - xsltDoSortFunction (xsltTransformContextPtr ctxt, - xmlNodePtr * sorts, - int nbsorts); -XSLTPUBFUN xmlXPathObjectPtr * XSLTCALL - xsltComputeSortResult (xsltTransformContextPtr ctxt, - xmlNodePtr sort); - -/* - * QNames handling. - */ - -XSLTPUBFUN const xmlChar * XSLTCALL - xsltGetQNameURI (xmlNodePtr node, - xmlChar **name); - -/* - * Output, reuse libxml I/O buffers. - */ -XSLTPUBFUN int XSLTCALL - xsltSaveResultTo (xmlOutputBufferPtr buf, - xmlDocPtr result, - xsltStylesheetPtr style); -XSLTPUBFUN int XSLTCALL - xsltSaveResultToFilename (const char *URI, - xmlDocPtr result, - xsltStylesheetPtr style, - int compression); -XSLTPUBFUN int XSLTCALL - xsltSaveResultToFile (FILE *file, - xmlDocPtr result, - xsltStylesheetPtr style); -XSLTPUBFUN int XSLTCALL - xsltSaveResultToFd (int fd, - xmlDocPtr result, - xsltStylesheetPtr style); -XSLTPUBFUN int XSLTCALL - xsltSaveResultToString (xmlChar **doc_txt_ptr, - int * doc_txt_len, - xmlDocPtr result, - xsltStylesheetPtr style); - -/* - * Profiling. - */ -XSLTPUBFUN void XSLTCALL - xsltSaveProfiling (xsltTransformContextPtr ctxt, - FILE *output); -XSLTPUBFUN xmlDocPtr XSLTCALL - xsltGetProfileInformation (xsltTransformContextPtr ctxt); - -XSLTPUBFUN long XSLTCALL - xsltTimestamp (void); -XSLTPUBFUN void XSLTCALL - xsltCalibrateAdjust (long delta); - -/** - * XSLT_TIMESTAMP_TICS_PER_SEC: - * - * Sampling precision for profiling - */ -#define XSLT_TIMESTAMP_TICS_PER_SEC 100000l - -/* - * Hooks for the debugger. - */ - -typedef enum { - XSLT_DEBUG_NONE = 0, /* no debugging allowed */ - XSLT_DEBUG_INIT, - XSLT_DEBUG_STEP, - XSLT_DEBUG_STEPOUT, - XSLT_DEBUG_NEXT, - XSLT_DEBUG_STOP, - XSLT_DEBUG_CONT, - XSLT_DEBUG_RUN, - XSLT_DEBUG_RUN_RESTART, - XSLT_DEBUG_QUIT -} xsltDebugStatusCodes; - -XSLTPUBVAR int xslDebugStatus; - -typedef void (*xsltHandleDebuggerCallback) (xmlNodePtr cur, xmlNodePtr node, - xsltTemplatePtr templ, xsltTransformContextPtr ctxt); -typedef int (*xsltAddCallCallback) (xsltTemplatePtr templ, xmlNodePtr source); -typedef void (*xsltDropCallCallback) (void); - -XSLTPUBFUN void XSLTCALL - xsltSetDebuggerStatus (int value); -XSLTPUBFUN int XSLTCALL - xsltGetDebuggerStatus (void); -XSLTPUBFUN int XSLTCALL - xsltSetDebuggerCallbacks (int no, void *block); -XSLTPUBFUN int XSLTCALL - xslAddCall (xsltTemplatePtr templ, - xmlNodePtr source); -XSLTPUBFUN void XSLTCALL - xslDropCall (void); - -#ifdef __cplusplus -} -#endif - -#endif /* __XML_XSLTUTILS_H__ */ - - diff --git a/plugins/Variables/src/libxslt/xsltwin32config.h b/plugins/Variables/src/libxslt/xsltwin32config.h deleted file mode 100644 index 985bfc71dc..0000000000 --- a/plugins/Variables/src/libxslt/xsltwin32config.h +++ /dev/null @@ -1,84 +0,0 @@ -/* - * xsltwin32config.h: compile-time version informations for the XSLT engine - * when compiled on windows - * - * See Copyright for the status of this software. - * - * daniel@veillard.com - */ - -#ifndef __XML_XSLTWIN32CONFIG_H__ -#define __XML_XSLTWIN32CONFIG_H__ - -#include "win32config.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * LIBXSLT_DOTTED_VERSION: - * - * the version string like "1.2.3" - */ -#define LIBXSLT_DOTTED_VERSION "1.1.0" - -/** - * LIBXSLT_VERSION: - * - * the version number: 1.2.3 value is 1002003 - */ -#define LIBXSLT_VERSION 10100 - -/** - * LIBXSLT_VERSION_STRING: - * - * the version number string, 1.2.3 value is "1002003" - */ -#define LIBXSLT_VERSION_STRING "10100" - -/** - * WITH_XSLT_DEBUG: - * - * Activate the compilation of the debug reporting. Speed penalty - * is insignifiant and being able to run xsltpoc -v is useful. On - * by default - */ -#if 1 -#define WITH_XSLT_DEBUG -#endif - -#if 0 -/** - * DEBUG_MEMORY: - * - * should be activated only when debugging libxslt. It replaces the - * allocator with a collect and debug shell to the libc allocator. - * Use configure --with-mem-debug to activate it on both library - */ -#define DEBUG_MEMORY - -/** - * DEBUG_MEMORY_LOCATION: - * - * should be activated only when debugging libxslt. - * DEBUG_MEMORY_LOCATION should be activated only when libxml has - * been configured with --with-debug-mem too - */ -#define DEBUG_MEMORY_LOCATION -#endif - -/** - * ATTRIBUTE_UNUSED: - * - * This macro is used to flag unused function parameters to GCC, useless here - */ -#ifndef ATTRIBUTE_UNUSED -#define ATTRIBUTE_UNUSED -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* __XML_XSLTWIN32CONFIG_H__ */ diff --git a/plugins/Variables/src/parse_xml.cpp b/plugins/Variables/src/parse_xml.cpp deleted file mode 100644 index 9407aa7ee9..0000000000 --- a/plugins/Variables/src/parse_xml.cpp +++ /dev/null @@ -1,257 +0,0 @@ -/*
- Variables Plugin for Miranda-IM (www.miranda-im.org)
- Copyright 2003-2006 P. Boon
-
- This program is mir_free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
-
-#include "variables.h"
-
-xsltStylesheetPtr (*pXsltParseStylesheetDoc)(xmlDocPtr doc);
-xmlDocPtr (*pXmlParseMemory)(const char * buffer, int size);
-
-void (*pXmlFree)(void *mem);
-xmlDocPtr (*pXmlParseFile)(const char * filename);
-void (*pXmlFreeDoc)(xmlDocPtr cur);
-void (*pXmlInitParser)(void);
-void (*pXmlCleanupParser)(void);
-int (*pXmlSubstituteEntitiesDefault)(int val);
-
-xsltStylesheetPtr (*pXsltParseStylesheetFile)(const xmlChar * filename);
-int (*pXsltSaveResultToString)(xmlChar ** doc_txt_ptr, int * doc_txt_len, xmlDocPtr result, xsltStylesheetPtr style);
-void (*pXsltFreeStylesheet)(xsltStylesheetPtr sheet);
-xmlDocPtr (*pXsltApplyStylesheet)(xsltStylesheetPtr style, xmlDocPtr doc, const char ** params);
-void (*pXsltCleanupGlobals)(void);
-
-/*
- pattern, subject
-*/
-static TCHAR *parseXslts(ARGUMENTSINFO *ai) {
- xmlDocPtr res;
- xmlChar *xmlChRes = NULL;
- int resLen;
-
- if (ai->argc != 3) {
- return NULL;
- }
-
- char *szStyleSheet = mir_t2a(ai->targv[1]);
- char *szDoc = mir_t2a(ai->targv[2]);
-
-
- log_debugA("calling xsltParseMemory");
- xmlDocPtr sdoc = pXmlParseMemory(szStyleSheet, (int)strlen(szStyleSheet));
- if (sdoc == NULL) {
- return NULL;
- }
-
- log_debugA("calling xsltParseStylesheetDoc");
- xsltStylesheetPtr cur = pXsltParseStylesheetDoc(sdoc);
- if (cur == NULL) {
- log_debugA("calling xsltFreeDoc");
- pXmlFreeDoc(sdoc);
-
- return NULL;
- }
-
- log_debugA("calling xsltParseMemory");
- xmlDocPtr doc = pXmlParseMemory(szDoc, (int)strlen(szDoc));
- if (doc == NULL) {
- log_debugA("calling xsltFreeDoc");
- pXmlFreeDoc(sdoc);
- log_debugA("calling xsltFreeStylesheet");
- pXsltFreeStylesheet(cur);
-
- return NULL;
- }
-
- log_debugA("calling xsltApplyStylesheet");
- res = pXsltApplyStylesheet(cur, doc, NULL);
- if (res == NULL) {
- log_debugA("calling xsltFreeStylesheet");
- pXsltFreeStylesheet(cur);
- log_debugA("calling xsltFreeDoc");
- pXmlFreeDoc(doc);
- log_debugA("calling xsltFreeDoc");
- pXmlFreeDoc(sdoc);
-
- return NULL;
- }
-
- log_debugA("calling xsltSaveResultToString");
- pXsltSaveResultToString(&xmlChRes, &resLen, res, cur);
- log_debugA("calling xsltFreeStylesheet");
- pXsltFreeStylesheet(cur);
- log_debugA("calling xsltFreeDoc");
- pXmlFreeDoc(res);
- log_debugA("calling xsltFreeDoc");
- pXmlFreeDoc(doc);
- log_debugA("calling mir_free");
- mir_free(szStyleSheet);
- log_debugA("calling mir_free");
- mir_free(szDoc);
-
- TCHAR *tszRes = mir_a2t((char *)xmlChRes);
-
- log_debugA("calling xmlFree");
- pXmlFree(xmlChRes);
-
- return tszRes;
-}
-
-/*
- files
-*/
-static TCHAR *parseXsltf(ARGUMENTSINFO *ai) {
- TCHAR *tszRes;
- xmlDocPtr doc, res;
- xmlChar *xmlChRes = NULL;
- int resLen;
-
- if (ai->argc != 3) {
- return NULL;
- }
-
- char *szStyleSheet = mir_t2a(ai->targv[1]);
- char *szDoc = mir_t2a(ai->targv[2]);
-
-
- log_debugA("xslt with %s and %s", szStyleSheet, szDoc);
-
- log_debugA("calling xsltParseStylesheetFile");
- xsltStylesheetPtr cur = pXsltParseStylesheetFile((const xmlChar *)szStyleSheet);
- if (cur == NULL) {
-
- return NULL;
- }
- log_debugA("result: %x", cur);
-
- log_debugA("calling xmlParseFile");
- doc = pXmlParseFile(szDoc);
- if (doc == NULL) {
- pXsltFreeStylesheet(cur);
-
- return NULL;
- }
- log_debugA("result: %x", doc);
-
- log_debugA("calling xsltApplyStylesheet");
- res = pXsltApplyStylesheet(cur, doc, NULL);
- if (res == NULL) {
- pXsltFreeStylesheet(cur);
- pXmlFreeDoc(doc);
-
- return NULL;
- }
- log_debugA("result: %x", res);
-
- log_debugA("calling xsltSaveResultToString");
- pXsltSaveResultToString(&xmlChRes, &resLen, res, cur);
-
- log_debugA("calling xsltFreeStylesheet(cur)");
- pXsltFreeStylesheet(cur);
-
- log_debugA("calling xmlFreeDoc(res)");
- pXmlFreeDoc(res);
-
- log_debugA("calling xmlFreeDoc(doc)");
- pXmlFreeDoc(doc);
-
- //log_debug("calling xsltCleanupGlobals");
- //pXsltCleanupGlobals();
-
- //log_debug("calling xmlCleanupParser");
- //pXmlCleanupParser();
-
- mir_free(szStyleSheet);
- mir_free(szDoc);
-
- tszRes = mir_a2t((char *)xmlChRes);
-
- log_debugA("calling xmlFree");
- pXmlFree(xmlChRes);
-
- return tszRes;
-}
-
-int initXslt() {
- HMODULE hModule = LoadLibrary(_T("libxml2.dll"));
- if (hModule == NULL) {
- TCHAR path[MAX_PATH];
- GetModuleFileName(NULL, path, MAX_PATH);
- TCHAR *cur = _tcsrchr(path, '\\');
- if (cur != NULL)
- _tcscpy(cur+1, _T("libxml2.dll"));
- else
- _tcscpy(path, _T("libxml2.dll"));
- hModule = LoadLibrary(path);
- }
- if (hModule == NULL) {
- return -1;
- }
-
- pXmlParseFile = (struct _xmlDoc *(__cdecl *)(const char *))GetProcAddress(hModule, "xmlParseFile");
- pXmlFreeDoc = (void (__cdecl *)(struct _xmlDoc *))GetProcAddress(hModule, "xmlFreeDoc");
- pXmlCleanupParser = (void (__cdecl *)(void ))GetProcAddress(hModule, "xmlCleanupParser");
- pXmlInitParser = (void (__cdecl *)(void ))GetProcAddress(hModule, "xmlInitParser");
- pXmlParseMemory = (struct _xmlDoc *(__cdecl *)(const char *,int ))GetProcAddress(hModule, "xmlParseMemory");
- pXmlFree = (void (__cdecl *)(void *))*((void (__cdecl **)(void *))GetProcAddress(hModule, "xmlFree"));
- pXmlSubstituteEntitiesDefault = (int (__cdecl *)(int ))GetProcAddress(hModule, "xmlSubstituteEntitiesDefault");
-
- hModule = LoadLibraryA("libxslt.dll");
- if (hModule == NULL) {
- char path[MAX_PATH];
- char *cur;
-
- GetModuleFileNameA(NULL, path, sizeof(path));
- cur = strrchr(path, '\\');
- if (cur != NULL)
- strcpy(cur+1, "libxslt.dll");
- else
- strcpy(path, "libxslt.dll");
- hModule = LoadLibraryA(path);
- }
- if (hModule == NULL) {
- return -1;
- }
-
- /* xmlFree !!! pthreads? */
-
- pXsltParseStylesheetFile = (struct _xsltStylesheet *(__cdecl *)(const unsigned char *))GetProcAddress(hModule, "xsltParseStylesheetFile");
- pXsltFreeStylesheet = (void (__cdecl *)(struct _xsltStylesheet *))GetProcAddress(hModule, "xsltFreeStylesheet");
- pXsltApplyStylesheet = (struct _xmlDoc *(__cdecl *)(struct _xsltStylesheet *,struct _xmlDoc *,const char ** ))GetProcAddress(hModule, "xsltApplyStylesheet");
- pXsltSaveResultToString = (int (__cdecl *)(unsigned char ** ,int *,struct _xmlDoc *,struct _xsltStylesheet *))GetProcAddress(hModule, "xsltSaveResultToString");
- pXsltCleanupGlobals = (void (__cdecl *)(void ))GetProcAddress(hModule, "xsltCleanupGlobals");
- pXsltParseStylesheetDoc = (struct _xsltStylesheet *(__cdecl *)(struct _xmlDoc *))GetProcAddress(hModule, "xsltParseStylesheetDoc");
-
- /* init */
- pXmlInitParser();
- pXmlSubstituteEntitiesDefault(1);
-
- return 0;
-}
-
-int registerXsltTokens() {
-
- if (initXslt() != 0) {
- log_infoA("Variables: XSLT library not initialized");
- return -1;
- }
-
- registerIntToken(_T(XSLTF), parseXsltf, TRF_FUNCTION, LPGEN("XML")"\t(x,y)\t"LPGEN("apply stylesheet file x to document file y"));
- registerIntToken(_T(XSLTS), parseXslts, TRF_FUNCTION, LPGEN("XML")"\t(x,y)\t"LPGEN("apply stylesheet x to document y"));
-
- return 0;
-}
diff --git a/plugins/Variables/src/variables.cpp b/plugins/Variables/src/variables.cpp index 4e7ce05647..deed9115e5 100644 --- a/plugins/Variables/src/variables.cpp +++ b/plugins/Variables/src/variables.cpp @@ -533,7 +533,6 @@ int LoadVarModule() registerVariablesTokens();
registerRegExpTokens();
registerInetTokens();
- registerXsltTokens();
registerAliasTokens();
registerMetaContactsTokens();
diff --git a/plugins/Variables/src/variables.h b/plugins/Variables/src/variables.h index 21c8bdef59..aa9fd51526 100644 --- a/plugins/Variables/src/variables.h +++ b/plugins/Variables/src/variables.h @@ -48,17 +48,6 @@ #include "ac\ac.h"
#include "pcre\include\pcre.h"
-#include "libxml\xmlmemory.h"
-#include "libxml\debugXML.h"
-#include "libxml\HTMLtree.h"
-#include "libxml\xmlIO.h"
-#include "libxml\DOCBparser.h"
-#include "libxml\xinclude.h"
-#include "libxml\catalog.h"
-#include "libxslt\xslt.h"
-#include "libxslt\xsltInternals.h"
-#include "libxslt\transform.h"
-#include "libxslt\xsltutils.h"
#include "resource.h"
#include "version.h"
@@ -192,8 +181,6 @@ int OptionsInit(WPARAM wParam, LPARAM lParam); int registerRegExpTokens();
// inet
int registerInetTokens();
-// xml
-int registerXsltTokens();
// help
INT_PTR showHelpService(WPARAM wParam, LPARAM lParam);
INT_PTR showHelpExService(WPARAM wParam, LPARAM lParam);
|