Home | History | Annotate | Download | only in libxml2

Lines Matching defs:catalog

2  * catalog.c: set of generic Catalog related routines 
5 * http://www.jclark.com/sp/catalog.htm
39 #include <libxml/catalog.h>
71 #define XML_XML_DEFAULT_CATALOG "file:///etc/xml/catalog"
74 #define XML_SGML_DEFAULT_CATALOG "file:///etc/sgml/catalog"
79 static char XML_XML_DEFAULT_CATALOG[256] = "file:///etc/xml/catalog";
154 * SGML Catalogs are stored as a simple hash table of catalog entries
155 * Catalog stack to check against overflows when building the
156 * SGML catalog
164 * XML Catalogs are stored as a tree of Catalog entries
190 * The default catalog in use by the application
195 * A mutex for modifying the shared global catalog(s)
203 * Whether the catalog support was initialized.
209 * Catalog error handlers *
230 * @catal: the Catalog entry
235 * Handle a catalog error
264 * create a new Catalog entry, this type is shared both by XML and
278 xmlCatalogErrMemory("allocating catalog entry");
318 * @ret: a Catalog entry
320 * Free the memory allocated to a Catalog entry
336 "Free catalog entry %s\n", ret->name);
339 "Free catalog entry %s\n", ret->value);
342 "Free catalog entry\n");
356 * @ret: a Catalog entry list
358 * Free the memory allocated to a full chained list of Catalog entries
373 * @ret: a Catalog entry list
375 * Free the memory allocated to list of Catalog entries from the
376 * catalog file hash.
399 * @type: type of catalog
402 * create a new Catalog, this type is shared both by XML and
413 xmlCatalogErrMemory("allocating catalog");
428 * @catal: a Catalog
430 * Free the memory allocated to a Catalog
453 * @entry: the catalog entry
456 * Serialize an SGML Catalog entry
482 fprintf(out, "CATALOG "); break;
526 * @catal: top catalog entry
527 * @catalog: pointer to the xml tree
532 * Serializes a Catalog entry, called by xmlDumpXMLCatalog and recursively
535 static void xmlDumpXMLCatalogNode(xmlCatalogEntryPtr catal, xmlNodePtr catalog,
540 * add all the catalog entries
557 xmlSetProp(node, BAD_CAST "catalog", cur->value);
558 xmlAddChild(catalog, node);
583 xmlAddChild(catalog, node);
589 xmlAddChild(catalog, node);
595 xmlAddChild(catalog, node);
601 xmlAddChild(catalog, node);
606 catalog", cur->value);
607 xmlAddChild(catalog, node);
612 xmlSetProp(node, BAD_CAST "catalog", cur->value);
613 xmlAddChild(catalog, node);
619 xmlAddChild(catalog, node);
625 xmlAddChild(catalog, node);
630 xmlSetProp(node, BAD_CAST "catalog", cur->value);
631 xmlAddChild(catalog, node);
658 xmlNodePtr catalog;
662 * Rebuild a catalog
667 dtd = xmlNewDtd(doc, BAD_CAST "catalog",
668 BAD_CAST "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN",
669 BAD_CAST "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd");
678 catalog = xmlNewDocNode(doc, ns, BAD_CAST "catalog", NULL);
679 if (catalog == NULL) {
684 catalog->nsDef = ns;
685 xmlAddChild((xmlNodePtr) doc, catalog);
687 xmlDumpXMLCatalogNode(catal, catalog, doc, ns, NULL);
717 * @catal: pointer to the catalog being converted
719 * Convert one entry from the catalog
760 * Conversion successful, remove from the SGML catalog
780 * @catal: the catalog
782 * Convert all the SGML catalog entries as XML ones
794 "Converting SGML catalog to XML\n");
878 * except it bypass all catalog lookups.
995 xmlCatalogErrMemory("allocating catalog data");
1071 * The XML Catalog parser *
1091 * lookup the internal type associated to an XML catalog entry name
1116 else if (xmlStrEqual(name, (const xmlChar *) "catalog"))
1124 * @type: the type of Catalog entry
1131 * Finishes the examination of an XML tree node of a catalog and build
1132 * a Catalog entry from it.
1134 * Returns the new Catalog entry node or NULL in case of error.
1201 * @parent: the parent Catalog entry
1204 * Examines an XML tree node of a catalog and build
1205 * a Catalog entry from it adding it to its parent. The examination can
1252 BAD_CAST "catalog", prefer, cgroup);
1256 BAD_CAST "catalog", prefer, cgroup);
1268 BAD_CAST "catalog", prefer, cgroup);
1272 BAD_CAST "catalog", prefer, cgroup);
1304 * @parent: the parent Catalog entry
1307 * Examines a list of XML sibling nodes of a catalog and build
1308 * a list of Catalog entry from it adding it to the parent.
1327 * @filename: the filename for the catalog
1329 * Parses the catalog file to extract the XML tree and then analyze the
1330 * tree to build a list of Catalog entries corresponding to this catalog
1332 * Returns the resulting Catalog entries list
1348 "Failed to parse catalog %s\n", filename);
1354 "%d Parsing catalog %s\n", xmlGetThreadId(), filename);
1357 if ((cur != NULL) && (xmlStrEqual(cur->name, BAD_CAST "catalog")) &&
1385 "File %s is not an XML Catalog\n",
1396 * @catal: an existing but incomplete catalog entry
1414 * lock the whole catalog for modification
1446 * use the existing catalog, there is no recursion allowed at
1477 * XML Catalog handling *
1483 * @catal: top of an XML catalog
1484 * @type: the type of record to add to the catalog
1488 * Add an entry in the XML catalog, it may overwrite existing but
1514 "Failed to add unknown element %s to catalog\n", type);
1528 "Updating element %s to catalog\n", type);
1544 "Adding element %s to catalog\n", type);
1563 * @catal: top of an XML catalog
1564 * @value: the value to remove from the catalog
1566 * Remove entries in the XML catalog where the value or the URI
1596 "Removing element %s from catalog\n", cur->name);
1599 "Removing element %s from catalog\n", cur->value);
1610 * @catal: a catalog list
1615 * list of catalog entries.
1635 "Detected recursion in catalog %s\n",
1843 * @catal: a catalog list
1848 * list of catalog entries.
1872 "Detected recursion in catalog %s\n",
1986 * @catal: a catalog list
2079 * @catal: a catalog list
2132 * The SGML Catalog parser *
2147 * Skip a comment in an SGML catalog
2169 * Parse an SGML catalog ID
2238 * Parse an SGML catalog name
2275 * Get the Catalog entry type for a given SGML Catalog name
2277 * Returns Catalog entry type
2300 else if (xmlStrEqual(name, (const xmlChar *) "CATALOG"))
2309 * @catal: the SGML Catalog
2310 * @value: the content of the SGML Catalog serialization
2311 * @file: the filepath for the catalog
2312 * @super: should this be handled as a Super Catalog in which case
2315 * Parse an SGML catalog content and fill up the @catal hash table with
2374 else if (xmlStrEqual(name, (const xmlChar *) "CATALOG"))
2527 * SGML Catalog handling *
2533 * @catal: an SGML catalog hash
2536 * Try to lookup the catalog local reference associated to a public ID
2570 * @catal: an SGML catalog hash
2573 * Try to lookup the catalog local reference for a system ID
2594 * @catal: the SGML catalog
2631 * Load an SGML super catalog. It won't expand CATALOG or DELEGATE
2633 * like adding and removing CATALOG or DELEGATE entries.
2635 * Returns the catalog parsed or NULL in case of error
2667 * Load the catalog and build the associated data structures.
2668 * This can be either an XML Catalog or an SGML Catalog
2669 * It will recurse in SGML CATALOG entries. On the other hand XML
2672 * Returns the catalog parsed or NULL in case of error
2721 * @catal: a catalog
2724 * Load the catalog and expand the existing catal structure.
2725 * This can be either an XML Catalog or an SGML Catalog
2769 * @catal: a Catalog
2772 * Try to lookup the catalog resource for a system ID
2804 * @catal: a Catalog
2807 * Try to lookup the catalog local reference associated to a public ID in that catalog
2839 * @catal: a Catalog
2886 * @catal: a Catalog
2922 * @catal: a Catalog
2925 * Dump the given catalog to the given file.
2943 * @catal: a Catalog
2944 * @type: the type of record to add to the catalog
2948 * Add an entry in the catalog, it may overwrite existing but
2983 * @catal: a Catalog
2986 * Remove an entry from the catalog
3010 * @sgml: should this create an SGML catalog
3012 * create a new Catalog.
3033 * @catal: should this create an SGML catalog
3035 * Check is a catalog is empty
3037 * Returns 1 if the catalog is empty, 0 if not, amd -1 in case of error.
3069 * Public interfaces manipulating the global shared default catalog *
3076 * Do the catalog initialization only of global data, doesn't try to load
3077 * any catalog actually.
3078 * this function is not thread safe, catalog initialization should
3095 * Do the catalog initialization.
3096 * this function is not thread safe, catalog initialization should
3134 strncpy(p, "\\..\\etc\\catalog", 255 - (p - buf));
3185 * Load the catalog and makes its definitions effective for the default
3186 * external entity loader. It will recurse in SGML CATALOG entries.
3187 * this function is not thread safe, catalog initialization should
3226 * this function is not thread safe, catalog initialization should
3298 * Try to lookup the catalog resource for a system ID
3318 * Try to lookup the catalog reference associated to a public ID
3380 * Dump all the global catalog content to the given file.
3396 * @type: the type of record to add to the catalog
3400 * Add an entry in the catalog, it may overwrite existing but
3402 * If called before any other catalog routine, allows to override the
3403 * default shared catalog put in place by xmlInitializeCatalog();
3416 * Specific case where one want to override the default catalog
3420 (xmlStrEqual(type, BAD_CAST "catalog"))) {
3439 * Remove an entry from the catalog
3459 * Convert all the SGML catalog entries as XML ones
3508 "Disabling catalog usage\n");
3532 * in XML Catalog resolution. C.f. section 4.1.1 of the spec
3548 "Setting catalog preference to PUBLIC\n");
3552 "Setting catalog preference to SYSTEM\n");
3566 * Used to set the debug level for catalog operation, 0 disable
3569 * Returns the previous value of the catalog debugging level
3592 * Free up the memory associated to the catalog list
3610 * @URL: the URL to a new local catalog
3612 * Add the new entry to the catalog list
3628 "Adding document catalog %s\n", URL);
3652 * document's private catalog list
3697 * document's private catalog list
3735 * Try to lookup the catalog reference associated to a system ID
3779 * Try to lookup the catalog reference associated to a public ID