diff options
author | Daniel Veillard <veillard@src.gnome.org> | 2001-10-30 17:41:38 +0000 |
---|---|---|
committer | Daniel Veillard <veillard@src.gnome.org> | 2001-10-30 17:41:38 +0000 |
commit | 91c0040acee605a18c1b3bb440fbfea7892010f5 (patch) | |
tree | 2c65258cd492addb099c64f858fecc55baabde99 /catalog.c | |
parent | 5540daa9ead16ff82221ae2cf5f94eb103ae567d (diff) | |
download | libxml2-91c0040acee605a18c1b3bb440fbfea7892010f5.tar.gz |
Justin Fletcher pointed out that xmlParseXMLCatalog was not used anymore !
* catalog.c: Justin Fletcher pointed out that xmlParseXMLCatalog
was not used anymore !
Daniel
Diffstat (limited to 'catalog.c')
-rw-r--r-- | catalog.c | 71 |
1 files changed, 0 insertions, 71 deletions
@@ -879,9 +879,6 @@ xmlLoadFileContent(const char *filename) static xmlCatalogEntryPtr xmlParseXMLCatalogFile(xmlCatalogPrefer prefer, const xmlChar *filename); -static xmlCatalogEntryPtr -xmlParseXMLCatalog(const xmlChar *value, xmlCatalogPrefer prefer, - const char *file); static void xmlParseXMLCatalogNodeList(xmlNodePtr cur, xmlCatalogPrefer prefer, xmlCatalogEntryPtr parent); @@ -1121,74 +1118,6 @@ xmlParseXMLCatalogNodeList(xmlNodePtr cur, xmlCatalogPrefer prefer, } /** - * xmlParseXMLCatalog: - * @value: the content in-memory of the catalog serialization - * @prefer: the PUBLIC vs. SYSTEM current preference value - * @file: the filename for the catalog - * - * Parses the catalog content to extract the XML tree and then analyze the - * tree to build a list of Catalog entries corresponding to this catalog - * - * Returns the resulting Catalog entries list - */ -static xmlCatalogEntryPtr -xmlParseXMLCatalog(const xmlChar *value, xmlCatalogPrefer prefer, - const char *file) { - xmlDocPtr doc; - xmlNodePtr cur; - xmlChar *prop; - xmlCatalogEntryPtr parent = NULL; - - if ((value == NULL) || (file == NULL)) - return(NULL); - - if (xmlDebugCatalogs) - xmlGenericError(xmlGenericErrorContext, - "Parsing catalog %s's content\n", file); - - doc = xmlParseDoc((xmlChar *) value); - if (doc == NULL) - return(NULL); - doc->URL = xmlStrdup((const xmlChar *) file); - - cur = xmlDocGetRootElement(doc); - if ((cur != NULL) && (xmlStrEqual(cur->name, BAD_CAST "catalog")) && - (cur->ns != NULL) && (cur->ns->href != NULL) && - (xmlStrEqual(cur->ns->href, XML_CATALOGS_NAMESPACE))) { - - prop = xmlGetProp(cur, BAD_CAST "prefer"); - if (prop != NULL) { - if (xmlStrEqual(prop, BAD_CAST "system")) { - prefer = XML_CATA_PREFER_SYSTEM; - } else if (xmlStrEqual(prop, BAD_CAST "public")) { - prefer = XML_CATA_PREFER_PUBLIC; - } else { - xmlGenericError(xmlGenericErrorContext, - "Invalid value for prefer: '%s'\n", - prop); - } - xmlFree(prop); - } - parent = xmlNewCatalogEntry(XML_CATA_CATALOG, NULL, - (const xmlChar *)file, prefer); - if (parent == NULL) { - xmlFreeDoc(doc); - return(NULL); - } - - cur = cur->children; - xmlParseXMLCatalogNodeList(cur, prefer, parent); - } else { - xmlGenericError(xmlGenericErrorContext, - "File %s is not an XML Catalog\n", file); - xmlFreeDoc(doc); - return(NULL); - } - xmlFreeDoc(doc); - return(parent); -} - -/** * xmlParseXMLCatalogFile: * @prefer: the PUBLIC vs. SYSTEM current preference value * @filename: the filename for the catalog |