PhoenixmlDb.XQuery

ResourceGate

The one check every function that dereferences a URI or path makes before opening it.

#ResourceGate

Namespace: PhoenixmlDb.XQuery.Security

The one check every function that dereferences a URI or path makes before opening it.

#Methods

#Authorize(PhoenixmlDb.XQuery.Ast.ExecutionContext,String,PhoenixmlDb.XQuery.Security.ResourceAccessKind,String)

Authorises

under the context's resource policy and returns the URI to open (absolute; a

file:

path canonicalised). Returns null when no policy is configured, in which case the caller proceeds as it always has. A denial is raised as

, the error the function reports for an unretrievable resource.

#Caller(PhoenixmlDb.XQuery.Ast.ExecutionContext)

Who is asking, for a call made by the code running in

.

#Caller(String,String)

#HostContent(PhoenixmlDb.XQuery.Ast.ExecutionContext,String,PhoenixmlDb.XQuery.Security.ResourceAccessKind,String)

for a function running in a query, with a refusal reported as

.

#HostContent(PhoenixmlDb.XQuery.Security.ResourcePolicy,String,PhoenixmlDb.XQuery.Security.ResourceCaller,PhoenixmlDb.XQuery.Security.ResourceAccessKind)

for a call a module makes.

#HostContent(PhoenixmlDb.XQuery.Security.ResourcePolicy,String,Uri,PhoenixmlDb.XQuery.Security.ResourceAccessKind)

The content of a resource as the host's resolver supplies it, or null when there is no resolver or it leaves this resource to the engine. When the resolver is the only source (

) and does not supply it, the load is refused here: the caller must not go on to open anything.

#IsDocumentAvailable(PhoenixmlDb.XQuery.IDocumentResolver,String,PhoenixmlDb.XQuery.Security.ResourceCaller)

Document availability for a call a module makes; see

.

#ResolveDocument(PhoenixmlDb.XQuery.IDocumentResolver,String,PhoenixmlDb.XQuery.Security.ResourceCaller)

Resolves a document for a call a module makes. Under a policy the host's resolver is told who asks; any other resolver is asked as it always was.

A relative name reaches here only when there is no base URI to resolve it against. The engine's own store then serves only a document the host loaded under that name; it read the file of that name in the process's working directory. A host's own resolver is still asked, as it always was.

#Resolver(PhoenixmlDb.XQuery.Ast.ExecutionContext)

The per-query enforcing resolver, which also keeps the load budgets.