Expand description
XML Catalog support (§26, §85 Phase 4).
OASIS XML Catalog resolution, catalog lookup order, precedence, catalog loading, SGML catalog compatibility.
Implements the OASIS XML Catalog specification (xCatalog) with compatibility for SGML (SOLEX) catalog format.
§UPSTREAM-PARITY
Matches libxml2’s catalog behavior:
- XML Catalog format (OASIS TR 9401:1999)
- SGML catalog format (SOLEX)
- Environment variables: XML_CATALOG_FILES, SGML_CATALOG_FILES
- Default catalog location: /etc/xml/catalog
- Catalog entry types: public, system, rewriteSystem, rewriteURI, delegatePublic, delegateSystem, delegateURI, nextCatalog, group
- Resolution order: public → system → URI
Structs§
- XmlCatalog
Handle - Candidate-internal per-handle catalog (
xmlCatalogPtr, opaque upstream).
Functions§
- dump_
doc ⚠ - Build the catalog document for dumping/saving: XML declaration, the
OASIS catalog DOCTYPE, and a
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">root with the current entries. - xmlA
Catalog ⚠Add - Add an entry to a catalog handle (upstream xmlACatalogAdd: type is “public”|“system”|“rewriteSystem”|“rewriteURI”|“delegatePublic”| “delegateSystem”|“delegateURI”|“nextCatalog”).
- xmlA
Catalog ⚠Dump - Dump a catalog handle to a FILE* (upstream xmlACatalogDump).
- xmlA
Catalog ⚠Remove - Remove entries whose value matches
valuefrom a catalog handle. - xmlA
Catalog ⚠Resolve - Resolve public then system against a handle (upstream xmlACatalogResolve).
- xmlA
Catalog ⚠Resolve Public - Resolve a public ID against a handle (upstream xmlACatalogResolvePublic).
- xmlA
Catalog ⚠Resolve System - Resolve a system ID against a handle (upstream xmlACatalogResolveSystem).
- xmlA
Catalog ⚠ResolveURI - Resolve a URI against a handle (upstream xmlACatalogResolveURI).
- xmlCatalog
AddLocal ⚠ - Per-document local catalog: an opaque pointer to a
Vec<CatalogEntry>.xmlCatalogAddLocalreturns a (possibly new) list; entries are resolved withxmlCatalogLocalResolve*; freed withxmlCatalogFreeLocal. - xmlCatalog
Dump ⚠Doc - Return the global catalog as a document (upstream xmlCatalogDumpDoc).
- xmlCatalog
Free ⚠Local - Free a local catalog list (upstream xmlCatalogFreeLocal).
- xmlCatalog
GetPublic ⚠ - xmlCatalog
GetSystem ⚠ - Deprecated global accessors (upstream xmlCatalogGetSystem/GetPublic return
the resolved value as
const xmlChar*). - xmlCatalog
IsEmpty ⚠ - Is the catalog handle empty? (upstream xmlCatalogIsEmpty)
- xmlCatalog
Local ⚠Resolve - Resolve pubID/sysID against a local catalog list.
- xmlCatalog
Local ⚠ResolveURI - Resolve a URI against a local catalog list.
- xmlCatalog
Resolve ⚠ - Global resolution: public ID first, then system ID (upstream xmlCatalogResolve).
- xmlCatalog
SetDebug ⚠ - Set the catalog debug level (upstream xmlCatalogSetDebug: returns the previous level; levels <= 0 reset to 0).
- xmlCatalog
SetDefault ⚠Prefer - Set the default prefer mode (upstream xmlCatalogSetDefaultPrefer: returns the old value; XML_CATA_PREFER_NONE is rejected).
- xmlConvertSGML
Catalog ⚠ - Convert an SGML catalog handle in place (upstream rewrites SGML entries to XML; the candidate parses both formats on load, so this is a no-op success).
- xmlFree
Catalog ⚠ - Free a catalog handle.
- xmlInitialize
Catalog ⚠ - Initialize the global catalog (upstream xmlInitializeCatalog).
- xmlLoadA
Catalog ⚠ - Load a catalog file into a new handle.
- xmlLoadSGML
Super ⚠Catalog - Load an SGML super-catalog into a new handle (upstream parses the super catalog’s CATALOG directives).
- xmlNew
Catalog ⚠ - Create a new (empty) catalog handle.
- xmlParse
Catalog ⚠File - Parse a catalog file into a document (upstream xmlParseCatalogFile).