ReactOS  0.4.15-dev-439-g292f67a
catalog.h
Go to the documentation of this file.
1 
17 #ifndef __XML_CATALOG_H__
18 #define __XML_CATALOG_H__
19 
20 #include <stdio.h>
21 
22 #include <libxml/xmlversion.h>
23 #include <libxml/xmlstring.h>
24 #include <libxml/tree.h>
25 
26 #ifdef LIBXML_CATALOG_ENABLED
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
37 #define XML_CATALOGS_NAMESPACE \
38  (const xmlChar *) "urn:oasis:names:tc:entity:xmlns:xml:catalog"
39 
44 #define XML_CATALOG_PI \
45  (const xmlChar *) "oasis-xml-catalog"
46 
47 /*
48  * The API is voluntarily limited to general cataloging.
49  */
50 typedef enum {
51  XML_CATA_PREFER_NONE = 0,
52  XML_CATA_PREFER_PUBLIC = 1,
53  XML_CATA_PREFER_SYSTEM
54 } xmlCatalogPrefer;
55 
56 typedef enum {
57  XML_CATA_ALLOW_NONE = 0,
58  XML_CATA_ALLOW_GLOBAL = 1,
59  XML_CATA_ALLOW_DOCUMENT = 2,
60  XML_CATA_ALLOW_ALL = 3
61 } xmlCatalogAllow;
62 
63 typedef struct _xmlCatalog xmlCatalog;
64 typedef xmlCatalog *xmlCatalogPtr;
65 
66 /*
67  * Operations on a given catalog.
68  */
69 XMLPUBFUN xmlCatalogPtr XMLCALL
70  xmlNewCatalog (int sgml);
71 XMLPUBFUN xmlCatalogPtr XMLCALL
72  xmlLoadACatalog (const char *filename);
73 XMLPUBFUN xmlCatalogPtr XMLCALL
74  xmlLoadSGMLSuperCatalog (const char *filename);
76  xmlConvertSGMLCatalog (xmlCatalogPtr catal);
78  xmlACatalogAdd (xmlCatalogPtr catal,
79  const xmlChar *type,
80  const xmlChar *orig,
81  const xmlChar *replace);
83  xmlACatalogRemove (xmlCatalogPtr catal,
84  const xmlChar *value);
86  xmlACatalogResolve (xmlCatalogPtr catal,
87  const xmlChar *pubID,
88  const xmlChar *sysID);
90  xmlACatalogResolveSystem(xmlCatalogPtr catal,
91  const xmlChar *sysID);
93  xmlACatalogResolvePublic(xmlCatalogPtr catal,
94  const xmlChar *pubID);
96  xmlACatalogResolveURI (xmlCatalogPtr catal,
97  const xmlChar *URI);
98 #ifdef LIBXML_OUTPUT_ENABLED
99 XMLPUBFUN void XMLCALL
100  xmlACatalogDump (xmlCatalogPtr catal,
101  FILE *out);
102 #endif /* LIBXML_OUTPUT_ENABLED */
103 XMLPUBFUN void XMLCALL
104  xmlFreeCatalog (xmlCatalogPtr catal);
105 XMLPUBFUN int XMLCALL
106  xmlCatalogIsEmpty (xmlCatalogPtr catal);
107 
108 /*
109  * Global operations.
110  */
111 XMLPUBFUN void XMLCALL
112  xmlInitializeCatalog (void);
113 XMLPUBFUN int XMLCALL
114  xmlLoadCatalog (const char *filename);
115 XMLPUBFUN void XMLCALL
116  xmlLoadCatalogs (const char *paths);
117 XMLPUBFUN void XMLCALL
118  xmlCatalogCleanup (void);
119 #ifdef LIBXML_OUTPUT_ENABLED
120 XMLPUBFUN void XMLCALL
121  xmlCatalogDump (FILE *out);
122 #endif /* LIBXML_OUTPUT_ENABLED */
124  xmlCatalogResolve (const xmlChar *pubID,
125  const xmlChar *sysID);
127  xmlCatalogResolveSystem (const xmlChar *sysID);
129  xmlCatalogResolvePublic (const xmlChar *pubID);
131  xmlCatalogResolveURI (const xmlChar *URI);
132 XMLPUBFUN int XMLCALL
133  xmlCatalogAdd (const xmlChar *type,
134  const xmlChar *orig,
135  const xmlChar *replace);
136 XMLPUBFUN int XMLCALL
137  xmlCatalogRemove (const xmlChar *value);
139  xmlParseCatalogFile (const char *filename);
140 XMLPUBFUN int XMLCALL
141  xmlCatalogConvert (void);
142 
143 /*
144  * Strictly minimal interfaces for per-document catalogs used
145  * by the parser.
146  */
147 XMLPUBFUN void XMLCALL
148  xmlCatalogFreeLocal (void *catalogs);
149 XMLPUBFUN void * XMLCALL
150  xmlCatalogAddLocal (void *catalogs,
151  const xmlChar *URL);
153  xmlCatalogLocalResolve (void *catalogs,
154  const xmlChar *pubID,
155  const xmlChar *sysID);
157  xmlCatalogLocalResolveURI(void *catalogs,
158  const xmlChar *URI);
159 /*
160  * Preference settings.
161  */
162 XMLPUBFUN int XMLCALL
163  xmlCatalogSetDebug (int level);
164 XMLPUBFUN xmlCatalogPrefer XMLCALL
165  xmlCatalogSetDefaultPrefer(xmlCatalogPrefer prefer);
166 XMLPUBFUN void XMLCALL
167  xmlCatalogSetDefaults (xmlCatalogAllow allow);
168 XMLPUBFUN xmlCatalogAllow XMLCALL
169  xmlCatalogGetDefaults (void);
170 
171 
172 /* DEPRECATED interfaces */
173 XMLPUBFUN const xmlChar * XMLCALL
174  xmlCatalogGetSystem (const xmlChar *sysID);
175 XMLPUBFUN const xmlChar * XMLCALL
176  xmlCatalogGetPublic (const xmlChar *pubID);
177 
178 #ifdef __cplusplus
179 }
180 #endif
181 #endif /* LIBXML_CATALOG_ENABLED */
182 #endif /* __XML_CATALOG_H__ */
GLint level
Definition: gl.h:1546
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
#define XMLPUBFUN
Definition: xmlexports.h:30
const char * filename
Definition: ioapi.h:135
INT replace(TCHAR source[MAX_PATH], TCHAR dest[MAX_PATH], DWORD dwFlags, BOOL *doMore)
Definition: replace.c:47
static FILE * out
Definition: regtests2xml.c:44
unsigned char xmlChar
Definition: xmlstring.h:28
GLsizei const GLuint * paths
Definition: glext.h:11717
Definition: tree.h:551
#define XMLCALL