diff options
Diffstat (limited to 'tclxml/include')
-rw-r--r-- | tclxml/include/tcldom-libxml2/nodeObj.h | 28 | ||||
-rw-r--r-- | tclxml/include/tcldom-libxml2/tcldom-libxml2.h | 266 | ||||
-rw-r--r-- | tclxml/include/tcldom/tcldom.h | 293 | ||||
-rw-r--r-- | tclxml/include/tclxml-libxml2/docObj.h | 60 | ||||
-rw-r--r-- | tclxml/include/tclxml-libxml2/tclxml-libxml2.h | 100 | ||||
-rw-r--r-- | tclxml/include/tclxml-libxml2/tclxml-libxml2Decls.h | 163 | ||||
-rwxr-xr-x | tclxml/include/tclxml/tclxml.h.in | 299 | ||||
-rw-r--r-- | tclxml/include/tclxml/tclxmlDecls.h | 361 | ||||
-rw-r--r-- | tclxml/include/tclxslt/tclxslt.h | 98 |
9 files changed, 1668 insertions, 0 deletions
diff --git a/tclxml/include/tcldom-libxml2/nodeObj.h b/tclxml/include/tcldom-libxml2/nodeObj.h new file mode 100644 index 0000000..37a7bcc --- /dev/null +++ b/tclxml/include/tcldom-libxml2/nodeObj.h @@ -0,0 +1,28 @@ +/* nodeObj.h -- + * + * This module manages libxml2 xmlNodePtr and event node Tcl objects. + * + * Copyright (c) 2003 Zveno Pty Ltd + * http://www.zveno.com/ + * + * See the file "LICENSE" for information on usage and + * redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. + * + * $Id: nodeObj.h,v 1.1.1.1 2009/01/16 22:11:49 joye Exp $ + */ + +#ifndef TCLDOM_LIBXML2_NODEOBJ_H +#define TCLDOM_LIBXML2_NODEOBJ_H + +#include "tcl.h" +#include <libxml/tree.h> +#include "tcldom-libxml2.h" + +#define TCLDOM_LIBXML2_NODE_NODE 0 +#define TCLDOM_LIBXML2_NODE_EVENT 1 + +typedef void (TclDOM_libxml2Node_FreeHookProc) _ANSI_ARGS_((ClientData clientData)); + +int TclDOM_libxml2_NodeObjInit _ANSI_ARGS_((Tcl_Interp *interp)); + +#endif /* TCLDOM_LIBXML2_NODEOBJ_H */ diff --git a/tclxml/include/tcldom-libxml2/tcldom-libxml2.h b/tclxml/include/tcldom-libxml2/tcldom-libxml2.h new file mode 100644 index 0000000..98fd3c8 --- /dev/null +++ b/tclxml/include/tcldom-libxml2/tcldom-libxml2.h @@ -0,0 +1,266 @@ + +/* tcldom-libxml2.h -- + * + * libxml2 wrapper for TclDOM. + * + * Copyright (c) 2005-2008 Explain + * http://www.explain.com.au/ + * Copyright (c) 2002-2003 Zveno Pty Ltd + * http://www.zveno.com/ + * + * See the file "LICENSE" for information on usage and + * redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. + * + * $Id: tcldom-libxml2.h,v 1.1.1.1 2009/01/16 22:11:49 joye Exp $ + */ + +#ifndef __TCLDOM_LIBXML2_H__ +#define __TCLDOM_LIBXML2_H__ + +#include <tcldom/tcldom.h> +#include <tclxml/tclxml.h> +#include <tclxml-libxml2/docObj.h> +#include <tclxml-libxml2/tclxml-libxml2Decls.h> +#include <libxml/tree.h> +#include <libxml/xmlschemas.h> + +/* + * For C++ compilers, use extern "C" + */ + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * These macros are used to control whether functions are being declared for + * import or export in Windows, + * They map to no-op declarations on non-Windows systems. + * Assumes that tcl.h defines DLLEXPORT & DLLIMPORT correctly. + * The default build on windows is for a DLL, which causes the DLLIMPORT + * and DLLEXPORT macros to be nonempty. To build a static library, the + * macro STATIC_BUILD should be defined before the inclusion of tcl.h + * + * If a function is being declared while it is being built + * to be included in a shared library, then it should have the DLLEXPORT + * storage class. If is being declared for use by a module that is going to + * link against the shared library, then it should have the DLLIMPORT storage + * class. If the symbol is beind declared for a static build or for use from a + * stub library, then the storage class should be empty. + * + * The convention is that a macro called BUILD_xxxx, where xxxx is the + * name of a library we are building, is set on the compile line for sources + * that are to be placed in the library. When this macro is set, the + * storage class will be set to DLLEXPORT. At the end of the header file, the + * storage class will be reset to DLLIMPORt. + */ + +#undef TCL_STORAGE_CLASS +#ifdef BUILD_Tcldom_libxml2 +# define TCL_STORAGE_CLASS DLLEXPORT +#else +# ifdef USE_TCL_STUBS +# define TCL_STORAGE_CLASS +# else +# define TCL_STORAGE_CLASS DLLIMPORT +# endif +#endif + +/* + * The following function is required to be defined in all stubs aware + * extensions of TclDOM. The function is actually implemented in the stub + * library, not the main Tcldom library, although there is a trivial + * implementation in the main library in case an extension is statically + * linked into an application. + */ + +EXTERN CONST char * Tcldom_libxml2_InitStubs _ANSI_ARGS_((Tcl_Interp *interp, + CONST char *version, int exact)); + +#ifndef USE_TCLDOMXML_STUBS + +/* + * When not using stubs, make it a macro. + */ + +#define Tcldom_libxml2_InitStubs(interp, version, exact) \ + Tcl_PkgRequire(interp, "dom::generic", version, exact) + +#endif + +/* + * DOM-specific data structure to hook onto documents. + */ + +typedef struct TclDOM_libxml2_Document { + Tcl_Interp *interp; + TclXML_libxml2_Document *tDocPtr; /* Pointer back to main document structure */ + Tcl_Obj *objPtr; /* An object to hold onto for this document */ + Tcl_Command cmd; /* Tcl command for this document */ + + Tcl_HashTable *nodes; + int nodeCntr; + + /* + * Validation support + */ + + xmlSchemaPtr schema; /* XML Schemas */ + /* xmlRelaxNGPtr relaxng; */ + + /* + * Event support. + * + * These tables are indexed by xmlNodePtr. + */ + + Tcl_HashTable *captureListeners; + Tcl_HashTable *bubbleListeners; + + /* + * Optimisation: boolean flag to indicate whether an + * event listener is registered for an event type. + * If no event listeners are registered then there is + * no point in propagating the event. + */ + + int listening[TCLDOM_NUM_EVENT_TYPES]; + +} TclDOM_libxml2_Document; + +/* + * Node management + */ + +/* + * "nodes" are overloaded: they can be either a libxml2 xmlNodePtr or + * an event, which is defined by this module. + */ + +typedef struct _TclDOM_libxml2_Node TclDOM_libxml2_Node; + +#define TCLDOM_LIBXML2_NODE_NODE 0 +#define TCLDOM_LIBXML2_NODE_EVENT 1 + +/* + * Data structure to support Events + */ + +typedef struct TclDOM_libxml2_Event { + TclDOM_libxml2_Node *tNodePtr; /* Generic node structure for this event */ + TclDOM_libxml2_Document *ownerDocument; /* Toplevel Document for this event */ + + enum TclDOM_EventTypes type; /* Enumerate rep of event type */ + Tcl_Obj *typeObjPtr; /* For user defined event type */ + + int stopPropagation; + int preventDefault; + int dispatched; + + Tcl_Obj *altKey; + Tcl_Obj *attrName; + Tcl_Obj *attrChange; + Tcl_Obj *bubbles; + Tcl_Obj *button; + Tcl_Obj *cancelable; + Tcl_Obj *clientX; + Tcl_Obj *clientY; + Tcl_Obj *ctrlKey; + Tcl_Obj *currentNode; + Tcl_Obj *detail; + Tcl_Obj *eventPhase; + Tcl_Obj *metaKey; + Tcl_Obj *newValue; + Tcl_Obj *prevValue; + Tcl_Obj *relatedNode; + Tcl_Obj *screenX; + Tcl_Obj *screenY; + Tcl_Obj *shiftKey; + Tcl_Obj *target; + Tcl_Obj *timeStamp; + Tcl_Obj *view; +} TclDOM_libxml2_Event; + +typedef void (TclDOM_libxml2_Node_FreeHookProc) _ANSI_ARGS_((ClientData clientData)); + +struct _TclDOM_libxml2_Node { + union { + xmlNodePtr nodePtr; + TclDOM_libxml2_Event *eventPtr; + } ptr; + + int type; /* Distinguish between libxml2 nodes and events */ + + char *token; /* string rep of this node */ + Tcl_Command cmd; /* Tcl command that access this structure */ + + void *objs; /* Opaque object for tracking Tcl_Obj's that refer to this node */ + + ClientData apphook; /* Application hook - not used by TclXML or TclDOM */ + TclDOM_libxml2_Node_FreeHookProc *appfree; +}; + +/* + * Public API + */ + +Tcl_Obj * TclDOM_libxml2_CreateObjFromDoc _ANSI_ARGS_((Tcl_Interp *interp, xmlDocPtr docPtr)); +Tcl_Obj * TclDOM_libxml2_CreateObjFromNode _ANSI_ARGS_((Tcl_Interp *interp, xmlNodePtr nodePtr)); +int TclDOM_libxml2_GetNodeFromObj _ANSI_ARGS_((Tcl_Interp *interp, Tcl_Obj *objPtr, xmlNodePtr *nodePtrPtr)); +int TclDOM_libxml2_GetTclNodeFromObj _ANSI_ARGS_((Tcl_Interp *interp, Tcl_Obj *objPtr, TclDOM_libxml2_Node **tNodePtrPtr)); +int TclDOM_libxml2_GetEventFromObj _ANSI_ARGS_((Tcl_Interp *interp, Tcl_Obj *objPtr, TclDOM_libxml2_Event **eventPtrPtr)); +int TclDOM_libxml2_GetTclEventFromObj _ANSI_ARGS_((Tcl_Interp *interp, Tcl_Obj *objPtr, TclDOM_libxml2_Node **tNodePtrPtr)); + +int TclDOM_PostMutationEvent _ANSI_ARGS_((Tcl_Interp *interp, + TclXML_libxml2_Document *tDocPtr, + Tcl_Obj *nodeObjPtr, + enum TclDOM_EventTypes type, + Tcl_Obj *typeObjPtr, + Tcl_Obj *bubblesPtr, + Tcl_Obj *cancelablePtr, + Tcl_Obj *relatedNodePtr, + Tcl_Obj *prevValuePtr, + Tcl_Obj *newValuePtr, + Tcl_Obj *attrNamePtr, + Tcl_Obj *attrChangePtr)); +int TclDOM_AddEventListener _ANSI_ARGS_((Tcl_Interp *interp, + TclXML_libxml2_Document *tDocPtr, + void *tokenPtr, /* xmlNodePtr or xmlDocPtr */ + enum TclDOM_EventTypes type, + Tcl_Obj *typeObjPtr, + Tcl_Obj *listenerPtr, + int capturer)); +Tcl_Obj * TclDOM_GetEventListener _ANSI_ARGS_((Tcl_Interp *interp, + TclXML_libxml2_Document *tDocPtr, + void *tokenPtr, + enum TclDOM_EventTypes type, + Tcl_Obj *typeObjPtr, + int capturer)); +int TclDOM_RemoveEventListener _ANSI_ARGS_((Tcl_Interp *interp, + TclXML_libxml2_Document *tDocPtr, + void *tokenPtr, + enum TclDOM_EventTypes type, + Tcl_Obj *typeObjPtr, + Tcl_Obj *listenerPtr, + int capturer)); +int TclDOM_DispatchEvent _ANSI_ARGS_((Tcl_Interp *interp, + Tcl_Obj *nodeObjPtr, + Tcl_Obj *eventObjPtr, + TclDOM_libxml2_Event *eventPtr)); + +/* + * Accessor functions => Stubs + */ + +/* +#include <tcldom-libxml2/tcldomlibxml2Decls.h> + +#undef TCL_STORAGE_CLASS +#define TCL_STORAGE_CLASS DLLIMPORT +*/ + +#ifdef __cplusplus +} +#endif + +#endif /* TCLDOM_LIBXML2_H__ */ diff --git a/tclxml/include/tcldom/tcldom.h b/tclxml/include/tcldom/tcldom.h new file mode 100644 index 0000000..08a016b --- /dev/null +++ b/tclxml/include/tcldom/tcldom.h @@ -0,0 +1,293 @@ +/* tcldom.h -- + * + * Generic layer of TclDOM API. + * + * Copyright (c) 2006-2008 Explain + * http://www.explain.com.au/ + * Copyright (c) 2002-2004 Zveno Pty Ltd + * http://www.zveno.com/ + * + * Zveno Pty Ltd makes this software and associated documentation + * available free of charge for any purpose. You may make copies + * of the software but you must include all of this notice on any copy. + * + * Zveno Pty Ltd does not warrant that this software is error free + * or fit for any purpose. Zveno Pty Ltd disclaims any liability for + * all claims, expenses, losses, damages and costs any user may incur + * as a result of using, copying or modifying the software. + * + * $Id: tcldom.h,v 1.1.1.1 2009/01/16 22:11:49 joye Exp $ + */ + +#ifndef __TCLDOM_H__ +#define __TCLDOM_H__ + +#include <tcl.h> + +/* + * For C++ compilers, use extern "C" + */ + +#ifdef __cplusplus +extern "C" { +#endif + +/* + + * These macros are used to control whether functions are being declared for + * import or export in Windows, + * They map to no-op declarations on non-Windows systems. + * Assumes that tcl.h defines DLLEXPORT & DLLIMPORT correctly. + * The default build on windows is for a DLL, which causes the DLLIMPORT + * and DLLEXPORT macros to be nonempty. To build a static library, the + * macro STATIC_BUILD should be defined before the inclusion of tcl.h + * + * If a function is being declared while it is being built + * to be included in a shared library, then it should have the DLLEXPORT + * storage class. If is being declared for use by a module that is going to + * link against the shared library, then it should have the DLLIMPORT storage + * class. If the symbol is beind declared for a static build or for use from a + * stub library, then the storage class should be empty. + * + * The convention is that a macro called BUILD_xxxx, where xxxx is the + * name of a library we are building, is set on the compile line for sources + * that are to be placed in the library. When this macro is set, the + * storage class will be set to DLLEXPORT. At the end of the header file, the + * storage class will be reset to DLLIMPORt. + */ + +#undef TCL_STORAGE_CLASS +#ifdef BUILD_tcldom +# define TCL_STORAGE_CLASS DLLEXPORT +#else +# ifdef USE_TCL_STUBS +# define TCL_STORAGE_CLASS +# else +# define TCL_STORAGE_CLASS DLLIMPORT +# endif +#endif + +/* + * The main purpose of this module is to provide common switch tables + * for command methods and options. + */ + +enum TclDOM_DOMImplementationCommandMethods { + TCLDOM_IMPL_HASFEATURE, + TCLDOM_IMPL_CREATEDOCUMENT, + TCLDOM_IMPL_CREATE, + TCLDOM_IMPL_CREATEDOCUMENTTYPE, + TCLDOM_IMPL_CREATENODE, + TCLDOM_IMPL_DESTROY, + TCLDOM_IMPL_ISNODE, + TCLDOM_IMPL_PARSE, + TCLDOM_IMPL_SELECTNODE, + TCLDOM_IMPL_SERIALIZE, + TCLDOM_IMPL_TRIM +}; +enum TclDOM_DocumentCommandMethods { + TCLDOM_DOCUMENT_CGET, + TCLDOM_DOCUMENT_CONFIGURE, + TCLDOM_DOCUMENT_CREATEELEMENT, + TCLDOM_DOCUMENT_CREATEDOCUMENTFRAGMENT, + TCLDOM_DOCUMENT_CREATETEXTNODE, + TCLDOM_DOCUMENT_CREATECOMMENT, + TCLDOM_DOCUMENT_CREATECDATASECTION, + TCLDOM_DOCUMENT_CREATEPI, + TCLDOM_DOCUMENT_CREATEATTRIBUTE, + TCLDOM_DOCUMENT_CREATEENTITY, + TCLDOM_DOCUMENT_CREATEENTITYREFERENCE, + TCLDOM_DOCUMENT_CREATEDOCTYPEDECL, + TCLDOM_DOCUMENT_IMPORTNODE, + TCLDOM_DOCUMENT_CREATEELEMENTNS, + TCLDOM_DOCUMENT_CREATEATTRIBUTENS, + TCLDOM_DOCUMENT_GETELEMENTSBYTAGNAMENS, + TCLDOM_DOCUMENT_GETELEMENTSBYID, + TCLDOM_DOCUMENT_CREATEEVENT, + TCLDOM_DOCUMENT_GETELEMENTSBYTAGNAME, + TCLDOM_DOCUMENT_DTD, + TCLDOM_DOCUMENT_SCHEMA +}; +enum TclDOM_DocumentCommandOptions { + TCLDOM_DOCUMENT_DOCTYPE, + TCLDOM_DOCUMENT_IMPLEMENTATION, + TCLDOM_DOCUMENT_DOCELEMENT +}; +enum TclDOM_DocumentDTDSubmethods { + TCLDOM_DOCUMENT_DTD_VALIDATE +}; +enum TclDOM_DocumentSchemaSubmethods { + TCLDOM_DOCUMENT_SCHEMA_COMPILE, + TCLDOM_DOCUMENT_SCHEMA_VALIDATE +}; +enum TclDOM_DocumentRelaxNGSubmethods { + TCLDOM_DOCUMENT_RELAXNG_COMPILE, + TCLDOM_DOCUMENT_RELAXNG_VALIDATE +}; +enum TclDOM_NodeCommandMethods { + TCLDOM_NODE_CGET, + TCLDOM_NODE_CONFIGURE, + TCLDOM_NODE_INSERTBEFORE, + TCLDOM_NODE_REPLACECHILD, + TCLDOM_NODE_REMOVECHILD, + TCLDOM_NODE_APPENDCHILD, + TCLDOM_NODE_HASCHILDNODES, + TCLDOM_NODE_CLONENODE, + TCLDOM_NODE_CHILDREN, + TCLDOM_NODE_PARENT, + TCLDOM_NODE_PATH, + TCLDOM_NODE_CREATENODE, + TCLDOM_NODE_SELECTNODE, + TCLDOM_NODE_STRINGVALUE, + TCLDOM_NODE_ADDEVENTLISTENER, + TCLDOM_NODE_REMOVEEVENTLISTENER, + TCLDOM_NODE_DISPATCHEVENT, + TCLDOM_NODE_ISSAMENODE +}; +enum TclDOM_NodeCommandOptions { + TCLDOM_NODE_NODETYPE, + TCLDOM_NODE_PARENTNODE, + TCLDOM_NODE_CHILDNODES, + TCLDOM_NODE_FIRSTCHILD, + TCLDOM_NODE_LASTCHILD, + TCLDOM_NODE_PREVIOUSSIBLING, + TCLDOM_NODE_NEXTSIBLING, + TCLDOM_NODE_ATTRIBUTES, + TCLDOM_NODE_NAMESPACEURI, + TCLDOM_NODE_PREFIX, + TCLDOM_NODE_LOCALNAME, + TCLDOM_NODE_NODEVALUE, + TCLDOM_NODE_CDATASECTION, + TCLDOM_NODE_NODENAME, + TCLDOM_NODE_OWNERDOCUMENT +}; +enum TclDOM_NodeCommandAddEventListenerOptions { + TCLDOM_NODE_ADDEVENTLISTENER_USECAPTURE +}; +enum TclDOM_ElementCommandMethods { + TCLDOM_ELEMENT_CGET, + TCLDOM_ELEMENT_CONFIGURE, + TCLDOM_ELEMENT_GETATTRIBUTE, + TCLDOM_ELEMENT_SETATTRIBUTE, + TCLDOM_ELEMENT_REMOVEATTRIBUTE, + TCLDOM_ELEMENT_GETATTRIBUTENS, + TCLDOM_ELEMENT_SETATTRIBUTENS, + TCLDOM_ELEMENT_REMOVEATTRIBUTENS, + TCLDOM_ELEMENT_GETATTRIBUTENODE, + TCLDOM_ELEMENT_SETATTRIBUTENODE, + TCLDOM_ELEMENT_REMOVEATTRIBUTENODE, + TCLDOM_ELEMENT_GETATTRIBUTENODENS, + TCLDOM_ELEMENT_SETATTRIBUTENODENS, + TCLDOM_ELEMENT_REMOVEATTRIBUTENODENS, + TCLDOM_ELEMENT_GETELEMENTSBYTAGNAME, + TCLDOM_ELEMENT_NORMALIZE +}; +enum TclDOM_ElementCommandOptions { + TCLDOM_ELEMENT_TAGNAME, + TCLDOM_ELEMENT_EMPTY +}; +enum TclDOM_EventCommandMethods { + TCLDOM_EVENT_CGET, + TCLDOM_EVENT_CONFIGURE, + TCLDOM_EVENT_STOPPROPAGATION, + TCLDOM_EVENT_PREVENTDEFAULT, + TCLDOM_EVENT_INITEVENT, + TCLDOM_EVENT_INITUIEVENT, + TCLDOM_EVENT_INITMOUSEEVENT, + TCLDOM_EVENT_INITMUTATIONEVENT, + TCLDOM_EVENT_POSTUIEVENT, + TCLDOM_EVENT_POSTMOUSEEVENT, + TCLDOM_EVENT_POSTMUTATIONEVENT +}; +enum TclDOM_EventCommandOptions { + TCLDOM_EVENT_ALTKEY, + TCLDOM_EVENT_ATTRNAME, + TCLDOM_EVENT_ATTRCHANGE, + TCLDOM_EVENT_BUBBLES, + TCLDOM_EVENT_BUTTON, + TCLDOM_EVENT_CANCELABLE, + TCLDOM_EVENT_CLIENTX, + TCLDOM_EVENT_CLIENTY, + TCLDOM_EVENT_CTRLKEY, + TCLDOM_EVENT_CURRENTNODE, + TCLDOM_EVENT_DETAIL, + TCLDOM_EVENT_EVENTPHASE, + TCLDOM_EVENT_METAKEY, + TCLDOM_EVENT_NEWVALUE, + TCLDOM_EVENT_PREVVALUE, + TCLDOM_EVENT_RELATEDNODE, + TCLDOM_EVENT_SCREENX, + TCLDOM_EVENT_SCREENY, + TCLDOM_EVENT_SHIFTKEY, + TCLDOM_EVENT_TARGET, + TCLDOM_EVENT_TIMESTAMP, + TCLDOM_EVENT_TYPE, + TCLDOM_EVENT_VIEW +}; + /* + * NB. TCLDOM_EVENT_USERDEFINED does not have an entry in the string table. + */ +enum TclDOM_EventTypes { + TCLDOM_EVENT_DOMFOCUSIN, + TCLDOM_EVENT_DOMFOCUSOUT, + TCLDOM_EVENT_DOMACTIVATE, + TCLDOM_EVENT_CLICK, + TCLDOM_EVENT_MOUSEDOWN, + TCLDOM_EVENT_MOUSEUP, + TCLDOM_EVENT_MOUSEOVER, + TCLDOM_EVENT_MOUSEMOVE, + TCLDOM_EVENT_MOUSEOUT, + TCLDOM_EVENT_DOMSUBTREEMODIFIED, + TCLDOM_EVENT_DOMNODEINSERTED, + TCLDOM_EVENT_DOMNODEREMOVED, + TCLDOM_EVENT_DOMNODEINSERTEDINTODOCUMENT, + TCLDOM_EVENT_DOMNODEREMOVEDFROMDOCUMENT, + TCLDOM_EVENT_DOMATTRMODIFIED, + TCLDOM_EVENT_DOMCHARACTERDATAMODIFIED, + TCLDOM_EVENT_USERDEFINED +}; +enum TclDOM_ParseCommandOptions { + TCLDOM_PARSE_BASEURI, + TCLDOM_PARSE_EXTERNALENTITYCOMMAND +}; +enum TclDOM_SerializeCommandOptions { + TCLDOM_SERIALIZE_INDENT, + TCLDOM_SERIALIZE_METHOD, + TCLDOM_SERIALIZE_ENCODING, + TCLDOM_SERIALIZE_OMIT_XML_DECLARATION +}; +enum TclDOM_SerializeMethods { + TCLDOM_SERIALIZE_METHOD_XML, + TCLDOM_SERIALIZE_METHOD_HTML, + TCLDOM_SERIALIZE_METHOD_TEXT +}; +enum TclDOM_SelectNodeOptions { + TCLDOM_SELECTNODE_OPTION_NAMESPACES +}; + +/* + * DOM Level 2 Event support + */ + +#define TCLDOM_NUM_EVENT_TYPES 17 + +/* + * The following function is required to be defined in all stubs aware + * extensions of TclDOM. The function is actually implemented in the stub + * library, not the main Tcldom library, although there is a trivial + * implementation in the main library in case an extension is statically + * linked into an application. + */ + +#ifndef USE_TCLDOM_STUBS + +#undef TCL_STORAGE_CLASS +#define TCL_STORAGE_CLASS DLLIMPORT + +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* __TCLDOM_H__ */ diff --git a/tclxml/include/tclxml-libxml2/docObj.h b/tclxml/include/tclxml-libxml2/docObj.h new file mode 100644 index 0000000..aaffb2e --- /dev/null +++ b/tclxml/include/tclxml-libxml2/docObj.h @@ -0,0 +1,60 @@ +/* docObj.h -- + * + * This module manages libxml2 xmlDocPtr Tcl objects. + * + * Copyright (c) 2003 Zveno Pty Ltd + * http://www.zveno.com/ + * + * Zveno Pty Ltd makes this software and associated documentation + * available free of charge for any purpose. You may make copies + * of the software but you must include all of this notice on any copy. + * + * Zveno Pty Ltd does not warrant that this software is error free + * or fit for any purpose. Zveno Pty Ltd disclaims any liability for + * all claims, expenses, losses, damages and costs any user may incur + * as a result of using, copying or modifying the software. + * + * $Id: docObj.h,v 1.1.1.1 2009/01/16 22:11:49 joye Exp $ + */ + +#ifndef TCLXML_LIBXML2_DOCOBJ_H +#define TCLXML_LIBXML2_DOCOBJ_H + +#ifdef TCLXML_BUILD_AS_FRAMEWORK +#include <Tcl/tcl.h> +#else +#include <tcl.h> +#endif /* TCLXML_BUILD_AS_FRAMEWORK */ +#include <libxml/tree.h> + +typedef void (TclXML_libxml2Doc_FreeHookProc) _ANSI_ARGS_((ClientData clientData)); + +/* + * Values that define how documents are handled: + * KEEP means that documents must be explicitly destroyed, + * IMPLICIT means that documents will be destroyed when there are no longer + * any references to it. + */ + +typedef enum TclXML_libxml2_DocumentHandling { + TCLXML_LIBXML2_DOCUMENT_KEEP, + TCLXML_LIBXML2_DOCUMENT_IMPLICIT +} TclXML_libxml2_DocumentHandling; + +typedef struct TclXML_libxml2_Document { + xmlDocPtr docPtr; + + char *token; /* string rep of this document */ + + TclXML_libxml2_DocumentHandling keep; + /* how to handle document destruction */ + + void *objs; /* List of Tcl_Obj's that reference this document */ + + ClientData dom; /* Hook for TclDOM data */ + TclXML_libxml2Doc_FreeHookProc *domfree; + ClientData apphook; /* Application hook - not used by TclXML or TclDOM */ + TclXML_libxml2Doc_FreeHookProc *appfree; +} TclXML_libxml2_Document; + +#endif /* TCLXML_LIBXML2_DOCOBJ_H */ diff --git a/tclxml/include/tclxml-libxml2/tclxml-libxml2.h b/tclxml/include/tclxml-libxml2/tclxml-libxml2.h new file mode 100644 index 0000000..22050f4 --- /dev/null +++ b/tclxml/include/tclxml-libxml2/tclxml-libxml2.h @@ -0,0 +1,100 @@ +/* tcllibxml2.h -- + * + * This module provides an interface to libxml2. + * + * Copyright (c) 2005 Explain + * http://www.explain.com.au/ + * Copyright (c) 2003 Zveno Pty Ltd + * http://www.zveno.com/ + * + * See the file "LICENSE" for information on usage and + * redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. + * + * $Id: tclxml-libxml2.h,v 1.1.1.1 2009/01/16 22:11:49 joye Exp $ + */ + +#ifndef TCLXML_LIBXML2_H +#define TCLXML_LIBXML2_H + +#include <tclxml/tclxml.h> +#include <libxml/tree.h> +#include "docObj.h" + +/* + * For C++ compilers, use extern "C" + */ + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * These macros are used to control whether functions are being declared for + * import or export in Windows, + * They map to no-op declarations on non-Windows systems. + * Assumes that tcl.h defines DLLEXPORT & DLLIMPORT correctly. + * The default build on windows is for a DLL, which causes the DLLIMPORT + * and DLLEXPORT macros to be nonempty. To build a static library, the + * macro STATIC_BUILD should be defined before the inclusion of tcl.h + * + * If a function is being declared while it is being built + * to be included in a shared library, then it should have the DLLEXPORT + * storage class. If is being declared for use by a module that is going to + * link against the shared library, then it should have the DLLIMPORT storage + * class. If the symbol is beind declared for a static build or for use from a + * stub library, then the storage class should be empty. + * + * The convention is that a macro called BUILD_xxxx, where xxxx is the + * name of a library we are building, is set on the compile line for sources + * that are to be placed in the library. When this macro is set, the + * storage class will be set to DLLEXPORT. At the end of the header file, the + * storage class will be reset to DLLIMPORt. + */ + +#undef TCL_STORAGE_CLASS +#ifdef BUILD_TclXML_libxml2 +# define TCL_STORAGE_CLASS DLLEXPORT +#else +# ifdef USE_TCL_STUBS +# define TCL_STORAGE_CLASS +# else +# define TCL_STORAGE_CLASS DLLIMPORT +# endif +#endif + +/* + * The following function is required to be defined in all stubs aware + * extensions of TclXML/libxml2. The function is actually implemented in the stub + * library, not the main TclXML/libxml2 library, although there is a trivial + * implementation in the main library in case an extension is statically + * linked into an application. + */ + +EXTERN CONST char * TclXML_libxml2_InitStubs _ANSI_ARGS_((Tcl_Interp *interp, + CONST char *version, int exact)); + +#ifndef USE_TCLXML_LIBXML2_STUBS + +/* + * When not using stubs, make it a macro. + */ + +#define TclXML_libxml2_InitStubs(interp, version, exact) \ + Tcl_PkgRequire(interp, "xml::libxml2", version, exact) + +#endif + +/* + * Accessor functions => Stubs + */ + +#include <tclxml-libxml2/tclxml-libxml2Decls.h> + +#undef TCL_STORAGE_CLASS +#define TCL_STORAGE_CLASS DLLIMPORT + +#ifdef __cplusplus +} +#endif + +#endif /* TCLXML_LIBXML2_H */ diff --git a/tclxml/include/tclxml-libxml2/tclxml-libxml2Decls.h b/tclxml/include/tclxml-libxml2/tclxml-libxml2Decls.h new file mode 100644 index 0000000..187b159 --- /dev/null +++ b/tclxml/include/tclxml-libxml2/tclxml-libxml2Decls.h @@ -0,0 +1,163 @@ +/* + * tclxml-libxml2Decls.h -- + * + * Declarations of functions in the platform independent public TCLXML/libxml2 API. + * + */ + +#ifndef _TCLXMLLIBXML2DECLS +#define _TCLXMLLIBXML2DECLS + +/* + * WARNING: The contents of this file is automatically generated by the + * genStubs.tcl script. Any modifications to the function declarations + * below should be made in the tcllibxml2.decls script. + */ + +#include "docObj.h" +#include <libxml/xmlerror.h> + +/* !BEGIN!: Do not edit below this line. */ + +/* + * Exported function declarations: + */ + +/* 0 */ +EXTERN int Tclxml_libxml2_Init _ANSI_ARGS_((Tcl_Interp * interp)); +/* Slot 1 is reserved */ +/* 2 */ +EXTERN int TclXML_libxml2_InitDocObj _ANSI_ARGS_(( + Tcl_Interp * interp)); +/* 3 */ +EXTERN Tcl_Obj * TclXML_libxml2_NewDocObj _ANSI_ARGS_(( + Tcl_Interp * interp)); +/* 4 */ +EXTERN Tcl_Obj * TclXML_libxml2_CreateObjFromDoc _ANSI_ARGS_(( + xmlDocPtr docPtr)); +/* 5 */ +EXTERN int TclXML_libxml2_GetDocFromObj _ANSI_ARGS_(( + Tcl_Interp * interp, Tcl_Obj * objPtr, + xmlDocPtr * docPtr)); +/* 6 */ +EXTERN int TclXML_libxml2_GetTclDocFromObj _ANSI_ARGS_(( + Tcl_Interp * interp, Tcl_Obj * objPtr, + TclXML_libxml2_Document ** tDocPtrPtr)); +/* 7 */ +EXTERN int TclXML_libxml2_GetTclDocFromNode _ANSI_ARGS_(( + Tcl_Interp * interp, xmlNodePtr nodePtr, + TclXML_libxml2_Document ** tDocPtrPtr)); +/* 8 */ +EXTERN void TclXML_libxml2_DestroyDocument _ANSI_ARGS_(( + TclXML_libxml2_Document * tDocPtr)); +/* 9 */ +EXTERN void TclXML_libxml2_DocKeep _ANSI_ARGS_((Tcl_Obj * objPtr, + TclXML_libxml2_DocumentHandling keep)); +/* 10 */ +EXTERN void TclXML_libxml2_ErrorHandler _ANSI_ARGS_((void * ctx, + xmlErrorPtr error)); +/* 11 */ +EXTERN void TclXML_libxml2_ResetError _ANSI_ARGS_(( + Tcl_Interp * interp)); +/* 12 */ +EXTERN Tcl_Obj * TclXML_libxml2_GetErrorObj _ANSI_ARGS_(( + Tcl_Interp * interp)); +/* 13 */ +EXTERN void TclXML_libxml2_SetErrorNodeFunc _ANSI_ARGS_(( + Tcl_Interp * interp, + TclXML_ErrorNodeHandlerProc * proc)); + +typedef struct Tclxml_libxml2Stubs { + int magic; + struct Tclxml_libxml2StubHooks *hooks; + + int (*tclxml_libxml2_Init) _ANSI_ARGS_((Tcl_Interp * interp)); /* 0 */ + void *reserved1; + int (*tclXML_libxml2_InitDocObj) _ANSI_ARGS_((Tcl_Interp * interp)); /* 2 */ + Tcl_Obj * (*tclXML_libxml2_NewDocObj) _ANSI_ARGS_((Tcl_Interp * interp)); /* 3 */ + Tcl_Obj * (*tclXML_libxml2_CreateObjFromDoc) _ANSI_ARGS_((xmlDocPtr docPtr)); /* 4 */ + int (*tclXML_libxml2_GetDocFromObj) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * objPtr, xmlDocPtr * docPtr)); /* 5 */ + int (*tclXML_libxml2_GetTclDocFromObj) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * objPtr, TclXML_libxml2_Document ** tDocPtrPtr)); /* 6 */ + int (*tclXML_libxml2_GetTclDocFromNode) _ANSI_ARGS_((Tcl_Interp * interp, xmlNodePtr nodePtr, TclXML_libxml2_Document ** tDocPtrPtr)); /* 7 */ + void (*tclXML_libxml2_DestroyDocument) _ANSI_ARGS_((TclXML_libxml2_Document * tDocPtr)); /* 8 */ + void (*tclXML_libxml2_DocKeep) _ANSI_ARGS_((Tcl_Obj * objPtr, TclXML_libxml2_DocumentHandling keep)); /* 9 */ + void (*tclXML_libxml2_ErrorHandler) _ANSI_ARGS_((void * ctx, xmlErrorPtr error)); /* 10 */ + void (*tclXML_libxml2_ResetError) _ANSI_ARGS_((Tcl_Interp * interp)); /* 11 */ + Tcl_Obj * (*tclXML_libxml2_GetErrorObj) _ANSI_ARGS_((Tcl_Interp * interp)); /* 12 */ + void (*tclXML_libxml2_SetErrorNodeFunc) _ANSI_ARGS_((Tcl_Interp * interp, TclXML_ErrorNodeHandlerProc * proc)); /* 13 */ +} Tclxml_libxml2Stubs; + +#ifdef __cplusplus +extern "C" { +#endif +extern Tclxml_libxml2Stubs *tclxml_libxml2StubsPtr; +#ifdef __cplusplus +} +#endif + +#if defined(USE_TCLXML_LIBXML2_STUBS) && !defined(USE_TCLXML_LIBXML2_STUB_PROCS) + +/* + * Inline function declarations: + */ + +#ifndef Tclxml_libxml2_Init +#define Tclxml_libxml2_Init \ + (tclxml_libxml2StubsPtr->tclxml_libxml2_Init) /* 0 */ +#endif +/* Slot 1 is reserved */ +#ifndef TclXML_libxml2_InitDocObj +#define TclXML_libxml2_InitDocObj \ + (tclxml_libxml2StubsPtr->tclXML_libxml2_InitDocObj) /* 2 */ +#endif +#ifndef TclXML_libxml2_NewDocObj +#define TclXML_libxml2_NewDocObj \ + (tclxml_libxml2StubsPtr->tclXML_libxml2_NewDocObj) /* 3 */ +#endif +#ifndef TclXML_libxml2_CreateObjFromDoc +#define TclXML_libxml2_CreateObjFromDoc \ + (tclxml_libxml2StubsPtr->tclXML_libxml2_CreateObjFromDoc) /* 4 */ +#endif +#ifndef TclXML_libxml2_GetDocFromObj +#define TclXML_libxml2_GetDocFromObj \ + (tclxml_libxml2StubsPtr->tclXML_libxml2_GetDocFromObj) /* 5 */ +#endif +#ifndef TclXML_libxml2_GetTclDocFromObj +#define TclXML_libxml2_GetTclDocFromObj \ + (tclxml_libxml2StubsPtr->tclXML_libxml2_GetTclDocFromObj) /* 6 */ +#endif +#ifndef TclXML_libxml2_GetTclDocFromNode +#define TclXML_libxml2_GetTclDocFromNode \ + (tclxml_libxml2StubsPtr->tclXML_libxml2_GetTclDocFromNode) /* 7 */ +#endif +#ifndef TclXML_libxml2_DestroyDocument +#define TclXML_libxml2_DestroyDocument \ + (tclxml_libxml2StubsPtr->tclXML_libxml2_DestroyDocument) /* 8 */ +#endif +#ifndef TclXML_libxml2_DocKeep +#define TclXML_libxml2_DocKeep \ + (tclxml_libxml2StubsPtr->tclXML_libxml2_DocKeep) /* 9 */ +#endif +#ifndef TclXML_libxml2_ErrorHandler +#define TclXML_libxml2_ErrorHandler \ + (tclxml_libxml2StubsPtr->tclXML_libxml2_ErrorHandler) /* 10 */ +#endif +#ifndef TclXML_libxml2_ResetError +#define TclXML_libxml2_ResetError \ + (tclxml_libxml2StubsPtr->tclXML_libxml2_ResetError) /* 11 */ +#endif +#ifndef TclXML_libxml2_GetErrorObj +#define TclXML_libxml2_GetErrorObj \ + (tclxml_libxml2StubsPtr->tclXML_libxml2_GetErrorObj) /* 12 */ +#endif +#ifndef TclXML_libxml2_SetErrorNodeFunc +#define TclXML_libxml2_SetErrorNodeFunc \ + (tclxml_libxml2StubsPtr->tclXML_libxml2_SetErrorNodeFunc) /* 13 */ +#endif + +#endif /* defined(USE_TCLXML_LIBXML2_STUBS) && !defined(USE_TCLXML_LIBXML2_STUB_PROCS) */ + +/* !END!: Do not edit above this line. */ + +#endif /* _TCLXMLLLIBXML2DECLS */ + diff --git a/tclxml/include/tclxml/tclxml.h.in b/tclxml/include/tclxml/tclxml.h.in new file mode 100755 index 0000000..c809fdc --- /dev/null +++ b/tclxml/include/tclxml/tclxml.h.in @@ -0,0 +1,299 @@ +/* + * tclxml.h -- + * + * Generic interface to XML parsers. + * + * Copyright (c) 2005-2007 by Explain. + * Copyright (c) 1999-2004 Steve Ball, Zveno Pty Ltd + * + * See the file "LICENSE" for information on usage and + * redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. + * + * $Id: tclxml.h.in,v 1.1.1.1 2009/01/16 22:11:49 joye Exp $ + * + */ + +#ifndef __TCLXML_H__ +#define __TCLXML_H__ + +#ifdef TCLXML_BUILD_AS_FRAMEWORK +#include <Tcl/tcl.h> +#else +#include <tcl.h> +#endif /* TCLXML_BUILD_AS_FRAMEWORK */ + +#define TCLXML_VERSION "@PACKAGE_VERSION@" + +/* + * Used to block the rest of this header file from resource compilers so + * we can just get the version info. + */ +#ifndef RC_INVOKED + +/* TIP 27 update. If CONST84 is not defined we are compiling against a + * core before 8.4 and have to disable some CONST'ness. + */ + +#ifndef CONST84 +# define CONST84 +#endif + +/* + * Fix the Borland bug that's in the EXTERN macro from tcl.h. + */ +#ifndef TCL_EXTERN +# undef DLLIMPORT +# undef DLLEXPORT +# if defined(STATIC_BUILD) +# define DLLIMPORT +# define DLLEXPORT +# elif (defined(__WIN32__) && (defined(_MSC_VER) || (__BORLANDC__ >= 0x0550) || (defined(__GNUC__) && defined(__declspec)))) || (defined(MAC_TCL) && FUNCTION_DECLSPEC) +# define DLLIMPORT __declspec(dllimport) +# define DLLEXPORT __declspec(dllexport) +# elif defined(__BORLANDC__) +# define OLDBORLAND 1 +# define DLLIMPORT __import +# define DLLEXPORT __export +# else +# define DLLIMPORT +# define DLLEXPORT +# endif + /* Avoid name mangling from C++ compilers. */ +# ifdef __cplusplus +# define TCL_EXTRNC extern "C" +# else +# define TCL_EXTRNC extern +# endif + /* Pre-5.5 Borland requires the attributes be placed after the */ + /* return type. */ +# ifdef OLDBORLAND +# define TCL_EXTERN(RTYPE) TCL_EXTRNC RTYPE TCL_STORAGE_CLASS +# else +# define TCL_EXTERN(RTYPE) TCL_EXTRNC TCL_STORAGE_CLASS RTYPE +# endif +#endif + + + +/* + * These macros are used to control whether functions are being declared for + * import or export in Windows, + * They map to no-op declarations on non-Windows systems. + * Assumes that tcl.h defines DLLEXPORT & DLLIMPORT correctly. + * The default build on windows is for a DLL, which causes the DLLIMPORT + * and DLLEXPORT macros to be nonempty. To build a static library, the + * macro STATIC_BUILD should be defined before the inclusion of tcl.h + * + * If a function is being declared while it is being built + * to be included in a shared library, then it should have the DLLEXPORT + * storage class. If is being declared for use by a module that is going to + * link against the shared library, then it should have the DLLIMPORT storage + * class. If the symbol is beind declared for a static build or for use from a + * stub library, then the storage class should be empty. + * + * The convention is that a macro called BUILD_xxxx, where xxxx is the + * name of a library we are building, is set on the compile line for sources + * that are to be placed in the library. When this macro is set, the + * storage class will be set to DLLEXPORT. At the end of the header file, the + * storage class will be reset to DLLIMPORt. + */ + +#undef TCL_STORAGE_CLASS +#ifdef BUILD_Tclxml +# define TCL_STORAGE_CLASS DLLEXPORT +#else +# ifdef USE_TCLXML_STUBS +# define TCL_STORAGE_CLASS +# else +# define TCL_STORAGE_CLASS DLLIMPORT +# endif +#endif + + +/* + * C API for TclXML generic layer + * + * C callback functions to application code and their registration functions. + * These all mimic the Tcl callbacks. + */ + +typedef int (TclXML_ElementStartProc) _ANSI_ARGS_((Tcl_Interp *interp, ClientData clientData, Tcl_Obj *namePtr, Tcl_Obj *nsuri, Tcl_Obj *attListPtr, Tcl_Obj *nsDeclsPtr)); +typedef int (TclXML_ElementEndProc) _ANSI_ARGS_((Tcl_Interp *interp, ClientData clientData, Tcl_Obj *namePtr)); +typedef int (TclXML_CharacterDataProc) _ANSI_ARGS_((Tcl_Interp *interp, ClientData clientData, Tcl_Obj *dataPtr)); +typedef int (TclXML_PIProc) _ANSI_ARGS_((Tcl_Interp *interp, ClientData clientData, Tcl_Obj *targetPtr, Tcl_Obj *dataPtr)); +typedef int (TclXML_DefaultProc) _ANSI_ARGS_((Tcl_Interp *interp, ClientData clientData, Tcl_Obj *dataPtr)); +typedef int (TclXML_UnparsedProc) _ANSI_ARGS_((Tcl_Interp *interp, ClientData clientData, Tcl_Obj *entityPtr, Tcl_Obj *basePtr, Tcl_Obj *systemIdPtr, Tcl_Obj *publicIdPtr, Tcl_Obj *notationNamePtr)); +typedef int (TclXML_NotationDeclProc) _ANSI_ARGS_((Tcl_Interp *interp, ClientData clientData, Tcl_Obj *namePtr, Tcl_Obj *basePtr, Tcl_Obj *systemIdPtr, Tcl_Obj *publicIdPtr)); +typedef int (TclXML_EntityProc) _ANSI_ARGS_((Tcl_Interp *interp, ClientData clientData, Tcl_Obj *namePtr, Tcl_Obj *basePtr, Tcl_Obj *systemIdPtr, Tcl_Obj *publicIdPtr)); +typedef int (TclXML_UnknownEncodingProc) _ANSI_ARGS_((Tcl_Interp *interp, ClientData clientData, Tcl_Obj *dataPtr, void *info)); +typedef int (TclXML_CommentProc) _ANSI_ARGS_((Tcl_Interp *interp, ClientData clientData, Tcl_Obj *dataPtr)); +typedef int (TclXML_NotStandaloneProc) _ANSI_ARGS_((Tcl_Interp *interp, ClientData clientData)); +typedef int (TclXML_ElementDeclProc) _ANSI_ARGS_((Tcl_Interp *interp, ClientData clientData, Tcl_Obj *namePtr, Tcl_Obj *contentspecPtr)); +typedef int (TclXML_AttlistDeclProc) _ANSI_ARGS_((Tcl_Interp *interp, ClientData clientData, Tcl_Obj *elementnamePtr, Tcl_Obj *attrdefnsPtr)); +typedef int (TclXML_StartDoctypeDeclProc) _ANSI_ARGS_((Tcl_Interp *interp, ClientData clientData, Tcl_Obj *namePtr)); +typedef int (TclXML_EndDoctypeDeclProc) _ANSI_ARGS_((Tcl_Interp *interp, ClientData clientData)); + +/* + * The structure below is used to refer to a parser object. + */ + +typedef struct TclXML_Info { + Tcl_Interp *interp; /* Interpreter for this instance */ + Tcl_Obj *name; /* name of this instance */ + + Tcl_Obj *base; /* base URI for document entity */ + + Tcl_Obj *encoding; /* character encoding */ + + void *parserClass; /* Parser-specific functions + * Actually of type TclXML_ParserClassInfo + */ + ClientData clientData; /* Parser-specific data structure */ + + int final; /* input data complete? */ + int validate; /* Validate document? */ + + int status; /* application status */ + Tcl_Obj *result; /* application return result */ + + int continueCount; /* reference count for continue */ + Tcl_Obj *context; /* reference to the context pointer */ + + Tcl_Obj *cdata; /* Accumulates character data */ + int nowhitespace; /* Whether to ignore white space */ + int reportempty; /* Whether to report empty elements */ + int expandinternalentities; /* Whether to expand internal entities */ + int paramentities; /* Whether to include parameter entities */ + + Tcl_Obj *elementstartcommand; /* Script for element start */ + TclXML_ElementStartProc *elementstart; /* Callback for element start */ + ClientData elementstartdata; + Tcl_Obj *elementendcommand; /* Script for element end */ + TclXML_ElementEndProc *elementend; /* Callback for element end */ + ClientData elementenddata; + Tcl_Obj *datacommand; /* Script for character data */ + TclXML_CharacterDataProc *cdatacb; /* Callback for character data */ + ClientData cdatacbdata; + Tcl_Obj *picommand; /* Script for processing instruction */ + TclXML_PIProc *pi; /* Callback for processing instruction */ + ClientData pidata; + Tcl_Obj *defaultcommand; /* Script for default data */ + TclXML_DefaultProc *defaultcb; /* Callback for default data */ + ClientData defaultdata; + Tcl_Obj *unparsedcommand; /* Script for unparsed entity declaration */ + TclXML_UnparsedProc *unparsed; /* Callback for unparsed entity declaraion */ + ClientData unparseddata; + Tcl_Obj *notationcommand; /* Script for notation declaration */ + TclXML_NotationDeclProc *notation; /* Callback for notation declaraion */ + ClientData notationdata; + Tcl_Obj *entitycommand; /* Script for external entity */ + TclXML_EntityProc *entity; /* Callback for external entity */ + ClientData entitydata; + Tcl_Obj *unknownencodingcommand; /* Script for unknown encoding */ + TclXML_UnknownEncodingProc *unknownencoding; /* Callback for unknown encoding */ + ClientData unknownencodingdata; + /* Following added by ericm@scriptics */ + Tcl_Obj *commentCommand; /* Script for comments */ + TclXML_CommentProc *comment; /* Callback for comments */ + ClientData commentdata; + Tcl_Obj *notStandaloneCommand; /* Script for "not standalone" docs */ + TclXML_NotStandaloneProc *notStandalone; /* Callback for "not standalone" docs */ + ClientData notstandalonedata; + + Tcl_Obj *elementDeclCommand; /* Script for <!ELEMENT decl's */ + TclXML_ElementDeclProc *elementDecl; /* Callback for element declaration */ + ClientData elementdecldata; + Tcl_Obj *attlistDeclCommand; /* Script for <!ATTLIST decl's */ + TclXML_AttlistDeclProc *attlistDecl; /* Callback for attribute list declaration */ + ClientData attlistdecldata; + + /* Do we really need these? */ + Tcl_Obj *startDoctypeDeclCommand; /* Script for <!DOCTYPE decl's */ + TclXML_StartDoctypeDeclProc *startDoctypeDecl; /* Callback for document type declaration start */ + ClientData startdoctypedecldata; + Tcl_Obj *endDoctypeDeclCommand; /* Script for <!DOCTYPE decl ends */ + TclXML_EndDoctypeDeclProc *endDoctypeDecl; /* Callback for document type declaration start */ + ClientData enddoctypedecldata; + +} TclXML_Info; + +/* + * These function definitions are provided by a parser + * implementation and registered with this module. + */ + +typedef ClientData (TclXML_CreateProc) _ANSI_ARGS_((Tcl_Interp *interp, TclXML_Info *xmlinfo)); +typedef ClientData (TclXML_CreateEntityParserProc) _ANSI_ARGS_((Tcl_Interp *interp, ClientData clientData)); +typedef int (TclXML_ParseProc) _ANSI_ARGS_((ClientData clientData, char *buffer, int len, int final)); +typedef int (TclXML_ConfigureProc) _ANSI_ARGS_((ClientData clientData, Tcl_Obj *CONST optionPtr, Tcl_Obj *CONST valuePtr)); +typedef int (TclXML_GetProc) _ANSI_ARGS_((ClientData clientData, int objc, Tcl_Obj *CONST objv[])); +typedef int (TclXML_ResetProc) _ANSI_ARGS_((ClientData clientData)); +typedef int (TclXML_DeleteProc) _ANSI_ARGS_((ClientData clientData)); + +/* + * The structure below is used store function pointers + * for a parser implementation. + */ + +typedef struct TclXML_ParserClassInfo { + Tcl_Obj *name; + + TclXML_CreateProc *create; /* Direct-call creation proc */ + Tcl_Obj *createCmd; /* Tcl command creation script */ + + TclXML_CreateEntityParserProc *createEntity; + Tcl_Obj *createEntityCmd; + + TclXML_ParseProc *parse; + Tcl_Obj *parseCmd; + + TclXML_ConfigureProc *configure; + Tcl_Obj *configureCmd; + + TclXML_GetProc *get; + Tcl_Obj *getCmd; + + TclXML_ResetProc *reset; + Tcl_Obj *resetCmd; + + TclXML_DeleteProc *destroy; + Tcl_Obj *destroyCmd; + +} TclXML_ParserClassInfo; + +/* + *---------------------------------------------------------------------------- + * + * Support for error handling + * + *---------------------------------------------------------------------------- + */ + +typedef Tcl_Obj * (TclXML_ErrorNodeHandlerProc) _ANSI_ARGS_((Tcl_Interp *interp, ClientData clientData)); + +typedef struct TclXML_ErrorInfo { + Tcl_Interp *interp; + Tcl_Obj *listPtr; + TclXML_ErrorNodeHandlerProc *nodeHandlerProc; +} TclXML_ErrorInfo; + +/* + *---------------------------------------------------------------------------- + * + * Function prototypes for publically accessible routines + * + *---------------------------------------------------------------------------- + */ + +#include <tclxml/tclxmlDecls.h> + +#ifdef USE_TCLXML_STUBS +TCL_EXTRNC CONST char * + TclXML_InitStubs _ANSI_ARGS_((Tcl_Interp *interp, CONST char *version, int exact)); +#endif + +#undef TCL_STORAGE_CLASS +#define TCL_STORAGE_CLASS DLLIMPORT + +#endif /* RC_INVOKED */ +#endif /* __TCLXML_H__ */ diff --git a/tclxml/include/tclxml/tclxmlDecls.h b/tclxml/include/tclxml/tclxmlDecls.h new file mode 100644 index 0000000..9576479 --- /dev/null +++ b/tclxml/include/tclxml/tclxmlDecls.h @@ -0,0 +1,361 @@ +/* + * tclxmlDecls.h -- + * + * Declarations of functions in the platform independent public TCLXML API. + * + */ + +#ifndef _TCLXMLDECLS +#define _TCLXMLDECLS + +/* + * WARNING: The contents of this file is automatically generated by the + * genStubs.tcl script. Any modifications to the function declarations + * below should be made in the tclxml.decls script. + */ + +/* !BEGIN!: Do not edit below this line. */ + +/* + * Exported function declarations: + */ + +/* 0 */ +EXTERN int Tclxml_Init _ANSI_ARGS_((Tcl_Interp * interp)); +/* 1 */ +EXTERN int Tclxml_SafeInit _ANSI_ARGS_((Tcl_Interp * interp)); +/* 2 */ +EXTERN int TclXML_RegisterXMLParser _ANSI_ARGS_(( + Tcl_Interp * interp, + TclXML_ParserClassInfo * parser)); +/* 3 */ +EXTERN int TclXML_RegisterElementStartProc _ANSI_ARGS_(( + Tcl_Interp * interp, TclXML_Info * parser, + ClientData clientData, + TclXML_ElementStartProc * callback)); +/* 4 */ +EXTERN int TclXML_RegisterElementEndProc _ANSI_ARGS_(( + Tcl_Interp * interp, TclXML_Info * parser, + ClientData clientData, + TclXML_ElementEndProc * callback)); +/* 5 */ +EXTERN int TclXML_RegisterCharacterDataProc _ANSI_ARGS_(( + Tcl_Interp * interp, TclXML_Info * parser, + ClientData clientData, + TclXML_CharacterDataProc * callback)); +/* 6 */ +EXTERN int TclXML_RegisterPIProc _ANSI_ARGS_(( + Tcl_Interp * interp, TclXML_Info * parser, + ClientData clientData, + TclXML_PIProc * callback)); +/* 7 */ +EXTERN int TclXML_RegisterDefaultProc _ANSI_ARGS_(( + Tcl_Interp * interp, TclXML_Info * parser, + ClientData clientData, + TclXML_DefaultProc * callback)); +/* 8 */ +EXTERN int TclXML_RegisterUnparsedProc _ANSI_ARGS_(( + Tcl_Interp * interp, TclXML_Info * parser, + ClientData clientData, + TclXML_UnparsedProc * callback)); +/* 9 */ +EXTERN int TclXML_RegisterNotationDeclProc _ANSI_ARGS_(( + Tcl_Interp * interp, TclXML_Info * parser, + ClientData clientData, + TclXML_NotationDeclProc * callback)); +/* 10 */ +EXTERN int TclXML_RegisterEntityProc _ANSI_ARGS_(( + Tcl_Interp * interp, TclXML_Info * parser, + ClientData clientData, + TclXML_EntityProc * callback)); +/* 11 */ +EXTERN int TclXML_RegisterUnknownEncodingProc _ANSI_ARGS_(( + Tcl_Interp * interp, TclXML_Info * parser, + ClientData clientData, + TclXML_UnknownEncodingProc * callback)); +/* 12 */ +EXTERN int TclXML_RegisterCommentProc _ANSI_ARGS_(( + Tcl_Interp * interp, TclXML_Info * parser, + ClientData clientData, + TclXML_CommentProc * callback)); +/* 13 */ +EXTERN int TclXML_RegisterNotStandaloneProc _ANSI_ARGS_(( + Tcl_Interp * interp, TclXML_Info * parser, + ClientData clientData, + TclXML_NotStandaloneProc * callback)); +/* 14 */ +EXTERN int TclXML_RegisterElementDeclProc _ANSI_ARGS_(( + Tcl_Interp * interp, TclXML_Info * parser, + ClientData clientData, + TclXML_ElementDeclProc * callback)); +/* 15 */ +EXTERN int TclXML_RegisterAttListDeclProc _ANSI_ARGS_(( + Tcl_Interp * interp, TclXML_Info * parser, + ClientData clientData, + TclXML_AttlistDeclProc * callback)); +/* 16 */ +EXTERN int TclXML_RegisterStartDoctypeDeclProc _ANSI_ARGS_(( + Tcl_Interp * interp, TclXML_Info * parser, + ClientData clientData, + TclXML_StartDoctypeDeclProc * callback)); +/* 17 */ +EXTERN int TclXML_RegisterEndDoctypeDeclProc _ANSI_ARGS_(( + Tcl_Interp * interp, TclXML_Info * parser, + ClientData clientData, + TclXML_EndDoctypeDeclProc * callback)); +/* 18 */ +EXTERN void TclXML_ElementStartHandler _ANSI_ARGS_(( + void * userdata, Tcl_Obj * name, + Tcl_Obj * nsuri, Tcl_Obj * atts, + Tcl_Obj * nsDeclsObj)); +/* 19 */ +EXTERN void TclXML_ElementEndHandler _ANSI_ARGS_(( + void * userData, Tcl_Obj * name)); +/* 20 */ +EXTERN void TclXML_CharacterDataHandler _ANSI_ARGS_(( + void * userData, Tcl_Obj * s)); +/* 21 */ +EXTERN void TclXML_ProcessingInstructionHandler _ANSI_ARGS_(( + void * userData, Tcl_Obj * target, + Tcl_Obj * data)); +/* 22 */ +EXTERN int TclXML_ExternalEntityRefHandler _ANSI_ARGS_(( + ClientData clientData, + Tcl_Obj * openEntityNames, Tcl_Obj * base, + Tcl_Obj * systemId, Tcl_Obj * publicId)); +/* 23 */ +EXTERN void TclXML_DefaultHandler _ANSI_ARGS_((void * userData, + Tcl_Obj * s)); +/* 24 */ +EXTERN void TclXML_UnparsedDeclHandler _ANSI_ARGS_(( + void * userData, Tcl_Obj * entityname, + Tcl_Obj * base, Tcl_Obj * systemId, + Tcl_Obj * publicId, Tcl_Obj * notationName)); +/* 25 */ +EXTERN void TclXML_NotationDeclHandler _ANSI_ARGS_(( + void * userData, Tcl_Obj * notationName, + Tcl_Obj * base, Tcl_Obj * systemId, + Tcl_Obj * publicId)); +/* 26 */ +EXTERN int TclXML_UnknownEncodingHandler _ANSI_ARGS_(( + void * encodingHandlerData, Tcl_Obj * name, + void * info)); +/* 27 */ +EXTERN void TclXML_CommentHandler _ANSI_ARGS_((void * userData, + Tcl_Obj * data)); +/* 28 */ +EXTERN int TclXML_NotStandaloneHandler _ANSI_ARGS_(( + void * userData)); +/* Slot 29 is reserved */ +/* Slot 30 is reserved */ +/* 31 */ +EXTERN void TclXML_ElementDeclHandler _ANSI_ARGS_(( + void * userData, Tcl_Obj * name, + Tcl_Obj * contentspec)); +/* 32 */ +EXTERN void TclXML_AttlistDeclHandler _ANSI_ARGS_(( + void * userData, Tcl_Obj * name, + Tcl_Obj * attributes)); +/* 33 */ +EXTERN void TclXML_StartDoctypeDeclHandler _ANSI_ARGS_(( + void * userData, Tcl_Obj * name)); +/* 34 */ +EXTERN void TclXML_EndDoctypeDeclHandler _ANSI_ARGS_(( + void * userData)); + +typedef struct TclxmlStubs { + int magic; + struct TclxmlStubHooks *hooks; + + int (*tclxml_Init) _ANSI_ARGS_((Tcl_Interp * interp)); /* 0 */ + int (*tclxml_SafeInit) _ANSI_ARGS_((Tcl_Interp * interp)); /* 1 */ + int (*tclXML_RegisterXMLParser) _ANSI_ARGS_((Tcl_Interp * interp, TclXML_ParserClassInfo * parser)); /* 2 */ + int (*tclXML_RegisterElementStartProc) _ANSI_ARGS_((Tcl_Interp * interp, TclXML_Info * parser, ClientData clientData, TclXML_ElementStartProc * callback)); /* 3 */ + int (*tclXML_RegisterElementEndProc) _ANSI_ARGS_((Tcl_Interp * interp, TclXML_Info * parser, ClientData clientData, TclXML_ElementEndProc * callback)); /* 4 */ + int (*tclXML_RegisterCharacterDataProc) _ANSI_ARGS_((Tcl_Interp * interp, TclXML_Info * parser, ClientData clientData, TclXML_CharacterDataProc * callback)); /* 5 */ + int (*tclXML_RegisterPIProc) _ANSI_ARGS_((Tcl_Interp * interp, TclXML_Info * parser, ClientData clientData, TclXML_PIProc * callback)); /* 6 */ + int (*tclXML_RegisterDefaultProc) _ANSI_ARGS_((Tcl_Interp * interp, TclXML_Info * parser, ClientData clientData, TclXML_DefaultProc * callback)); /* 7 */ + int (*tclXML_RegisterUnparsedProc) _ANSI_ARGS_((Tcl_Interp * interp, TclXML_Info * parser, ClientData clientData, TclXML_UnparsedProc * callback)); /* 8 */ + int (*tclXML_RegisterNotationDeclProc) _ANSI_ARGS_((Tcl_Interp * interp, TclXML_Info * parser, ClientData clientData, TclXML_NotationDeclProc * callback)); /* 9 */ + int (*tclXML_RegisterEntityProc) _ANSI_ARGS_((Tcl_Interp * interp, TclXML_Info * parser, ClientData clientData, TclXML_EntityProc * callback)); /* 10 */ + int (*tclXML_RegisterUnknownEncodingProc) _ANSI_ARGS_((Tcl_Interp * interp, TclXML_Info * parser, ClientData clientData, TclXML_UnknownEncodingProc * callback)); /* 11 */ + int (*tclXML_RegisterCommentProc) _ANSI_ARGS_((Tcl_Interp * interp, TclXML_Info * parser, ClientData clientData, TclXML_CommentProc * callback)); /* 12 */ + int (*tclXML_RegisterNotStandaloneProc) _ANSI_ARGS_((Tcl_Interp * interp, TclXML_Info * parser, ClientData clientData, TclXML_NotStandaloneProc * callback)); /* 13 */ + int (*tclXML_RegisterElementDeclProc) _ANSI_ARGS_((Tcl_Interp * interp, TclXML_Info * parser, ClientData clientData, TclXML_ElementDeclProc * callback)); /* 14 */ + int (*tclXML_RegisterAttListDeclProc) _ANSI_ARGS_((Tcl_Interp * interp, TclXML_Info * parser, ClientData clientData, TclXML_AttlistDeclProc * callback)); /* 15 */ + int (*tclXML_RegisterStartDoctypeDeclProc) _ANSI_ARGS_((Tcl_Interp * interp, TclXML_Info * parser, ClientData clientData, TclXML_StartDoctypeDeclProc * callback)); /* 16 */ + int (*tclXML_RegisterEndDoctypeDeclProc) _ANSI_ARGS_((Tcl_Interp * interp, TclXML_Info * parser, ClientData clientData, TclXML_EndDoctypeDeclProc * callback)); /* 17 */ + void (*tclXML_ElementStartHandler) _ANSI_ARGS_((void * userdata, Tcl_Obj * name, Tcl_Obj * nsuri, Tcl_Obj * atts, Tcl_Obj * nsDeclsObj)); /* 18 */ + void (*tclXML_ElementEndHandler) _ANSI_ARGS_((void * userData, Tcl_Obj * name)); /* 19 */ + void (*tclXML_CharacterDataHandler) _ANSI_ARGS_((void * userData, Tcl_Obj * s)); /* 20 */ + void (*tclXML_ProcessingInstructionHandler) _ANSI_ARGS_((void * userData, Tcl_Obj * target, Tcl_Obj * data)); /* 21 */ + int (*tclXML_ExternalEntityRefHandler) _ANSI_ARGS_((ClientData clientData, Tcl_Obj * openEntityNames, Tcl_Obj * base, Tcl_Obj * systemId, Tcl_Obj * publicId)); /* 22 */ + void (*tclXML_DefaultHandler) _ANSI_ARGS_((void * userData, Tcl_Obj * s)); /* 23 */ + void (*tclXML_UnparsedDeclHandler) _ANSI_ARGS_((void * userData, Tcl_Obj * entityname, Tcl_Obj * base, Tcl_Obj * systemId, Tcl_Obj * publicId, Tcl_Obj * notationName)); /* 24 */ + void (*tclXML_NotationDeclHandler) _ANSI_ARGS_((void * userData, Tcl_Obj * notationName, Tcl_Obj * base, Tcl_Obj * systemId, Tcl_Obj * publicId)); /* 25 */ + int (*tclXML_UnknownEncodingHandler) _ANSI_ARGS_((void * encodingHandlerData, Tcl_Obj * name, void * info)); /* 26 */ + void (*tclXML_CommentHandler) _ANSI_ARGS_((void * userData, Tcl_Obj * data)); /* 27 */ + int (*tclXML_NotStandaloneHandler) _ANSI_ARGS_((void * userData)); /* 28 */ + void *reserved29; + void *reserved30; + void (*tclXML_ElementDeclHandler) _ANSI_ARGS_((void * userData, Tcl_Obj * name, Tcl_Obj * contentspec)); /* 31 */ + void (*tclXML_AttlistDeclHandler) _ANSI_ARGS_((void * userData, Tcl_Obj * name, Tcl_Obj * attributes)); /* 32 */ + void (*tclXML_StartDoctypeDeclHandler) _ANSI_ARGS_((void * userData, Tcl_Obj * name)); /* 33 */ + void (*tclXML_EndDoctypeDeclHandler) _ANSI_ARGS_((void * userData)); /* 34 */ +} TclxmlStubs; + +#ifdef __cplusplus +extern "C" { +#endif +extern TclxmlStubs *tclxmlStubsPtr; +#ifdef __cplusplus +} +#endif + +#if defined(USE_TCLXML_STUBS) && !defined(USE_TCLXML_STUB_PROCS) + +/* + * Inline function declarations: + */ + +#ifndef Tclxml_Init +#define Tclxml_Init \ + (tclxmlStubsPtr->tclxml_Init) /* 0 */ +#endif +#ifndef Tclxml_SafeInit +#define Tclxml_SafeInit \ + (tclxmlStubsPtr->tclxml_SafeInit) /* 1 */ +#endif +#ifndef TclXML_RegisterXMLParser +#define TclXML_RegisterXMLParser \ + (tclxmlStubsPtr->tclXML_RegisterXMLParser) /* 2 */ +#endif +#ifndef TclXML_RegisterElementStartProc +#define TclXML_RegisterElementStartProc \ + (tclxmlStubsPtr->tclXML_RegisterElementStartProc) /* 3 */ +#endif +#ifndef TclXML_RegisterElementEndProc +#define TclXML_RegisterElementEndProc \ + (tclxmlStubsPtr->tclXML_RegisterElementEndProc) /* 4 */ +#endif +#ifndef TclXML_RegisterCharacterDataProc +#define TclXML_RegisterCharacterDataProc \ + (tclxmlStubsPtr->tclXML_RegisterCharacterDataProc) /* 5 */ +#endif +#ifndef TclXML_RegisterPIProc +#define TclXML_RegisterPIProc \ + (tclxmlStubsPtr->tclXML_RegisterPIProc) /* 6 */ +#endif +#ifndef TclXML_RegisterDefaultProc +#define TclXML_RegisterDefaultProc \ + (tclxmlStubsPtr->tclXML_RegisterDefaultProc) /* 7 */ +#endif +#ifndef TclXML_RegisterUnparsedProc +#define TclXML_RegisterUnparsedProc \ + (tclxmlStubsPtr->tclXML_RegisterUnparsedProc) /* 8 */ +#endif +#ifndef TclXML_RegisterNotationDeclProc +#define TclXML_RegisterNotationDeclProc \ + (tclxmlStubsPtr->tclXML_RegisterNotationDeclProc) /* 9 */ +#endif +#ifndef TclXML_RegisterEntityProc +#define TclXML_RegisterEntityProc \ + (tclxmlStubsPtr->tclXML_RegisterEntityProc) /* 10 */ +#endif +#ifndef TclXML_RegisterUnknownEncodingProc +#define TclXML_RegisterUnknownEncodingProc \ + (tclxmlStubsPtr->tclXML_RegisterUnknownEncodingProc) /* 11 */ +#endif +#ifndef TclXML_RegisterCommentProc +#define TclXML_RegisterCommentProc \ + (tclxmlStubsPtr->tclXML_RegisterCommentProc) /* 12 */ +#endif +#ifndef TclXML_RegisterNotStandaloneProc +#define TclXML_RegisterNotStandaloneProc \ + (tclxmlStubsPtr->tclXML_RegisterNotStandaloneProc) /* 13 */ +#endif +#ifndef TclXML_RegisterElementDeclProc +#define TclXML_RegisterElementDeclProc \ + (tclxmlStubsPtr->tclXML_RegisterElementDeclProc) /* 14 */ +#endif +#ifndef TclXML_RegisterAttListDeclProc +#define TclXML_RegisterAttListDeclProc \ + (tclxmlStubsPtr->tclXML_RegisterAttListDeclProc) /* 15 */ +#endif +#ifndef TclXML_RegisterStartDoctypeDeclProc +#define TclXML_RegisterStartDoctypeDeclProc \ + (tclxmlStubsPtr->tclXML_RegisterStartDoctypeDeclProc) /* 16 */ +#endif +#ifndef TclXML_RegisterEndDoctypeDeclProc +#define TclXML_RegisterEndDoctypeDeclProc \ + (tclxmlStubsPtr->tclXML_RegisterEndDoctypeDeclProc) /* 17 */ +#endif +#ifndef TclXML_ElementStartHandler +#define TclXML_ElementStartHandler \ + (tclxmlStubsPtr->tclXML_ElementStartHandler) /* 18 */ +#endif +#ifndef TclXML_ElementEndHandler +#define TclXML_ElementEndHandler \ + (tclxmlStubsPtr->tclXML_ElementEndHandler) /* 19 */ +#endif +#ifndef TclXML_CharacterDataHandler +#define TclXML_CharacterDataHandler \ + (tclxmlStubsPtr->tclXML_CharacterDataHandler) /* 20 */ +#endif +#ifndef TclXML_ProcessingInstructionHandler +#define TclXML_ProcessingInstructionHandler \ + (tclxmlStubsPtr->tclXML_ProcessingInstructionHandler) /* 21 */ +#endif +#ifndef TclXML_ExternalEntityRefHandler +#define TclXML_ExternalEntityRefHandler \ + (tclxmlStubsPtr->tclXML_ExternalEntityRefHandler) /* 22 */ +#endif +#ifndef TclXML_DefaultHandler +#define TclXML_DefaultHandler \ + (tclxmlStubsPtr->tclXML_DefaultHandler) /* 23 */ +#endif +#ifndef TclXML_UnparsedDeclHandler +#define TclXML_UnparsedDeclHandler \ + (tclxmlStubsPtr->tclXML_UnparsedDeclHandler) /* 24 */ +#endif +#ifndef TclXML_NotationDeclHandler +#define TclXML_NotationDeclHandler \ + (tclxmlStubsPtr->tclXML_NotationDeclHandler) /* 25 */ +#endif +#ifndef TclXML_UnknownEncodingHandler +#define TclXML_UnknownEncodingHandler \ + (tclxmlStubsPtr->tclXML_UnknownEncodingHandler) /* 26 */ +#endif +#ifndef TclXML_CommentHandler +#define TclXML_CommentHandler \ + (tclxmlStubsPtr->tclXML_CommentHandler) /* 27 */ +#endif +#ifndef TclXML_NotStandaloneHandler +#define TclXML_NotStandaloneHandler \ + (tclxmlStubsPtr->tclXML_NotStandaloneHandler) /* 28 */ +#endif +/* Slot 29 is reserved */ +/* Slot 30 is reserved */ +#ifndef TclXML_ElementDeclHandler +#define TclXML_ElementDeclHandler \ + (tclxmlStubsPtr->tclXML_ElementDeclHandler) /* 31 */ +#endif +#ifndef TclXML_AttlistDeclHandler +#define TclXML_AttlistDeclHandler \ + (tclxmlStubsPtr->tclXML_AttlistDeclHandler) /* 32 */ +#endif +#ifndef TclXML_StartDoctypeDeclHandler +#define TclXML_StartDoctypeDeclHandler \ + (tclxmlStubsPtr->tclXML_StartDoctypeDeclHandler) /* 33 */ +#endif +#ifndef TclXML_EndDoctypeDeclHandler +#define TclXML_EndDoctypeDeclHandler \ + (tclxmlStubsPtr->tclXML_EndDoctypeDeclHandler) /* 34 */ +#endif + +#endif /* defined(USE_TCLXML_STUBS) && !defined(USE_TCLXML_STUB_PROCS) */ + +/* !END!: Do not edit above this line. */ + +#endif /* _TCLXMLDECLS */ + diff --git a/tclxml/include/tclxslt/tclxslt.h b/tclxml/include/tclxslt/tclxslt.h new file mode 100644 index 0000000..428b375 --- /dev/null +++ b/tclxml/include/tclxslt/tclxslt.h @@ -0,0 +1,98 @@ +/* tclxslt.h -- + * + * Public interfaces to TclXSLT package. + * + * Copyright (c) 2005-2007 Explain + * http://www.explain.com.au/ + * Copyright (c) 2001-2004 Zveno Pty Ltd + * http://www.zveno.com/ + * + * See the file "LICENSE" for information on usage and + * redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. + * + * $Id: tclxslt.h,v 1.1.1.1 2009/01/16 22:11:49 joye Exp $ + */ + +#ifndef __TCLXSLT_H__ +#define __TCLXSLT_H__ + +#ifdef TCLXML_BUILD_AS_FRAMEWORK +#include <Tcl/tcl.h> +#else +#include <tcl.h> +#endif /* TCLXML_BUILD_AS_FRAMEWORK */ + +#include <tcldom-libxml2/tcldom-libxml2.h> +#include <tclxml-libxml2/docObj.h> +#include <libxml/xpath.h> +#include <libxml/xpathInternals.h> +#include <libxslt/xsltutils.h> +#include <libxslt/transform.h> +#include <libxslt/extensions.h> +#include <libexslt/exsltconfig.h> +#include <libexslt/exslt.h> + +/* + * For C++ compilers, use extern "C" + */ + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * These macros are used to control whether functions are being declared for + * import or export in Windows, + * They map to no-op declarations on non-Windows systems. + * Assumes that tcl.h defines DLLEXPORT & DLLIMPORT correctly. + * The default build on windows is for a DLL, which causes the DLLIMPORT + * and DLLEXPORT macros to be nonempty. To build a static library, the + * macro STATIC_BUILD should be defined before the inclusion of tcl.h + * + * If a function is being declared while it is being built + * to be included in a shared library, then it should have the DLLEXPORT + * storage class. If is being declared for use by a module that is going to + * link against the shared library, then it should have the DLLIMPORT storage + * class. If the symbol is beind declared for a static build or for use from a + * stub library, then the storage class should be empty. + * + * The convention is that a macro called BUILD_xxxx, where xxxx is the + * name of a library we are building, is set on the compile line for sources + * that are to be placed in the library. When this macro is set, the + * storage class will be set to DLLEXPORT. At the end of the header file, the + * storage class will be reset to DLLIMPORt. + */ + +#undef TCL_STORAGE_CLASS +#ifdef BUILD_Tclxslt +# define TCL_STORAGE_CLASS DLLEXPORT +#else +# ifdef USE_TCL_STUBS +# define TCL_STORAGE_CLASS +# else +# define TCL_STORAGE_CLASS DLLIMPORT +# endif +#endif + +/* + * Declarations for externally visible functions. + */ + +EXTERN int Tclxslt_libxslt_Init _ANSI_ARGS_((Tcl_Interp *interp)); +EXTERN int Tclxslt_libxslt_SafeInit _ANSI_ARGS_((Tcl_Interp *interp)); + +/* + * Class creation command for XSLT compiled stylesheet objects. + */ + +EXTERN Tcl_ObjCmdProc TclXSLTCompileStylesheet; + + +#undef TCL_STORAGE_CLASS +#define TCL_STORAGE_CLASS DLLIMPORT + +#ifdef __cplusplus +} +#endif + +#endif /* __TCLXSLT_H__ */ |