1 | /*
|
---|
2 | * Summary: implementation of XInclude
|
---|
3 | * Description: API to handle XInclude processing,
|
---|
4 | * implements the
|
---|
5 | * World Wide Web Consortium Last Call Working Draft 10 November 2003
|
---|
6 | * http://www.w3.org/TR/2003/WD-xinclude-20031110
|
---|
7 | *
|
---|
8 | * Copy: 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 |
|
---|
20 | #ifdef LIBXML_XINCLUDE_ENABLED
|
---|
21 |
|
---|
22 | #ifdef __cplusplus
|
---|
23 | extern "C" {
|
---|
24 | #endif
|
---|
25 |
|
---|
26 | /**
|
---|
27 | * XINCLUDE_NS:
|
---|
28 | *
|
---|
29 | * Macro defining the Xinclude namespace: http://www.w3.org/2003/XInclude
|
---|
30 | */
|
---|
31 | #define XINCLUDE_NS (const xmlChar *) "http://www.w3.org/2003/XInclude"
|
---|
32 | /**
|
---|
33 | * XINCLUDE_OLD_NS:
|
---|
34 | *
|
---|
35 | * Macro defining the draft Xinclude namespace: http://www.w3.org/2001/XInclude
|
---|
36 | */
|
---|
37 | #define XINCLUDE_OLD_NS (const xmlChar *) "http://www.w3.org/2001/XInclude"
|
---|
38 | /**
|
---|
39 | * XINCLUDE_NODE:
|
---|
40 | *
|
---|
41 | * Macro defining "include"
|
---|
42 | */
|
---|
43 | #define XINCLUDE_NODE (const xmlChar *) "include"
|
---|
44 | /**
|
---|
45 | * XINCLUDE_FALLBACK:
|
---|
46 | *
|
---|
47 | * Macro defining "fallback"
|
---|
48 | */
|
---|
49 | #define XINCLUDE_FALLBACK (const xmlChar *) "fallback"
|
---|
50 | /**
|
---|
51 | * XINCLUDE_HREF:
|
---|
52 | *
|
---|
53 | * Macro defining "href"
|
---|
54 | */
|
---|
55 | #define XINCLUDE_HREF (const xmlChar *) "href"
|
---|
56 | /**
|
---|
57 | * XINCLUDE_PARSE:
|
---|
58 | *
|
---|
59 | * Macro defining "parse"
|
---|
60 | */
|
---|
61 | #define XINCLUDE_PARSE (const xmlChar *) "parse"
|
---|
62 | /**
|
---|
63 | * XINCLUDE_PARSE_XML:
|
---|
64 | *
|
---|
65 | * Macro defining "xml"
|
---|
66 | */
|
---|
67 | #define XINCLUDE_PARSE_XML (const xmlChar *) "xml"
|
---|
68 | /**
|
---|
69 | * XINCLUDE_PARSE_TEXT:
|
---|
70 | *
|
---|
71 | * Macro defining "text"
|
---|
72 | */
|
---|
73 | #define XINCLUDE_PARSE_TEXT (const xmlChar *) "text"
|
---|
74 | /**
|
---|
75 | * XINCLUDE_PARSE_ENCODING:
|
---|
76 | *
|
---|
77 | * Macro defining "encoding"
|
---|
78 | */
|
---|
79 | #define XINCLUDE_PARSE_ENCODING (const xmlChar *) "encoding"
|
---|
80 | /**
|
---|
81 | * XINCLUDE_PARSE_XPOINTER:
|
---|
82 | *
|
---|
83 | * Macro defining "xpointer"
|
---|
84 | */
|
---|
85 | #define XINCLUDE_PARSE_XPOINTER (const xmlChar *) "xpointer"
|
---|
86 |
|
---|
87 | typedef struct _xmlXIncludeCtxt xmlXIncludeCtxt;
|
---|
88 | typedef xmlXIncludeCtxt *xmlXIncludeCtxtPtr;
|
---|
89 |
|
---|
90 | /*
|
---|
91 | * standalone processing
|
---|
92 | */
|
---|
93 | XMLPUBFUN int
|
---|
94 | xmlXIncludeProcess (xmlDocPtr doc);
|
---|
95 | XMLPUBFUN int
|
---|
96 | xmlXIncludeProcessFlags (xmlDocPtr doc,
|
---|
97 | int flags);
|
---|
98 | XMLPUBFUN int
|
---|
99 | xmlXIncludeProcessFlagsData(xmlDocPtr doc,
|
---|
100 | int flags,
|
---|
101 | void *data);
|
---|
102 | XMLPUBFUN int
|
---|
103 | xmlXIncludeProcessTreeFlagsData(xmlNodePtr tree,
|
---|
104 | int flags,
|
---|
105 | void *data);
|
---|
106 | XMLPUBFUN int
|
---|
107 | xmlXIncludeProcessTree (xmlNodePtr tree);
|
---|
108 | XMLPUBFUN int
|
---|
109 | xmlXIncludeProcessTreeFlags(xmlNodePtr tree,
|
---|
110 | int flags);
|
---|
111 | /*
|
---|
112 | * contextual processing
|
---|
113 | */
|
---|
114 | XMLPUBFUN xmlXIncludeCtxtPtr
|
---|
115 | xmlXIncludeNewContext (xmlDocPtr doc);
|
---|
116 | XMLPUBFUN int
|
---|
117 | xmlXIncludeSetFlags (xmlXIncludeCtxtPtr ctxt,
|
---|
118 | int flags);
|
---|
119 | XMLPUBFUN void
|
---|
120 | xmlXIncludeSetErrorHandler(xmlXIncludeCtxtPtr ctxt,
|
---|
121 | xmlStructuredErrorFunc handler,
|
---|
122 | void *data);
|
---|
123 | XMLPUBFUN int
|
---|
124 | xmlXIncludeGetLastError (xmlXIncludeCtxtPtr ctxt);
|
---|
125 | XMLPUBFUN void
|
---|
126 | xmlXIncludeFreeContext (xmlXIncludeCtxtPtr ctxt);
|
---|
127 | XMLPUBFUN int
|
---|
128 | xmlXIncludeProcessNode (xmlXIncludeCtxtPtr ctxt,
|
---|
129 | xmlNodePtr tree);
|
---|
130 | #ifdef __cplusplus
|
---|
131 | }
|
---|
132 | #endif
|
---|
133 |
|
---|
134 | #endif /* LIBXML_XINCLUDE_ENABLED */
|
---|
135 |
|
---|
136 | #endif /* __XML_XINCLUDE_H__ */
|
---|