added support and APIs needed for the catalog PI cleanup Daniel
* include/libxml/catalog.h include/libxml/parser.h
include/libxml/xmlerror.h catalog.c parser.c parserInternals.c
xmlIO.c: added support and APIs needed for the catalog PI
* include/libxml/xmlIO.h: cleanup
Daniel
diff --git a/include/libxml/catalog.h b/include/libxml/catalog.h
index 7693996..d39fb60 100644
--- a/include/libxml/catalog.h
+++ b/include/libxml/catalog.h
@@ -33,8 +33,10 @@
*
* The namespace for the XML Catalogs elements
*/
-#define XML_CATALOGS_NAMESPACE \
+#define XML_CATALOGS_NAMESPACE \
(const xmlChar *) "urn:oasis:names:tc:entity:xmlns:xml:catalog"
+#define XML_CATALOG_PI \
+ (const xmlChar *) "oasis-xml-catalog"
/*
* The API is voluntarily limited to general cataloging
@@ -45,6 +47,13 @@
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;
+
void xmlInitializeCatalog (void);
int xmlLoadCatalog (const char *filename);
void xmlLoadCatalogs (const char *paths);
@@ -58,8 +67,24 @@
const xmlChar *orig,
const xmlChar *replace);
int xmlCatalogRemove (const xmlChar *value);
+
+/*
+ * 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);
+/*
+ * 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);
diff --git a/include/libxml/parser.h b/include/libxml/parser.h
index de0bebb..1cf7f52 100644
--- a/include/libxml/parser.h
+++ b/include/libxml/parser.h
@@ -217,6 +217,7 @@
int loadsubset; /* should the external subset be loaded */
int linenumbers; /* set line number in element content */
+ void *catalogs; /* document's own catalog */
};
/**
diff --git a/include/libxml/xmlIO.h b/include/libxml/xmlIO.h
index 9f248d1..0bdf6a5 100644
--- a/include/libxml/xmlIO.h
+++ b/include/libxml/xmlIO.h
@@ -165,7 +165,7 @@
#ifdef LIBXML_HTTP_ENABLED
void * xmlIOHTTPOpenW (const char * post_uri,
int compression );
-void xmlRegisterHTTPPostCallbacksI (void );
+void xmlRegisterHTTPPostCallbacks (void );
#endif
/*
diff --git a/include/libxml/xmlerror.h b/include/libxml/xmlerror.h
index 53c5751..88daeff 100644
--- a/include/libxml/xmlerror.h
+++ b/include/libxml/xmlerror.h
@@ -132,7 +132,8 @@
XML_ERR_ENTITY_LOOP, /* 89 */
XML_ERR_ENTITY_BOUNDARY, /* 90 */
XML_ERR_INVALID_URI, /* 91 */
- XML_ERR_URI_FRAGMENT /* 92 */
+ XML_ERR_URI_FRAGMENT, /* 92 */
+ XML_WAR_CATALOG_PI /* 93 */
}xmlParserErrors;
/*