|
libxml2
|
interfaces to the Catalog handling system More...
Macros | |
| #define | XML_CATALOGS_NAMESPACE (const xmlChar *) "urn:oasis:names:tc:entity:xmlns:xml:catalog" |
| The namespace for the XML Catalogs elements. | |
| #define | XML_CATALOG_PI (const xmlChar *) "oasis-xml-catalog" |
| The specific XML Catalog Processing Instruction name. | |
Typedefs | |
| typedef struct _xmlCatalog | xmlCatalog |
| XML catalog. | |
Functions | |
| xmlCatalog * | xmlNewCatalog (int sgml) |
| create a new Catalog. | |
| xmlCatalog * | xmlLoadACatalog (const char *filename) |
| Load the catalog and build the associated data structures. | |
| xmlCatalog * | xmlLoadSGMLSuperCatalog (const char *filename) |
| Load an SGML super catalog. | |
| int | xmlConvertSGMLCatalog (xmlCatalog *catal) |
| Convert all the SGML catalog entries as XML ones. | |
| int | xmlACatalogAdd (xmlCatalog *catal, const xmlChar *type, const xmlChar *orig, const xmlChar *replace) |
| Add an entry in the catalog, it may overwrite existing but different entries. | |
| int | xmlACatalogRemove (xmlCatalog *catal, const xmlChar *value) |
| Remove an entry from the catalog. | |
| xmlChar * | xmlACatalogResolve (xmlCatalog *catal, const xmlChar *pubID, const xmlChar *sysID) |
| Do a complete resolution lookup of an External Identifier. | |
| xmlChar * | xmlACatalogResolveSystem (xmlCatalog *catal, const xmlChar *sysID) |
| Try to lookup the catalog resource for a system ID. | |
| xmlChar * | xmlACatalogResolvePublic (xmlCatalog *catal, const xmlChar *pubID) |
| Try to lookup the catalog local reference associated to a public ID in that catalog. | |
| xmlChar * | xmlACatalogResolveURI (xmlCatalog *catal, const xmlChar *URI) |
| Do a complete resolution lookup of an URI. | |
| void | xmlACatalogDump (xmlCatalog *catal, FILE *out) |
| Dump the given catalog to the given file. | |
| void | xmlFreeCatalog (xmlCatalog *catal) |
| Free the memory allocated to a Catalog. | |
| int | xmlCatalogIsEmpty (xmlCatalog *catal) |
| Check is a catalog is empty. | |
| void | xmlInitializeCatalog (void) |
| Load the default system catalog. | |
| int | xmlLoadCatalog (const char *filename) |
| Load the catalog and makes its definitions effective for the default external entity loader. | |
| void | xmlLoadCatalogs (const char *paths) |
| Load the catalogs and makes their definitions effective for the default external entity loader. | |
| void | xmlCatalogCleanup (void) |
| Free up all the memory associated with catalogs. | |
| void | xmlCatalogDump (FILE *out) |
| Dump all the global catalog content to the given file. | |
| xmlChar * | xmlCatalogResolve (const xmlChar *pubID, const xmlChar *sysID) |
| Do a complete resolution lookup of an External Identifier. | |
| xmlChar * | xmlCatalogResolveSystem (const xmlChar *sysID) |
| Try to lookup the catalog resource for a system ID. | |
| xmlChar * | xmlCatalogResolvePublic (const xmlChar *pubID) |
| Try to lookup the catalog reference associated to a public ID. | |
| xmlChar * | xmlCatalogResolveURI (const xmlChar *URI) |
| Do a complete resolution lookup of an URI. | |
| int | xmlCatalogAdd (const xmlChar *type, const xmlChar *orig, const xmlChar *replace) |
| Add an entry in the catalog, it may overwrite existing but different entries. | |
| int | xmlCatalogRemove (const xmlChar *value) |
| Remove an entry from the catalog. | |
| xmlDoc * | xmlParseCatalogFile (const char *filename) |
| parse an XML file and build a tree. | |
| int | xmlCatalogConvert (void) |
| Convert all the SGML catalog entries as XML ones. | |
| void | xmlCatalogFreeLocal (void *catalogs) |
| Free up the memory associated to the catalog list. | |
| void * | xmlCatalogAddLocal (void *catalogs, const xmlChar *URL) |
| Add the new entry to the catalog list. | |
| xmlChar * | xmlCatalogLocalResolve (void *catalogs, const xmlChar *pubID, const xmlChar *sysID) |
| Do a complete resolution lookup of an External Identifier using a document's private catalog list. | |
| xmlChar * | xmlCatalogLocalResolveURI (void *catalogs, const xmlChar *URI) |
| Do a complete resolution lookup of an URI using a document's private catalog list. | |
| int | xmlCatalogSetDebug (int level) |
| Used to set the debug level for catalog operation, 0 disable debugging, 1 enable it. | |
| xmlCatalogPrefer | xmlCatalogSetDefaultPrefer (xmlCatalogPrefer prefer) |
| Allows to set the preference between public and system for deletion in XML Catalog resolution. | |
| void | xmlCatalogSetDefaults (xmlCatalogAllow allow) |
| Used to set the user preference w.r.t. | |
| xmlCatalogAllow | xmlCatalogGetDefaults (void) |
| Used to get the user preference w.r.t. | |
| const xmlChar * | xmlCatalogGetSystem (const xmlChar *sysID) |
| Try to lookup the catalog reference associated to a system ID. | |
| const xmlChar * | xmlCatalogGetPublic (const xmlChar *pubID) |
| Try to lookup the catalog reference associated to a public ID. | |
interfaces to the Catalog handling system
the catalog module implements the support for XML Catalogs and SGML catalogs
SGML Open Technical Resolution TR9401:1997. http://www.jclark.com/sp/catalog.htm
XML Catalogs Working Draft 06 August 2001 http://www.oasis-open.org/committees/entity/spec-2001-08-06.html
| int xmlACatalogAdd | ( | xmlCatalog * | catal, |
| const xmlChar * | type, | ||
| const xmlChar * | orig, | ||
| const xmlChar * | replace ) |
Add an entry in the catalog, it may overwrite existing but different entries.
| catal | a Catalog |
| type | the type of record to add to the catalog |
| orig | the system, public or prefix to match |
| replace | the replacement value for the match |
| void xmlACatalogDump | ( | xmlCatalog * | catal, |
| FILE * | out ) |
Dump the given catalog to the given file.
| catal | a Catalog |
| out | the file. |
| int xmlACatalogRemove | ( | xmlCatalog * | catal, |
| const xmlChar * | value ) |
Remove an entry from the catalog.
| catal | a Catalog |
| value | the value to remove |
| xmlChar * xmlACatalogResolve | ( | xmlCatalog * | catal, |
| const xmlChar * | pubID, | ||
| const xmlChar * | sysID ) |
Do a complete resolution lookup of an External Identifier.
| catal | a Catalog |
| pubID | the public ID string |
| sysID | the system ID string |
| xmlChar * xmlACatalogResolvePublic | ( | xmlCatalog * | catal, |
| const xmlChar * | pubID ) |
Try to lookup the catalog local reference associated to a public ID in that catalog.
| catal | a Catalog |
| pubID | the public ID string |
| xmlChar * xmlACatalogResolveSystem | ( | xmlCatalog * | catal, |
| const xmlChar * | sysID ) |
Try to lookup the catalog resource for a system ID.
| catal | a Catalog |
| sysID | the system ID string |
| xmlChar * xmlACatalogResolveURI | ( | xmlCatalog * | catal, |
| const xmlChar * | URI ) |
Do a complete resolution lookup of an URI.
| catal | a Catalog |
| URI | the URI |
Add an entry in the catalog, it may overwrite existing but different entries.
If called before any other catalog routine, allows to override the default shared catalog put in place by xmlInitializeCatalog;
| type | the type of record to add to the catalog |
| orig | the system, public or prefix to match |
| replace | the replacement value for the match |
| void * xmlCatalogAddLocal | ( | void * | catalogs, |
| const xmlChar * | URL ) |
Add the new entry to the catalog list.
| catalogs | a document's list of catalogs |
| URL | the URL to a new local catalog |
| int xmlCatalogConvert | ( | void | ) |
Convert all the SGML catalog entries as XML ones.
| void xmlCatalogDump | ( | FILE * | out | ) |
Dump all the global catalog content to the given file.
| out | the file. |
| void xmlCatalogFreeLocal | ( | void * | catalogs | ) |
Free up the memory associated to the catalog list.
| catalogs | a document's list of catalogs |
| xmlCatalogAllow xmlCatalogGetDefaults | ( | void | ) |
Used to get the user preference w.r.t.
to what catalogs should be accepted
Try to lookup the catalog reference associated to a public ID.
| pubID | the public ID string |
Try to lookup the catalog reference associated to a system ID.
| sysID | the system ID string |
| int xmlCatalogIsEmpty | ( | xmlCatalog * | catal | ) |
Check is a catalog is empty.
| catal | should this create an SGML catalog |
Do a complete resolution lookup of an External Identifier using a document's private catalog list.
| catalogs | a document's list of catalogs |
| pubID | the public ID string |
| sysID | the system ID string |
Do a complete resolution lookup of an URI using a document's private catalog list.
| catalogs | a document's list of catalogs |
| URI | the URI |
| int xmlCatalogRemove | ( | const xmlChar * | value | ) |
Remove an entry from the catalog.
| value | the value to remove |
Do a complete resolution lookup of an External Identifier.
| pubID | the public ID string |
| sysID | the system ID string |
Try to lookup the catalog reference associated to a public ID.
| pubID | the public ID string |
Try to lookup the catalog resource for a system ID.
| sysID | the system ID string |
Do a complete resolution lookup of an URI.
| URI | the URI |
| int xmlCatalogSetDebug | ( | int | level | ) |
Used to set the debug level for catalog operation, 0 disable debugging, 1 enable it.
| level | the debug level of catalogs required |
| xmlCatalogPrefer xmlCatalogSetDefaultPrefer | ( | xmlCatalogPrefer | prefer | ) |
Allows to set the preference between public and system for deletion in XML Catalog resolution.
C.f. section 4.1.1 of the spec Values accepted are XML_CATA_PREFER_PUBLIC or XML_CATA_PREFER_SYSTEM
| prefer | the default preference for delegation |
| void xmlCatalogSetDefaults | ( | xmlCatalogAllow | allow | ) |
Used to set the user preference w.r.t.
to what catalogs should be accepted
| allow | what catalogs should be accepted |
| int xmlConvertSGMLCatalog | ( | xmlCatalog * | catal | ) |
Convert all the SGML catalog entries as XML ones.
| catal | the catalog |
| void xmlFreeCatalog | ( | xmlCatalog * | catal | ) |
Free the memory allocated to a Catalog.
| catal | a Catalog |
| xmlCatalog * xmlLoadACatalog | ( | const char * | filename | ) |
Load the catalog and build the associated data structures.
This can be either an XML Catalog or an SGML Catalog It will recurse in SGML CATALOG entries. On the other hand XML Catalogs are not handled recursively.
| filename | a file path |
| int xmlLoadCatalog | ( | const char * | filename | ) |
Load the catalog and makes its definitions effective for the default external entity loader.
It will recurse in SGML CATALOG entries. this function is not thread safe, catalog initialization should preferably be done once at startup
| filename | a file path |
| void xmlLoadCatalogs | ( | const char * | pathss | ) |
Load the catalogs and makes their definitions effective for the default external entity loader.
this function is not thread safe, catalog initialization should preferably be done once at startup
| pathss | a list of directories separated by a colon or a space. |
| xmlCatalog * xmlLoadSGMLSuperCatalog | ( | const char * | filename | ) |
Load an SGML super catalog.
It won't expand CATALOG or DELEGATE references. This is only needed for manipulating SGML Super Catalogs like adding and removing CATALOG or DELEGATE entries.
| filename | a file path |
| xmlCatalog * xmlNewCatalog | ( | int | sgml | ) |
create a new Catalog.
| sgml | should this create an SGML catalog |
| xmlDoc * xmlParseCatalogFile | ( | const char * | filename | ) |
parse an XML file and build a tree.
It's like xmlParseFile except it bypass all catalog lookups.
| filename | the filename |