PhoenixmlDb.Core
XIncludeOptions
Configures XInclude 1.0 (xi:include) processing.
#XIncludeOptions
Namespace: PhoenixmlDb.Core.Xml
Configures XInclude 1.0 (xi:include) processing.
#Properties
| Name | Description |
|---|---|
AllowRemote
|
Whether remote (non-local-file) resources may be included. Defaults to — only local file resources are resolved unless explicitly enabled. Applies when is and the default is used; a custom is responsible for enforcing its own remote-access policy. |
Enabled
|
Whether XInclude processing is performed at all. Defaults to (opt-in). |
MaxExpandedNodes
|
Maximum total number of nodes produced by expansion (size-safety bound). Guards against exponential (billion-laughs-style) blow-up. Default 10,000,000; <= 0 = unlimited. |
MaxExpansionDepth
|
Maximum tree-descent recursion depth during expansion (stack-safety bound, distinct from which bounds nested includes). Guards against StackOverflow from deeply nested content, fallback chains, or same-document recursion. Default 5000; <= 0 = unlimited. Expansion runs on a worker thread with a large explicit stack sized to accommodate this default comfortably; raising this value far above the default (or setting it to unlimited on adversarial input) can exceed that stack and reintroduce an uncatchable that crashes the process — keep it bounded and near the default range. |
MaxIncludeDepth
|
The maximum depth of nested xi:include resolution, guarding against runaway or circular includes. Defaults to 40. |
MaxResourceBytes
|
Maximum size, in characters/bytes, of a single fetched resource. Guards against one small include pulling in an enormous resource. Enforced by ; a custom enforces its own. Default 64 MiB; <= 0 = unlimited. |
MaxXPathEvalMilliseconds
|
Wall-clock budget, in milliseconds, for a single XPointer xpath1() evaluation. Guards against a pathological XPath over a large document. Default 5000; <= 0 = unlimited. Note: System.Xml's XPath engine cannot be cancelled mid-evaluation, so this bounds the caller's wall-clock and raises a fatal error at the deadline; an abandoned evaluation runs to completion on a dedicated background thread with a large stack (off the thread pool, so it starves neither pooled work nor the caller; XPath 1.0 always terminates). Because that thread keeps reading the document being expanded, a document that hits this deadline MUST be discarded (see ), not reused. |
Resolver
|
The resource resolver used to dereference xi:include targets. When , a configured with is used. |