PhoenixmlDb.XQuery
IResourceResolver
Custom resource resolver for plugging in external storage backends (S3, database, HTTP, etc.). Return null from any method to fall through to the default resolver.
#IResourceResolver
Namespace: PhoenixmlDb.XQuery.Security
Custom resource resolver for plugging in external storage backends (S3, database, HTTP, etc.). Return null from any method to fall through to the default resolver.
#Properties
| Name | Description |
|---|---|
SuppliesAllContent
|
When true, this resolver is the ONLY source of resources: a load it does not supply fails, and the engine never falls back to opening a file or URL itself. That covers IResourceResolver.ResolveContent and the older members alike (IResourceResolver.ResolveDocument, IResourceResolver.ResolveText, IResourceResolver.ResolveStylesheetModule). The default, false, keeps the fall-through those members have always had.
|
#Methods
#IsAvailable(PhoenixmlDb.XQuery.Security.ResourceRequest)
Answers whether a resource is available (
fn:doc-available
,
fn:unparsed-text-available
), given the whole request: the location, why it is wanted, and the module that asks. Return null, the default, to have
or
asked instead; those are given the location alone.
#ResolveContent(PhoenixmlDb.XQuery.Security.ResourceRequest)
Supplies the content of a resource the engine is about to load, so the engine opens nothing itself: an XQuery library module, a schema document (including those another schema includes, imports or redefines), a JSON or text resource, a DTD or external entity, a stylesheet or source document named to fn:transform. Return null when this resolver does not supply the resource; what happens then is decided by
.
Without this, the engine authorises a location against the policy and then opens it by name. Those are two steps, and a file replaced between them (a regular file swapped for a link out of the allowed root) is read. A host that hands over the content it has itself verified has no such window. Content supplied here is the host's own decision and is not checked against the policy's URI rules.