ddn.data.xml.catalog
OASIS XML Catalog support.
This module provides in-library support for resolving external identifiers (system/public IDs) and URIs using OASIS XML Catalog files.
Supported entry types:
systempublicrewriteSystemrewriteURIdelegatePublicdelegateSystemdelegateURInextCatalog
Notes:
- The legacy
resolveSystem/resolvePublicAPIs perform exact-map only lookups for
backward compatibility.
- The
resolve*FullAPIs implement rewrite/delegation/nextCatalog processing.
struct XmlCatalog
Types 1
structXmlCatalog
An in-memory XML Catalog.
Fields
string basePathCatalog file path (used for resolving relative catalog references).string[string] systemMapping from system identifiers to URIs.string[string] public_Mapping from public identifiers to URIs.RewriteRule[] rewriteSystemRewriteRule[] rewriteUriDelegateRule[] delegatePublicDelegateRule[] delegateSystemDelegateRule[] delegateUristring[] nextCatalogMethods
string resolveSystemFull(string systemId, size_t maxDepth = 16) const @safeResolves a system identifier using rewrite/delegation/nextCatalog rules.string resolvePublicFull(string publicId, size_t maxDepth = 16) const @safeResolves a public identifier using delegation/nextCatalog rules.string resolveUriFull(string uri, size_t maxDepth = 16) const @safeResolves a URI using rewrite/delegation/nextCatalog rules.string resolveSystemFullDepth(string systemId, size_t maxDepth, size_t depth, ref XmlCatalogCache cache) const @safestring resolvePublicFullDepth(string publicId, size_t maxDepth, size_t depth, ref XmlCatalogCache cache) const @safestring resolveUriFullDepth(string uri, size_t maxDepth, size_t depth, ref XmlCatalogCache cache) const @safestring applyDelegateSystem(string systemId, size_t maxDepth, size_t depth, ref XmlCatalogCache cache) const @safestring applyDelegatePublic(string publicId, size_t maxDepth, size_t depth, ref XmlCatalogCache cache) const @safestring applyDelegateUri(string uri, size_t maxDepth, size_t depth, ref XmlCatalogCache cache) const @safestring applyNextCatalogSystem(string systemId, size_t maxDepth, size_t depth, ref XmlCatalogCache cache) const @safestring applyNextCatalogPublic(string publicId, size_t maxDepth, size_t depth, ref XmlCatalogCache cache) const @safestring applyNextCatalogUri(string uri, size_t maxDepth, size_t depth, ref XmlCatalogCache cache) const @safestring normalizePublicId(string publicId) @safeNested Templates
RewriteRuleA rewrite rule (`rewriteSystem`/`rewriteURI`).DelegateRuleA delegation rule (`delegate*`).XmlCatalogCacheFunctions 8
private fn
void parseEntries(
ref XmlCatalog cat,
string xml,
string tag,
string keyAttr,
string valueAttr) @safeprivate fn
void parseRewriteEntries(
ref XmlCatalog cat,
string xml,
string tag,
string startAttr,
string prefixAttr) @safeprivate fn
void parseDelegateEntries(
ref XmlCatalog cat,
string xml,
string tag,
string startAttr,
string catalogAttr) @safe