diff options
author | Mike Hommey <mh@glandium.org> | 2004-10-28 09:07:41 +0000 |
---|---|---|
committer | Mike Hommey <mh@glandium.org> | 2004-10-28 09:07:41 +0000 |
commit | 9705f1a5e858108d21a0128556f42b25d16833cd (patch) | |
tree | f819e7482d433f8bf5da005695c79189dd5ce527 /catalog.c | |
parent | 0732be88d054db33fa0ca479eab9988c8e6be42e (diff) | |
download | libxml2-9705f1a5e858108d21a0128556f42b25d16833cd.tar.gz |
Load /tmp/tmp.SgII7T/libxml2-2.6.15 intoupstream/2.6.15
packages/libxml2/branches/upstream/current.
Diffstat (limited to 'catalog.c')
-rw-r--r-- | catalog.c | 304 |
1 files changed, 182 insertions, 122 deletions
@@ -90,6 +90,7 @@ typedef enum { XML_CATA_CATALOG, XML_CATA_BROKEN_CATALOG, XML_CATA_NEXT_CATALOG, + XML_CATA_GROUP, XML_CATA_PUBLIC, XML_CATA_SYSTEM, XML_CATA_REWRITE_SYSTEM, @@ -125,6 +126,7 @@ struct _xmlCatalogEntry { xmlCatalogPrefer prefer; int dealloc; int depth; + struct _xmlCatalogEntry *group; }; typedef enum { @@ -245,6 +247,7 @@ xmlCatalogErr(xmlCatalogEntryPtr catal, xmlNodePtr node, int error, * @name: name of the entry * @value: value of the entry * @prefer: the PUBLIC vs. SYSTEM current preference value + * @group: for members of a group, the group entry * * create a new Catalog entry, this type is shared both by XML and * SGML catalogs, but the acceptable types values differs. @@ -253,7 +256,8 @@ xmlCatalogErr(xmlCatalogEntryPtr catal, xmlNodePtr node, int error, */ static xmlCatalogEntryPtr xmlNewCatalogEntry(xmlCatalogEntryType type, const xmlChar *name, - const xmlChar *value, const xmlChar *URL, xmlCatalogPrefer prefer) { + const xmlChar *value, const xmlChar *URL, xmlCatalogPrefer prefer, + xmlCatalogEntryPtr group) { xmlCatalogEntryPtr ret; xmlChar *normid = NULL; @@ -290,6 +294,7 @@ xmlNewCatalogEntry(xmlCatalogEntryType type, const xmlChar *name, ret->prefer = prefer; ret->dealloc = 0; ret->depth = 0; + ret->group = group; return(ret); } @@ -504,15 +509,142 @@ xmlCatalogDumpEntry(xmlCatalogEntryPtr entry, FILE *out) { fprintf(out, "\n"); } +/** + * xmlDumpXMLCatalogNode: + * @catal: top catalog entry + * @catalog: pointer to the xml tree + * @doc: the containing document + * @ns: the current namespace + * @cgroup: group node for group members + * + * Serializes a Catalog entry, called by xmlDumpXMLCatalog and recursively + * for group entries + */ +static void xmlDumpXMLCatalogNode(xmlCatalogEntryPtr catal, xmlNodePtr catalog, + xmlDocPtr doc, xmlNsPtr ns, xmlCatalogEntryPtr cgroup) { + xmlNodePtr node; + xmlCatalogEntryPtr cur; + /* + * add all the catalog entries + */ + cur = catal; + while (cur != NULL) { + if (cur->group == cgroup) { + switch (cur->type) { + case XML_CATA_REMOVED: + break; + case XML_CATA_BROKEN_CATALOG: + case XML_CATA_CATALOG: + if (cur == catal) { + cur = cur->children; + continue; + } + break; + case XML_CATA_NEXT_CATALOG: + node = xmlNewDocNode(doc, ns, BAD_CAST "nextCatalog", NULL); + xmlSetProp(node, BAD_CAST "catalog", cur->value); + xmlAddChild(catalog, node); + break; + case XML_CATA_NONE: + break; + case XML_CATA_GROUP: + node = xmlNewDocNode(doc, ns, BAD_CAST "group", NULL); + xmlSetProp(node, BAD_CAST "id", cur->name); + if (cur->value != NULL) { + xmlNsPtr xns; + xns = xmlSearchNsByHref(doc, node, XML_XML_NAMESPACE); + if (xns != NULL) + xmlSetNsProp(node, xns, BAD_CAST "base", + cur->value); + } + switch (cur->prefer) { + case XML_CATA_PREFER_NONE: + break; + case XML_CATA_PREFER_PUBLIC: + xmlSetProp(node, BAD_CAST "prefer", BAD_CAST "public"); + break; + case XML_CATA_PREFER_SYSTEM: + xmlSetProp(node, BAD_CAST "prefer", BAD_CAST "system"); + break; + } + xmlDumpXMLCatalogNode(cur->next, node, doc, ns, cur); + xmlAddChild(catalog, node); + break; + case XML_CATA_PUBLIC: + node = xmlNewDocNode(doc, ns, BAD_CAST "public", NULL); + xmlSetProp(node, BAD_CAST "publicId", cur->name); + xmlSetProp(node, BAD_CAST "uri", cur->value); + xmlAddChild(catalog, node); + break; + case XML_CATA_SYSTEM: + node = xmlNewDocNode(doc, ns, BAD_CAST "system", NULL); + xmlSetProp(node, BAD_CAST "systemId", cur->name); + xmlSetProp(node, BAD_CAST "uri", cur->value); + xmlAddChild(catalog, node); + break; + case XML_CATA_REWRITE_SYSTEM: + node = xmlNewDocNode(doc, ns, BAD_CAST "rewriteSystem", NULL); + xmlSetProp(node, BAD_CAST "systemIdStartString", cur->name); + xmlSetProp(node, BAD_CAST "rewritePrefix", cur->value); + xmlAddChild(catalog, node); + break; + case XML_CATA_DELEGATE_PUBLIC: + node = xmlNewDocNode(doc, ns, BAD_CAST "delegatePublic", NULL); + xmlSetProp(node, BAD_CAST "publicIdStartString", cur->name); + xmlSetProp(node, BAD_CAST "catalog", cur->value); + xmlAddChild(catalog, node); + break; + case XML_CATA_DELEGATE_SYSTEM: + node = xmlNewDocNode(doc, ns, BAD_CAST "delegateSystem", NULL); + xmlSetProp(node, BAD_CAST "systemIdStartString", cur->name); + xmlSetProp(node, BAD_CAST "catalog", cur->value); + xmlAddChild(catalog, node); + break; + case XML_CATA_URI: + node = xmlNewDocNode(doc, ns, BAD_CAST "uri", NULL); + xmlSetProp(node, BAD_CAST "name", cur->name); + xmlSetProp(node, BAD_CAST "uri", cur->value); + xmlAddChild(catalog, node); + break; + case XML_CATA_REWRITE_URI: + node = xmlNewDocNode(doc, ns, BAD_CAST "rewriteURI", NULL); + xmlSetProp(node, BAD_CAST "uriStartString", cur->name); + xmlSetProp(node, BAD_CAST "rewritePrefix", cur->value); + xmlAddChild(catalog, node); + break; + case XML_CATA_DELEGATE_URI: + node = xmlNewDocNode(doc, ns, BAD_CAST "delegateURI", NULL); + xmlSetProp(node, BAD_CAST "uriStartString", cur->name); + xmlSetProp(node, BAD_CAST "catalog", cur->value); + xmlAddChild(catalog, node); + break; + case SGML_CATA_SYSTEM: + case SGML_CATA_PUBLIC: + case SGML_CATA_ENTITY: + case SGML_CATA_PENTITY: + case SGML_CATA_DOCTYPE: + case SGML_CATA_LINKTYPE: + case SGML_CATA_NOTATION: + case SGML_CATA_DELEGATE: + case SGML_CATA_BASE: + case SGML_CATA_CATALOG: + case SGML_CATA_DOCUMENT: + case SGML_CATA_SGMLDECL: + break; + } + } + cur = cur->next; + } +} + static int xmlDumpXMLCatalog(FILE *out, xmlCatalogEntryPtr catal) { int ret; xmlDocPtr doc; xmlNsPtr ns; xmlDtdPtr dtd; - xmlNodePtr node, catalog; + xmlNodePtr catalog; xmlOutputBufferPtr buf; - xmlCatalogEntryPtr cur; /* * Rebuild a catalog @@ -540,93 +672,8 @@ BAD_CAST "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd"); catalog->nsDef = ns; xmlAddChild((xmlNodePtr) doc, catalog); - /* - * add all the catalog entries - */ - cur = catal; - while (cur != NULL) { - switch (cur->type) { - case XML_CATA_REMOVED: - break; - case XML_CATA_BROKEN_CATALOG: - case XML_CATA_CATALOG: - if (cur == catal) { - cur = cur->children; - continue; - } - break; - case XML_CATA_NEXT_CATALOG: - node = xmlNewDocNode(doc, ns, BAD_CAST "nextCatalog", NULL); - xmlSetProp(node, BAD_CAST "catalog", cur->value); - xmlAddChild(catalog, node); - break; - case XML_CATA_NONE: - break; - case XML_CATA_PUBLIC: - node = xmlNewDocNode(doc, ns, BAD_CAST "public", NULL); - xmlSetProp(node, BAD_CAST "publicId", cur->name); - xmlSetProp(node, BAD_CAST "uri", cur->value); - xmlAddChild(catalog, node); - break; - case XML_CATA_SYSTEM: - node = xmlNewDocNode(doc, ns, BAD_CAST "system", NULL); - xmlSetProp(node, BAD_CAST "systemId", cur->name); - xmlSetProp(node, BAD_CAST "uri", cur->value); - xmlAddChild(catalog, node); - break; - case XML_CATA_REWRITE_SYSTEM: - node = xmlNewDocNode(doc, ns, BAD_CAST "rewriteSystem", NULL); - xmlSetProp(node, BAD_CAST "systemIdStartString", cur->name); - xmlSetProp(node, BAD_CAST "rewritePrefix", cur->value); - xmlAddChild(catalog, node); - break; - case XML_CATA_DELEGATE_PUBLIC: - node = xmlNewDocNode(doc, ns, BAD_CAST "delegatePublic", NULL); - xmlSetProp(node, BAD_CAST "publicIdStartString", cur->name); - xmlSetProp(node, BAD_CAST "catalog", cur->value); - xmlAddChild(catalog, node); - break; - case XML_CATA_DELEGATE_SYSTEM: - node = xmlNewDocNode(doc, ns, BAD_CAST "delegateSystem", NULL); - xmlSetProp(node, BAD_CAST "systemIdStartString", cur->name); - xmlSetProp(node, BAD_CAST "catalog", cur->value); - xmlAddChild(catalog, node); - break; - case XML_CATA_URI: - node = xmlNewDocNode(doc, ns, BAD_CAST "uri", NULL); - xmlSetProp(node, BAD_CAST "name", cur->name); - xmlSetProp(node, BAD_CAST "uri", cur->value); - xmlAddChild(catalog, node); - break; - case XML_CATA_REWRITE_URI: - node = xmlNewDocNode(doc, ns, BAD_CAST "rewriteURI", NULL); - xmlSetProp(node, BAD_CAST "uriStartString", cur->name); - xmlSetProp(node, BAD_CAST "rewritePrefix", cur->value); - xmlAddChild(catalog, node); - break; - case XML_CATA_DELEGATE_URI: - node = xmlNewDocNode(doc, ns, BAD_CAST "delegateURI", NULL); - xmlSetProp(node, BAD_CAST "uriStartString", cur->name); - xmlSetProp(node, BAD_CAST "catalog", cur->value); - xmlAddChild(catalog, node); - break; - case SGML_CATA_SYSTEM: - case SGML_CATA_PUBLIC: - case SGML_CATA_ENTITY: - case SGML_CATA_PENTITY: - case SGML_CATA_DOCTYPE: - case SGML_CATA_LINKTYPE: - case SGML_CATA_NOTATION: - case SGML_CATA_DELEGATE: - case SGML_CATA_BASE: - case SGML_CATA_CATALOG: - case SGML_CATA_DOCUMENT: - case SGML_CATA_SGMLDECL: - break; - } - cur = cur->next; - } - + xmlDumpXMLCatalogNode(catal, catalog, doc, ns, NULL); + /* * reserialize it */ @@ -865,6 +912,7 @@ xmlParseCatalogFile(const char *filename) { ctxt->validate = 0; ctxt->loadsubset = 0; ctxt->pedantic = 0; + ctxt->dictNames = 1; xmlParseDocument(ctxt); @@ -1017,7 +1065,7 @@ static xmlCatalogEntryPtr xmlParseXMLCatalogFile(xmlCatalogPrefer prefer, const xmlChar *filename); static void xmlParseXMLCatalogNodeList(xmlNodePtr cur, xmlCatalogPrefer prefer, - xmlCatalogEntryPtr parent); + xmlCatalogEntryPtr parent, xmlCatalogEntryPtr cgroup); static xmlChar * xmlCatalogListXMLResolve(xmlCatalogEntryPtr catal, const xmlChar *pubID, const xmlChar *sysID); @@ -1067,6 +1115,7 @@ xmlGetXMLCatalogEntryType(const xmlChar *name) { * @attrName: the attribute holding the value * @uriAttrName: the attribute holding the URI-Reference * @prefer: the PUBLIC vs. SYSTEM current preference value + * @cgroup: the group which includes this node * * Finishes the examination of an XML tree node of a catalog and build * a Catalog entry from it. @@ -1076,7 +1125,8 @@ xmlGetXMLCatalogEntryType(const xmlChar *name) { static xmlCatalogEntryPtr xmlParseXMLCatalogOneNode(xmlNodePtr cur, xmlCatalogEntryType type, const xmlChar *name, const xmlChar *attrName, - const xmlChar *uriAttrName, xmlCatalogPrefer prefer) { + const xmlChar *uriAttrName, xmlCatalogPrefer prefer, + xmlCatalogEntryPtr cgroup) { int ok = 1; xmlChar *uriValue; xmlChar *nameValue = NULL; @@ -1117,7 +1167,7 @@ xmlParseXMLCatalogOneNode(xmlNodePtr cur, xmlCatalogEntryType type, xmlGenericError(xmlGenericErrorContext, "Found %s: '%s'\n", name, URL); } - ret = xmlNewCatalogEntry(type, nameValue, uriValue, URL, prefer); + ret = xmlNewCatalogEntry(type, nameValue, uriValue, URL, prefer, cgroup); } else { xmlCatalogErr(ret, cur, XML_CATALOG_ENTRY_BROKEN, "%s entry '%s' broken ?: %s\n", name, uriAttrName, uriValue); @@ -1138,6 +1188,7 @@ xmlParseXMLCatalogOneNode(xmlNodePtr cur, xmlCatalogEntryType type, * @cur: the XML node * @prefer: the PUBLIC vs. SYSTEM current preference value * @parent: the parent Catalog entry + * @cgroup: the group which includes this node * * Examines an XML tree node of a catalog and build * a Catalog entry from it adding it to its parent. The examination can @@ -1145,7 +1196,7 @@ xmlParseXMLCatalogOneNode(xmlNodePtr cur, xmlCatalogEntryType type, */ static void xmlParseXMLCatalogNode(xmlNodePtr cur, xmlCatalogPrefer prefer, - xmlCatalogEntryPtr parent) + xmlCatalogEntryPtr parent, xmlCatalogEntryPtr cgroup) { xmlChar *uri = NULL; xmlChar *URL = NULL; @@ -1156,6 +1207,7 @@ xmlParseXMLCatalogNode(xmlNodePtr cur, xmlCatalogPrefer prefer, return; if (xmlStrEqual(cur->name, BAD_CAST "group")) { xmlChar *prop; + xmlCatalogPrefer pref = XML_CATA_PREFER_NONE; prop = xmlGetProp(cur, BAD_CAST "prefer"); if (prop != NULL) { @@ -1169,46 +1221,46 @@ xmlParseXMLCatalogNode(xmlNodePtr cur, xmlCatalogPrefer prefer, prop, NULL, NULL); } xmlFree(prop); + pref = prefer; } - /* - * Recurse to propagate prefer to the subtree - * (xml:base handling is automated) - */ - xmlParseXMLCatalogNodeList(cur->children, prefer, parent); + prop = xmlGetProp(cur, BAD_CAST "id"); + base = xmlGetNsProp(cur, BAD_CAST "base", XML_XML_NAMESPACE); + entry = xmlNewCatalogEntry(XML_CATA_GROUP, prop, base, NULL, pref, cgroup); + xmlFree(prop); } else if (xmlStrEqual(cur->name, BAD_CAST "public")) { entry = xmlParseXMLCatalogOneNode(cur, XML_CATA_PUBLIC, - BAD_CAST "public", BAD_CAST "publicId", BAD_CAST "uri", prefer); + BAD_CAST "public", BAD_CAST "publicId", BAD_CAST "uri", prefer, cgroup); } else if (xmlStrEqual(cur->name, BAD_CAST "system")) { entry = xmlParseXMLCatalogOneNode(cur, XML_CATA_SYSTEM, - BAD_CAST "system", BAD_CAST "systemId", BAD_CAST "uri", prefer); + BAD_CAST "system", BAD_CAST "systemId", BAD_CAST "uri", prefer, cgroup); } else if (xmlStrEqual(cur->name, BAD_CAST "rewriteSystem")) { entry = xmlParseXMLCatalogOneNode(cur, XML_CATA_REWRITE_SYSTEM, BAD_CAST "rewriteSystem", BAD_CAST "systemIdStartString", - BAD_CAST "rewritePrefix", prefer); + BAD_CAST "rewritePrefix", prefer, cgroup); } else if (xmlStrEqual(cur->name, BAD_CAST "delegatePublic")) { entry = xmlParseXMLCatalogOneNode(cur, XML_CATA_DELEGATE_PUBLIC, BAD_CAST "delegatePublic", BAD_CAST "publicIdStartString", - BAD_CAST "catalog", prefer); + BAD_CAST "catalog", prefer, cgroup); } else if (xmlStrEqual(cur->name, BAD_CAST "delegateSystem")) { entry = xmlParseXMLCatalogOneNode(cur, XML_CATA_DELEGATE_SYSTEM, BAD_CAST "delegateSystem", BAD_CAST "systemIdStartString", - BAD_CAST "catalog", prefer); + BAD_CAST "catalog", prefer, cgroup); } else if (xmlStrEqual(cur->name, BAD_CAST "uri")) { entry = xmlParseXMLCatalogOneNode(cur, XML_CATA_URI, BAD_CAST "uri", BAD_CAST "name", - BAD_CAST "uri", prefer); + BAD_CAST "uri", prefer, cgroup); } else if (xmlStrEqual(cur->name, BAD_CAST "rewriteURI")) { entry = xmlParseXMLCatalogOneNode(cur, XML_CATA_REWRITE_URI, BAD_CAST "rewriteURI", BAD_CAST "uriStartString", - BAD_CAST "rewritePrefix", prefer); + BAD_CAST "rewritePrefix", prefer, cgroup); } else if (xmlStrEqual(cur->name, BAD_CAST "delegateURI")) { entry = xmlParseXMLCatalogOneNode(cur, XML_CATA_DELEGATE_URI, BAD_CAST "delegateURI", BAD_CAST "uriStartString", - BAD_CAST "catalog", prefer); + BAD_CAST "catalog", prefer, cgroup); } else if (xmlStrEqual(cur->name, BAD_CAST "nextCatalog")) { entry = xmlParseXMLCatalogOneNode(cur, XML_CATA_NEXT_CATALOG, BAD_CAST "nextCatalog", NULL, - BAD_CAST "catalog", prefer); + BAD_CAST "catalog", prefer, cgroup); } if ((entry != NULL) && (parent != NULL)) { entry->parent = parent; @@ -1223,6 +1275,13 @@ xmlParseXMLCatalogNode(xmlNodePtr cur, xmlCatalogPrefer prefer, prev->next = entry; } } + if (entry->type == XML_CATA_GROUP) { + /* + * Recurse to propagate prefer to the subtree + * (xml:base handling is automated) + */ + xmlParseXMLCatalogNodeList(cur->children, prefer, parent, entry); + } if (base != NULL) xmlFree(base); if (uri != NULL) @@ -1236,6 +1295,7 @@ xmlParseXMLCatalogNode(xmlNodePtr cur, xmlCatalogPrefer prefer, * @cur: the XML node list of siblings * @prefer: the PUBLIC vs. SYSTEM current preference value * @parent: the parent Catalog entry + * @cgroup: the group which includes this list * * Examines a list of XML sibling nodes of a catalog and build * a list of Catalog entry from it adding it to the parent. @@ -1243,11 +1303,11 @@ xmlParseXMLCatalogNode(xmlNodePtr cur, xmlCatalogPrefer prefer, */ static void xmlParseXMLCatalogNodeList(xmlNodePtr cur, xmlCatalogPrefer prefer, - xmlCatalogEntryPtr parent) { + xmlCatalogEntryPtr parent, xmlCatalogEntryPtr cgroup) { while (cur != NULL) { if ((cur->ns != NULL) && (cur->ns->href != NULL) && (xmlStrEqual(cur->ns->href, XML_CATALOGS_NAMESPACE))) { - xmlParseXMLCatalogNode(cur, prefer, parent); + xmlParseXMLCatalogNode(cur, prefer, parent, cgroup); } cur = cur->next; } @@ -1292,7 +1352,7 @@ xmlParseXMLCatalogFile(xmlCatalogPrefer prefer, const xmlChar *filename) { (xmlStrEqual(cur->ns->href, XML_CATALOGS_NAMESPACE))) { parent = xmlNewCatalogEntry(XML_CATA_CATALOG, NULL, - (const xmlChar *)filename, NULL, prefer); + (const xmlChar *)filename, NULL, prefer, NULL); if (parent == NULL) { xmlFreeDoc(doc); return(NULL); @@ -1312,7 +1372,7 @@ xmlParseXMLCatalogFile(xmlCatalogPrefer prefer, const xmlChar *filename) { xmlFree(prop); } cur = cur->children; - xmlParseXMLCatalogNodeList(cur, prefer, parent); + xmlParseXMLCatalogNodeList(cur, prefer, parent, NULL); } else { xmlCatalogErr(NULL, (xmlNodePtr) doc, XML_CATALOG_NOT_CATALOG, "File %s is not an XML Catalog\n", @@ -1477,10 +1537,10 @@ xmlAddXMLCatalog(xmlCatalogEntryPtr catal, const xmlChar *type, "Adding element %s to catalog\n", type); if (cur == NULL) catal->children = xmlNewCatalogEntry(typ, orig, replace, - NULL, catal->prefer); + NULL, catal->prefer, NULL); else cur->next = xmlNewCatalogEntry(typ, orig, replace, - NULL, catal->prefer); + NULL, catal->prefer, NULL); if (doregister) { cur = xmlHashLookup(xmlCatalogXMLFiles, catal->URL); if (cur != NULL) @@ -2398,7 +2458,7 @@ xmlParseSGMLCatalog(xmlCatalogPtr catal, const xmlChar *value, xmlCatalogEntryPtr entry; entry = xmlNewCatalogEntry(type, name, filename, - NULL, XML_CATA_PREFER_NONE); + NULL, XML_CATA_PREFER_NONE, NULL); res = xmlHashAddEntry(catal->sgml, name, entry); if (res < 0) { xmlFreeCatalogEntry(entry); @@ -2411,7 +2471,7 @@ xmlParseSGMLCatalog(xmlCatalogPtr catal, const xmlChar *value, xmlCatalogEntryPtr entry; entry = xmlNewCatalogEntry(type, sysid, NULL, NULL, - XML_CATA_PREFER_NONE); + XML_CATA_PREFER_NONE, NULL); res = xmlHashAddEntry(catal->sgml, sysid, entry); if (res < 0) { xmlFreeCatalogEntry(entry); @@ -2628,7 +2688,7 @@ xmlLoadACatalog(const char *filename) return(NULL); } catal->xml = xmlNewCatalogEntry(XML_CATA_CATALOG, NULL, - NULL, BAD_CAST filename, xmlCatalogDefaultPrefer); + NULL, BAD_CAST filename, xmlCatalogDefaultPrefer, NULL); } xmlFree(content); return (catal); @@ -2669,7 +2729,7 @@ xmlExpandCatalog(xmlCatalogPtr catal, const char *filename) } else { xmlCatalogEntryPtr tmp, cur; tmp = xmlNewCatalogEntry(XML_CATA_CATALOG, NULL, - NULL, BAD_CAST filename, xmlCatalogDefaultPrefer); + NULL, BAD_CAST filename, xmlCatalogDefaultPrefer, NULL); cur = catal->xml; if (cur == NULL) { @@ -2887,7 +2947,7 @@ xmlACatalogAdd(xmlCatalogPtr catal, const xmlChar * type, xmlCatalogEntryPtr entry; entry = xmlNewCatalogEntry(cattype, orig, replace, NULL, - XML_CATA_PREFER_NONE); + XML_CATA_PREFER_NONE, NULL); if (catal->sgml == NULL) catal->sgml = xmlHashCreate(10); res = xmlHashAddEntry(catal->sgml, orig, entry); @@ -3081,7 +3141,7 @@ xmlInitializeCatalog(void) { path = (char *) xmlStrndup((const xmlChar *)paths, cur - paths); if (path != NULL) { *nextent = xmlNewCatalogEntry(XML_CATA_CATALOG, NULL, - NULL, BAD_CAST path, xmlCatalogDefaultPrefer); + NULL, BAD_CAST path, xmlCatalogDefaultPrefer, NULL); if (*nextent != NULL) nextent = &((*nextent)->next); xmlFree(path); @@ -3328,7 +3388,7 @@ xmlCatalogAdd(const xmlChar *type, const xmlChar *orig, const xmlChar *replace) xmlDefaultCatalog = xmlCreateNewCatalog(XML_XML_CATALOG_TYPE, xmlCatalogDefaultPrefer); xmlDefaultCatalog->xml = xmlNewCatalogEntry(XML_CATA_CATALOG, NULL, - orig, NULL, xmlCatalogDefaultPrefer); + orig, NULL, xmlCatalogDefaultPrefer, NULL); xmlRMutexUnlock(xmlCatalogMutex); return(0); @@ -3535,7 +3595,7 @@ xmlCatalogAddLocal(void *catalogs, const xmlChar *URL) { "Adding document catalog %s\n", URL); add = xmlNewCatalogEntry(XML_CATA_CATALOG, NULL, URL, NULL, - xmlCatalogDefaultPrefer); + xmlCatalogDefaultPrefer, NULL); if (add == NULL) return(catalogs); |