Blame doc/html/libxml-catalog.html

Packit 423ecb
Packit 423ecb
Packit 423ecb
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
Packit 423ecb
TD {font-family: Verdana,Arial,Helvetica}
Packit 423ecb
BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
Packit 423ecb
H1 {font-family: Verdana,Arial,Helvetica}
Packit 423ecb
H2 {font-family: Verdana,Arial,Helvetica}
Packit 423ecb
H3 {font-family: Verdana,Arial,Helvetica}
Packit 423ecb
A:link, A:visited, A:active { text-decoration: underline }
Packit 423ecb
</style><style type="text/css">
Packit 423ecb
      div.deprecated pre.programlisting {border-style: double;border-color:red}
Packit 423ecb
      pre.programlisting {border-style: double;background: #EECFA1}
Packit 423ecb
    </style><title>Module catalog from libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000">
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

Module catalog from libxml2

<center>API Menu</center>
<form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form>
<center>API Indexes</center>
<center>Related links</center>

the catalog module implements the support for XML Catalogs and SGML catalogs

Table of Contents

#define XML_CATALOGS_NAMESPACE
#define XML_CATALOG_PI
Structure xmlCatalog
struct _xmlCatalog
Packit 423ecb
The content of this structure is not made public by the API.
Packit 423ecb
Enum xmlCatalogAllow
Packit 423ecb
Enum xmlCatalogPrefer
Packit 423ecb
Typedef xmlCatalog * xmlCatalogPtr
Packit 423ecb
int	xmlACatalogAdd			(xmlCatalogPtr catal, 
const xmlChar * type,
const xmlChar * orig,
const xmlChar * replace)
Packit 423ecb
void	xmlACatalogDump			(xmlCatalogPtr catal, 
FILE * out)
Packit 423ecb
int	xmlACatalogRemove		(xmlCatalogPtr catal, 
const xmlChar * value)
Packit 423ecb
xmlChar *	xmlACatalogResolve	(xmlCatalogPtr catal, 
const xmlChar * pubID,
const xmlChar * sysID)
Packit 423ecb
xmlChar *	xmlACatalogResolvePublic	(xmlCatalogPtr catal, 
const xmlChar * pubID)
Packit 423ecb
xmlChar *	xmlACatalogResolveSystem	(xmlCatalogPtr catal, 
const xmlChar * sysID)
Packit 423ecb
xmlChar *	xmlACatalogResolveURI	(xmlCatalogPtr catal, 
const xmlChar * URI)
Packit 423ecb
int	xmlCatalogAdd			(const xmlChar * type, 
const xmlChar * orig,
const xmlChar * replace)
Packit 423ecb
void *	xmlCatalogAddLocal		(void * catalogs, 
const xmlChar * URL)
Packit 423ecb
void	xmlCatalogCleanup		(void)
Packit 423ecb
int	xmlCatalogConvert		(void)
Packit 423ecb
void	xmlCatalogDump			(FILE * out)
Packit 423ecb
void	xmlCatalogFreeLocal		(void * catalogs)
Packit 423ecb
xmlCatalogAllow	xmlCatalogGetDefaults	(void)
Packit 423ecb
const xmlChar *	xmlCatalogGetPublic	(const xmlChar * pubID)
Packit 423ecb
const xmlChar *	xmlCatalogGetSystem	(const xmlChar * sysID)
Packit 423ecb
int	xmlCatalogIsEmpty		(xmlCatalogPtr catal)
Packit 423ecb
xmlChar *	xmlCatalogLocalResolve	(void * catalogs, 
const xmlChar * pubID,
const xmlChar * sysID)
Packit 423ecb
xmlChar *	xmlCatalogLocalResolveURI	(void * catalogs, 
const xmlChar * URI)
Packit 423ecb
int	xmlCatalogRemove		(const xmlChar * value)
Packit 423ecb
xmlChar *	xmlCatalogResolve	(const xmlChar * pubID, 
const xmlChar * sysID)
Packit 423ecb
xmlChar *	xmlCatalogResolvePublic	(const xmlChar * pubID)
Packit 423ecb
xmlChar *	xmlCatalogResolveSystem	(const xmlChar * sysID)
Packit 423ecb
xmlChar *	xmlCatalogResolveURI	(const xmlChar * URI)
Packit 423ecb
int	xmlCatalogSetDebug		(int level)
Packit 423ecb
xmlCatalogPrefer	xmlCatalogSetDefaultPrefer	(xmlCatalogPrefer prefer)
Packit 423ecb
void	xmlCatalogSetDefaults		(xmlCatalogAllow allow)
Packit 423ecb
int	xmlConvertSGMLCatalog		(xmlCatalogPtr catal)
Packit 423ecb
void	xmlFreeCatalog			(xmlCatalogPtr catal)
Packit 423ecb
void	xmlInitializeCatalog		(void)
Packit 423ecb
xmlCatalogPtr	xmlLoadACatalog		(const char * filename)
Packit 423ecb
int	xmlLoadCatalog			(const char * filename)
Packit 423ecb
void	xmlLoadCatalogs			(const char * pathss)
Packit 423ecb
xmlCatalogPtr	xmlLoadSGMLSuperCatalog	(const char * filename)
Packit 423ecb
xmlCatalogPtr	xmlNewCatalog		(int sgml)
Packit 423ecb
xmlDocPtr	xmlParseCatalogFile	(const char * filename)
Packit 423ecb

Description

Packit 423ecb

Macro: XML_CATALOGS_NAMESPACE

#define XML_CATALOGS_NAMESPACE

The namespace for the XML Catalogs elements.

Packit 423ecb

Macro: XML_CATALOG_PI

#define XML_CATALOG_PI

The specific XML Catalog Processing Instuction name.

Packit 423ecb

Structure xmlCatalog

Structure xmlCatalog
struct _xmlCatalog {
Packit 423ecb
The content of this structure is not made public by the API.
Packit 423ecb
}

Enum xmlCatalogAllow

Enum xmlCatalogAllow {
Packit 423ecb
    XML_CATA_ALLOW_NONE = 0
Packit 423ecb
    XML_CATA_ALLOW_GLOBAL = 1
Packit 423ecb
    XML_CATA_ALLOW_DOCUMENT = 2
Packit 423ecb
    XML_CATA_ALLOW_ALL = 3
Packit 423ecb
}
Packit 423ecb

Enum xmlCatalogPrefer

Enum xmlCatalogPrefer {
Packit 423ecb
    XML_CATA_PREFER_NONE = 0
Packit 423ecb
    XML_CATA_PREFER_PUBLIC = 1
Packit 423ecb
    XML_CATA_PREFER_SYSTEM = 2
Packit 423ecb
}
Packit 423ecb

Function: xmlACatalogAdd

int	xmlACatalogAdd			(xmlCatalogPtr catal, 
const xmlChar * type,
const xmlChar * orig,
const xmlChar * replace)
Packit 423ecb

Add an entry in the catalog, it may overwrite existing but different entries.

Packit 423ecb
<tt>catal</tt>:a Catalog
<tt>type</tt>:the type of record to add to the catalog
<tt>orig</tt>:the system, public or prefix to match
<tt>replace</tt>:the replacement value for the match
<tt>Returns</tt>:0 if successful, -1 otherwise

Function: xmlACatalogDump

void	xmlACatalogDump			(xmlCatalogPtr catal, 
FILE * out)
Packit 423ecb

Dump the given catalog to the given file.

Packit 423ecb
<tt>catal</tt>:a Catalog
<tt>out</tt>:the file.

Function: xmlACatalogRemove

int	xmlACatalogRemove		(xmlCatalogPtr catal, 
const xmlChar * value)
Packit 423ecb

Remove an entry from the catalog

Packit 423ecb
<tt>catal</tt>:a Catalog
<tt>value</tt>:the value to remove
<tt>Returns</tt>:the number of entries removed if successful, -1 otherwise

Function: xmlACatalogResolve

xmlChar *	xmlACatalogResolve	(xmlCatalogPtr catal, 
const xmlChar * pubID,
const xmlChar * sysID)
Packit 423ecb

Do a complete resolution lookup of an External Identifier

Packit 423ecb
<tt>catal</tt>:a Catalog
<tt>pubID</tt>:the public ID string
<tt>sysID</tt>:the system ID string
<tt>Returns</tt>:the URI of the resource or NULL if not found, it must be freed by the caller.

Function: xmlACatalogResolvePublic

xmlChar *	xmlACatalogResolvePublic	(xmlCatalogPtr catal, 
const xmlChar * pubID)
Packit 423ecb

Try to lookup the catalog local reference associated to a public ID in that catalog

Packit 423ecb
<tt>catal</tt>:a Catalog
<tt>pubID</tt>:the public ID string
<tt>Returns</tt>:the local resource if found or NULL otherwise, the value returned must be freed by the caller.

Function: xmlACatalogResolveSystem

xmlChar *	xmlACatalogResolveSystem	(xmlCatalogPtr catal, 
const xmlChar * sysID)
Packit 423ecb

Try to lookup the catalog resource for a system ID

Packit 423ecb
<tt>catal</tt>:a Catalog
<tt>sysID</tt>:the system ID string
<tt>Returns</tt>:the resource if found or NULL otherwise, the value returned must be freed by the caller.

Function: xmlACatalogResolveURI

xmlChar *	xmlACatalogResolveURI	(xmlCatalogPtr catal, 
const xmlChar * URI)
Packit 423ecb

Do a complete resolution lookup of an URI

Packit 423ecb
<tt>catal</tt>:a Catalog
<tt>URI</tt>:the URI
<tt>Returns</tt>:the URI of the resource or NULL if not found, it must be freed by the caller.

Function: xmlCatalogAdd

int	xmlCatalogAdd			(const xmlChar * type, 
const xmlChar * orig,
const xmlChar * replace)
Packit 423ecb

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();

Packit 423ecb
<tt>type</tt>:the type of record to add to the catalog
<tt>orig</tt>:the system, public or prefix to match
<tt>replace</tt>:the replacement value for the match
<tt>Returns</tt>:0 if successful, -1 otherwise

Function: xmlCatalogAddLocal

void *	xmlCatalogAddLocal		(void * catalogs, 
const xmlChar * URL)
Packit 423ecb

Add the new entry to the catalog list

Packit 423ecb
<tt>catalogs</tt>:a document's list of catalogs
<tt>URL</tt>:the URL to a new local catalog
<tt>Returns</tt>:the updated list

Function: xmlCatalogCleanup

void	xmlCatalogCleanup		(void)
Packit 423ecb

Free up all the memory associated with catalogs

Packit 423ecb

Function: xmlCatalogConvert

int	xmlCatalogConvert		(void)
Packit 423ecb

Convert all the SGML catalog entries as XML ones

Packit 423ecb
<tt>Returns</tt>:the number of entries converted if successful, -1 otherwise

Function: xmlCatalogDump

void	xmlCatalogDump			(FILE * out)
Packit 423ecb

Dump all the global catalog content to the given file.

Packit 423ecb
<tt>out</tt>:the file.

Function: xmlCatalogFreeLocal

void	xmlCatalogFreeLocal		(void * catalogs)
Packit 423ecb

Free up the memory associated to the catalog list

Packit 423ecb
<tt>catalogs</tt>:a document's list of catalogs

Function: xmlCatalogGetDefaults

xmlCatalogAllow	xmlCatalogGetDefaults	(void)
Packit 423ecb

Used to get the user preference w.r.t. to what catalogs should be accepted

Packit 423ecb
<tt>Returns</tt>:the current xmlCatalogAllow value

Function: xmlCatalogGetPublic

const xmlChar *	xmlCatalogGetPublic	(const xmlChar * pubID)
Packit 423ecb

Try to lookup the catalog reference associated to a public ID DEPRECATED, use xmlCatalogResolvePublic()

Packit 423ecb
<tt>pubID</tt>:the public ID string
<tt>Returns</tt>:the resource if found or NULL otherwise.

Function: xmlCatalogGetSystem

const xmlChar *	xmlCatalogGetSystem	(const xmlChar * sysID)
Packit 423ecb

Try to lookup the catalog reference associated to a system ID DEPRECATED, use xmlCatalogResolveSystem()

Packit 423ecb
<tt>sysID</tt>:the system ID string
<tt>Returns</tt>:the resource if found or NULL otherwise.

Function: xmlCatalogIsEmpty

int	xmlCatalogIsEmpty		(xmlCatalogPtr catal)
Packit 423ecb

Check is a catalog is empty

Packit 423ecb
<tt>catal</tt>:should this create an SGML catalog
<tt>Returns</tt>:1 if the catalog is empty, 0 if not, amd -1 in case of error.

Function: xmlCatalogLocalResolve

xmlChar *	xmlCatalogLocalResolve	(void * catalogs, 
const xmlChar * pubID,
const xmlChar * sysID)
Packit 423ecb

Do a complete resolution lookup of an External Identifier using a document's private catalog list

Packit 423ecb
<tt>catalogs</tt>:a document's list of catalogs
<tt>pubID</tt>:the public ID string
<tt>sysID</tt>:the system ID string
<tt>Returns</tt>:the URI of the resource or NULL if not found, it must be freed by the caller.

Function: xmlCatalogLocalResolveURI

xmlChar *	xmlCatalogLocalResolveURI	(void * catalogs, 
const xmlChar * URI)
Packit 423ecb

Do a complete resolution lookup of an URI using a document's private catalog list

Packit 423ecb
<tt>catalogs</tt>:a document's list of catalogs
<tt>URI</tt>:the URI
<tt>Returns</tt>:the URI of the resource or NULL if not found, it must be freed by the caller.

Function: xmlCatalogRemove

int	xmlCatalogRemove		(const xmlChar * value)
Packit 423ecb

Remove an entry from the catalog

Packit 423ecb
<tt>value</tt>:the value to remove
<tt>Returns</tt>:the number of entries removed if successful, -1 otherwise

Function: xmlCatalogResolve

xmlChar *	xmlCatalogResolve	(const xmlChar * pubID, 
const xmlChar * sysID)
Packit 423ecb

Do a complete resolution lookup of an External Identifier

Packit 423ecb
<tt>pubID</tt>:the public ID string
<tt>sysID</tt>:the system ID string
<tt>Returns</tt>:the URI of the resource or NULL if not found, it must be freed by the caller.

Function: xmlCatalogResolvePublic

xmlChar *	xmlCatalogResolvePublic	(const xmlChar * pubID)
Packit 423ecb

Try to lookup the catalog reference associated to a public ID

Packit 423ecb
<tt>pubID</tt>:the public ID string
<tt>Returns</tt>:the resource if found or NULL otherwise, the value returned must be freed by the caller.

Function: xmlCatalogResolveSystem

xmlChar *	xmlCatalogResolveSystem	(const xmlChar * sysID)
Packit 423ecb

Try to lookup the catalog resource for a system ID

Packit 423ecb
<tt>sysID</tt>:the system ID string
<tt>Returns</tt>:the resource if found or NULL otherwise, the value returned must be freed by the caller.

Function: xmlCatalogResolveURI

xmlChar *	xmlCatalogResolveURI	(const xmlChar * URI)
Packit 423ecb

Do a complete resolution lookup of an URI

Packit 423ecb
<tt>URI</tt>:the URI
<tt>Returns</tt>:the URI of the resource or NULL if not found, it must be freed by the caller.

Function: xmlCatalogSetDebug

int	xmlCatalogSetDebug		(int level)
Packit 423ecb

Used to set the debug level for catalog operation, 0 disable debugging, 1 enable it

Packit 423ecb
<tt>level</tt>:the debug level of catalogs required
<tt>Returns</tt>:the previous value of the catalog debugging level

Function: xmlCatalogSetDefaultPrefer

xmlCatalogPrefer	xmlCatalogSetDefaultPrefer	(xmlCatalogPrefer prefer)
Packit 423ecb

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

Packit 423ecb
<tt>prefer</tt>:the default preference for delegation
<tt>Returns</tt>:the previous value of the default preference for delegation

Function: xmlCatalogSetDefaults

void	xmlCatalogSetDefaults		(xmlCatalogAllow allow)
Packit 423ecb

Used to set the user preference w.r.t. to what catalogs should be accepted

Packit 423ecb
<tt>allow</tt>:what catalogs should be accepted

Function: xmlConvertSGMLCatalog

int	xmlConvertSGMLCatalog		(xmlCatalogPtr catal)
Packit 423ecb

Convert all the SGML catalog entries as XML ones

Packit 423ecb
<tt>catal</tt>:the catalog
<tt>Returns</tt>:the number of entries converted if successful, -1 otherwise

Function: xmlFreeCatalog

void	xmlFreeCatalog			(xmlCatalogPtr catal)
Packit 423ecb

Free the memory allocated to a Catalog

Packit 423ecb
<tt>catal</tt>:a Catalog

Function: xmlInitializeCatalog

void	xmlInitializeCatalog		(void)
Packit 423ecb

Do the catalog initialization. this function is not thread safe, catalog initialization should preferably be done once at startup

Packit 423ecb

Function: xmlLoadACatalog

xmlCatalogPtr	xmlLoadACatalog		(const char * filename)
Packit 423ecb

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.

Packit 423ecb
<tt>filename</tt>:a file path
<tt>Returns</tt>:the catalog parsed or NULL in case of error

Function: xmlLoadCatalog

int	xmlLoadCatalog			(const char * filename)
Packit 423ecb

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

Packit 423ecb
<tt>filename</tt>:a file path
<tt>Returns</tt>:0 in case of success -1 in case of error

Function: xmlLoadCatalogs

void	xmlLoadCatalogs			(const char * pathss)
Packit 423ecb

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

Packit 423ecb
<tt>pathss</tt>:a list of directories separated by a colon or a space.

Function: xmlLoadSGMLSuperCatalog

xmlCatalogPtr	xmlLoadSGMLSuperCatalog	(const char * filename)
Packit 423ecb

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.

Packit 423ecb
<tt>filename</tt>:a file path
<tt>Returns</tt>:the catalog parsed or NULL in case of error

Function: xmlNewCatalog

xmlCatalogPtr	xmlNewCatalog		(int sgml)
Packit 423ecb

create a new Catalog.

Packit 423ecb
<tt>sgml</tt>:should this create an SGML catalog
<tt>Returns</tt>:the xmlCatalogPtr or NULL in case of error

Function: xmlParseCatalogFile

xmlDocPtr	xmlParseCatalogFile	(const char * filename)
Packit 423ecb

parse an XML file and build a tree. It's like xmlParseFile() except it bypass all catalog lookups.

Packit 423ecb
<tt>filename</tt>:the filename
<tt>Returns</tt>:the resulting document tree or NULL in case of error

Daniel Veillard

</body></html>