| 1 |
/** |
| 2 |
* @file |
| 3 |
* |
| 4 |
* @brief Implementation of XInclude 1.0 |
| 5 |
* |
| 6 |
* API to process XML Inclusions. |
| 7 |
* |
| 8 |
* @copyright See Copyright for the status of this software. |
| 9 |
* |
| 10 |
* @author Daniel Veillard |
| 11 |
*/ |
| 12 |
|
| 13 |
#ifndef __XML_XINCLUDE_H__ |
| 14 |
#define __XML_XINCLUDE_H__ |
| 15 |
|
| 16 |
#include <libxml/xmlversion.h> |
| 17 |
#include <libxml/xmlerror.h> |
| 18 |
#include <libxml/tree.h> |
| 19 |
#include <libxml/parser.h> |
| 20 |
|
| 21 |
#ifdef LIBXML_XINCLUDE_ENABLED |
| 22 |
|
| 23 |
#ifdef __cplusplus |
| 24 |
extern "C" { |
| 25 |
#endif |
| 26 |
|
| 27 |
/** |
| 28 |
* Macro defining the Xinclude namespace: http://www.w3.org/2003/XInclude |
| 29 |
*/ |
| 30 |
#define XINCLUDE_NS (const xmlChar *) "http://www.w3.org/2003/XInclude" |
| 31 |
/** |
| 32 |
* Macro defining the draft Xinclude namespace: http://www.w3.org/2001/XInclude |
| 33 |
*/ |
| 34 |
#define XINCLUDE_OLD_NS (const xmlChar *) "http://www.w3.org/2001/XInclude" |
| 35 |
/** |
| 36 |
* Macro defining "include" |
| 37 |
*/ |
| 38 |
#define XINCLUDE_NODE (const xmlChar *) "include" |
| 39 |
/** |
| 40 |
* Macro defining "fallback" |
| 41 |
*/ |
| 42 |
#define XINCLUDE_FALLBACK (const xmlChar *) "fallback" |
| 43 |
/** |
| 44 |
* Macro defining "href" |
| 45 |
*/ |
| 46 |
#define XINCLUDE_HREF (const xmlChar *) "href" |
| 47 |
/** |
| 48 |
* Macro defining "parse" |
| 49 |
*/ |
| 50 |
#define XINCLUDE_PARSE (const xmlChar *) "parse" |
| 51 |
/** |
| 52 |
* Macro defining "xml" |
| 53 |
*/ |
| 54 |
#define XINCLUDE_PARSE_XML (const xmlChar *) "xml" |
| 55 |
/** |
| 56 |
* Macro defining "text" |
| 57 |
*/ |
| 58 |
#define XINCLUDE_PARSE_TEXT (const xmlChar *) "text" |
| 59 |
/** |
| 60 |
* Macro defining "encoding" |
| 61 |
*/ |
| 62 |
#define XINCLUDE_PARSE_ENCODING (const xmlChar *) "encoding" |
| 63 |
/** |
| 64 |
* Macro defining "xpointer" |
| 65 |
*/ |
| 66 |
#define XINCLUDE_PARSE_XPOINTER (const xmlChar *) "xpointer" |
| 67 |
|
| 68 |
/** XInclude context */ |
| 69 |
typedef struct _xmlXIncludeCtxt xmlXIncludeCtxt; |
| 70 |
typedef xmlXIncludeCtxt *xmlXIncludeCtxtPtr; |
| 71 |
|
| 72 |
/* |
| 73 |
* standalone processing |
| 74 |
*/ |
| 75 |
XMLPUBFUN int |
| 76 |
xmlXIncludeProcess (xmlDoc *doc); |
| 77 |
XMLPUBFUN int |
| 78 |
xmlXIncludeProcessFlags (xmlDoc *doc, |
| 79 |
int flags); |
| 80 |
XMLPUBFUN int |
| 81 |
xmlXIncludeProcessFlagsData(xmlDoc *doc, |
| 82 |
int flags, |
| 83 |
void *data); |
| 84 |
XMLPUBFUN int |
| 85 |
xmlXIncludeProcessTreeFlagsData(xmlNode *tree, |
| 86 |
int flags, |
| 87 |
void *data); |
| 88 |
XMLPUBFUN int |
| 89 |
xmlXIncludeProcessTree (xmlNode *tree); |
| 90 |
XMLPUBFUN int |
| 91 |
xmlXIncludeProcessTreeFlags(xmlNode *tree, |
| 92 |
int flags); |
| 93 |
/* |
| 94 |
* contextual processing |
| 95 |
*/ |
| 96 |
XMLPUBFUN xmlXIncludeCtxt * |
| 97 |
xmlXIncludeNewContext (xmlDoc *doc); |
| 98 |
XMLPUBFUN int |
| 99 |
xmlXIncludeSetFlags (xmlXIncludeCtxt *ctxt, |
| 100 |
int flags); |
| 101 |
XMLPUBFUN void |
| 102 |
xmlXIncludeSetErrorHandler(xmlXIncludeCtxt *ctxt, |
| 103 |
xmlStructuredErrorFunc handler, |
| 104 |
void *data); |
| 105 |
XMLPUBFUN void |
| 106 |
xmlXIncludeSetResourceLoader(xmlXIncludeCtxt *ctxt, |
| 107 |
xmlResourceLoader loader, |
| 108 |
void *data); |
| 109 |
XMLPUBFUN int |
| 110 |
xmlXIncludeGetLastError (xmlXIncludeCtxt *ctxt); |
| 111 |
XMLPUBFUN void |
| 112 |
xmlXIncludeFreeContext (xmlXIncludeCtxt *ctxt); |
| 113 |
XMLPUBFUN int |
| 114 |
xmlXIncludeProcessNode (xmlXIncludeCtxt *ctxt, |
| 115 |
xmlNode *tree); |
| 116 |
#ifdef __cplusplus |
| 117 |
} |
| 118 |
#endif |
| 119 |
|
| 120 |
#endif /* LIBXML_XINCLUDE_ENABLED */ |
| 121 |
|
| 122 |
#endif /* __XML_XINCLUDE_H__ */ |