Home | History | Annotate | Download | only in src

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");
1074 * The XML Catalog parser *
1094 * lookup the internal type associated to an XML catalog entry name
1119 else if (xmlStrEqual(name, (const xmlChar *) "catalog"))
1127 * @type: the type of Catalog entry
1134 * Finishes the examination of an XML tree node of a catalog and build
1135 * a Catalog entry from it.
1137 * Returns the new Catalog entry node or NULL in case of error.
1204 * @parent: the parent Catalog entry
1207 * Examines an XML tree node of a catalog and build
1208 * a Catalog entry from it adding it to its parent. The examination can
1255 BAD_CAST "catalog", prefer, cgroup);
1259 BAD_CAST "catalog", prefer, cgroup);
1271 BAD_CAST "catalog", prefer, cgroup);
1275 BAD_CAST "catalog", prefer, cgroup);
1307 * @parent: the parent Catalog entry
1310 * Examines a list of XML sibling nodes of a catalog and build
1311 * a list of Catalog entry from it adding it to the parent.
1330 * @filename: the filename for the catalog
1332 * Parses the catalog file to extract the XML tree and then analyze the
1333 * tree to build a list of Catalog entries corresponding to this catalog
1335 * Returns the resulting Catalog entries list
1351 "Failed to parse catalog %s\n", filename);
1357 "%d Parsing catalog %s\n", xmlGetThreadId(), filename);
1360 if ((cur != NULL) && (xmlStrEqual(cur->name, BAD_CAST "catalog")) &&
1388 "File %s is not an XML Catalog\n",
1399 * @catal: an existing but incomplete catalog entry
1417 * lock the whole catalog for modification
1449 * use the existing catalog, there is no recursion allowed at
1480 * XML Catalog handling *
1486 * @catal: top of an XML catalog
1487 * @type: the type of record to add to the catalog
1491 * Add an entry in the XML catalog, it may overwrite existing but
1517 "Failed to add unknown element %s to catalog\n", type);
1531 "Updating element %s to catalog\n", type);
1547 "Adding element %s to catalog\n", type);
1566 * @catal: top of an XML catalog
1567 * @value: the value to remove from the catalog
1569 * Remove entries in the XML catalog where the value or the URI
1599 "Removing element %s from catalog\n", cur->name);
1602 "Removing element %s from catalog\n", cur->value);
1613 * @catal: a catalog list
1618 * list of catalog entries.
1638 "Detected recursion in catalog %s\n",
1846 * @catal: a catalog list
1851 * list of catalog entries.
1875 "Detected recursion in catalog %s\n",
1989 * @catal: a catalog list
2082 * @catal: a catalog list
2135 * The SGML Catalog parser *
2150 * Skip a comment in an SGML catalog
2172 * Parse an SGML catalog ID
2241 * Parse an SGML catalog name
2278 * Get the Catalog entry type for a given SGML Catalog name
2280 * Returns Catalog entry type
2303 else if (xmlStrEqual(name, (const xmlChar *) "CATALOG"))
2312 * @catal: the SGML Catalog
2313 * @value: the content of the SGML Catalog serialization
2314 * @file: the filepath for the catalog
2315 * @super: should this be handled as a Super Catalog in which case
2318 * Parse an SGML catalog content and fill up the @catal hash table with
2377 else if (xmlStrEqual(name, (const xmlChar *) "CATALOG"))
2530 * SGML Catalog handling *
2536 * @catal: an SGML catalog hash
2539 * Try to lookup the catalog local reference associated to a public ID
2573 * @catal: an SGML catalog hash
2576 * Try to lookup the catalog local reference for a system ID
2597 * @catal: the SGML catalog
2634 * Load an SGML super catalog. It won't expand CATALOG or DELEGATE
2636 * like adding and removing CATALOG or DELEGATE entries.
2638 * Returns the catalog parsed or NULL in case of error
2670 * Load the catalog and build the associated data structures.
2671 * This can be either an XML Catalog or an SGML Catalog
2672 * It will recurse in SGML CATALOG entries. On the other hand XML
2675 * Returns the catalog parsed or NULL in case of error
2724 * @catal: a catalog
2727 * Load the catalog and expand the existing catal structure.
2728 * This can be either an XML Catalog or an SGML Catalog
2772 * @catal: a Catalog
2775 * Try to lookup the catalog resource for a system ID
2807 * @catal: a Catalog
2810 * Try to lookup the catalog local reference associated to a public ID in that catalog
2842 * @catal: a Catalog
2889 * @catal: a Catalog
2925 * @catal: a Catalog
2928 * Dump the given catalog to the given file.
2946 * @catal: a Catalog
2947 * @type: the type of record to add to the catalog
2951 * Add an entry in the catalog, it may overwrite existing but
2986 * @catal: a Catalog
2989 * Remove an entry from the catalog
3013 * @sgml: should this create an SGML catalog
3015 * create a new Catalog.
3036 * @catal: should this create an SGML catalog
3038 * Check is a catalog is empty
3040 * Returns 1 if the catalog is empty, 0 if not, amd -1 in case of error.
3072 * Public interfaces manipulating the global shared default catalog *
3079 * Do the catalog initialization only of global data, doesn't try to load
3080 * any catalog actually.
3081 * this function is not thread safe, catalog initialization should
3098 * Do the catalog initialization.
3099 * this function is not thread safe, catalog initialization should
3137 strncpy(p, "\\..\\etc\\catalog", 255 - (p - buf));
3188 * Load the catalog and makes its definitions effective for the default
3189 * external entity loader. It will recurse in SGML CATALOG entries.
3190 * this function is not thread safe, catalog initialization should
3229 * this function is not thread safe, catalog initialization should
3301 * Try to lookup the catalog resource for a system ID
3321 * Try to lookup the catalog reference associated to a public ID
3383 * Dump all the global catalog content to the given file.
3399 * @type: the type of record to add to the catalog
3403 * Add an entry in the catalog, it may overwrite existing but
3405 * If called before any other catalog routine, allows to override the
3406 * default shared catalog put in place by xmlInitializeCatalog();
3419 * Specific case where one want to override the default catalog
3423 (xmlStrEqual(type, BAD_CAST "catalog"))) {
3442 * Remove an entry from the catalog
3462 * Convert all the SGML catalog entries as XML ones
3511 "Disabling catalog usage\n");
3535 * in XML Catalog resolution. C.f. section 4.1.1 of the spec
3551 "Setting catalog preference to PUBLIC\n");
3555 "Setting catalog preference to SYSTEM\n");
3569 * Used to set the debug level for catalog operation, 0 disable
3572 * Returns the previous value of the catalog debugging level
3595 * Free up the memory associated to the catalog list
3613 * @URL: the URL to a new local catalog
3615 * Add the new entry to the catalog list
3631 "Adding document catalog %s\n", URL);
3655 * document's private catalog list
3700 * document's private catalog list
3738 * Try to lookup the catalog reference associated to a system ID
3782 * Try to lookup the catalog reference associated to a public ID