DCoding.Xml.XQuery
1.0.1
dotnet add package DCoding.Xml.XQuery --version 1.0.1
NuGet\Install-Package DCoding.Xml.XQuery -Version 1.0.1
<PackageReference Include="DCoding.Xml.XQuery" Version="1.0.1" />
<PackageVersion Include="DCoding.Xml.XQuery" Version="1.0.1" />
<PackageReference Include="DCoding.Xml.XQuery" />
paket add DCoding.Xml.XQuery --version 1.0.1
#r "nuget: DCoding.Xml.XQuery, 1.0.1"
#:package DCoding.Xml.XQuery@1.0.1
#addin nuget:?package=DCoding.Xml.XQuery&version=1.0.1
#tool nuget:?package=DCoding.Xml.XQuery&version=1.0.1
DCoding.Xml.XQuery
V1.0 technical selection: Community, Professional. Declared assets/hosts: net8.0, net11.0. See the current edition and API/runtime catalog for mode and host limits. Selection and retained development results do not replace final artifact qualification, the supplied license or human release approval.
This optional package provides the public XQuery 1.0, 3.0, and 3.1
compiler and execution surface over the shared DCoding XML stack with net8/net11 assets and net8/net10/net11 consumer profiles.
It depends only on DCoding.Xml.Serialization, DCoding.Xml.Xdm, and
DCoding.Xml.XPath.
Compile a main query with XQueryProcessor.Compile, check the structured
diagnostics, and execute the resulting immutable XQueryCompiledQuery with an
explicit XQueryDynamicContext when host resources or variables are needed.
Resolvers and execution limits are deny-by-default host capabilities; the
package does not add ambient network or file access.
Compile and Execute accept query strings, caller-owned readers and streams,
or a URI together with an explicit IXQueryResourceResolver. Matching
CompileAsync and ExecuteAsync methods perform cancellation-aware input and
CPU work without closing caller-owned inputs. URI loading uses the dedicated
MainQuery resource kind, copies resolver bytes under finite limits, and uses
the resolved URI as source identity and static base URI.
For asynchronous library-module imports, assign an explicit
IXQueryAsyncModuleResolver to XQueryCompileOptions.AsyncModuleResolver and
use the existing CompileAsync or direct ExecuteAsync overloads. The compiler
awaits single-unit, multi-unit and recursive acquisitions through its shared
module graph. Options and schema settings are captured before suspension;
current module content and authority are checked before cache reuse. Synchronous
compilation rejects asynchronous module authority, and selecting both module
resolvers is invalid. Existing synchronous module and schema policies remain
explicitly selectable.
For asynchronous schema acquisition, select AsyncSchemaProvider for an
IXQueryAsyncSchemaProvider snapshot factory and/or AsyncSchemaResolver for
explicit IXmlHostAsyncResourceResolver import authority. A selected snapshot
must implement IXQueryAsyncSchemaImportProvider when asynchronous schema
imports are needed. The compiler acquires imports across the complete module
graph before cache lookup, then uses the existing module-local static contexts
and IR. Schema resource reads and owned asynchronous disposal are awaited.
Choose one synchronous or asynchronous authority for each capability; the
synchronous compiler rejects asynchronous authority. Acquisition factories and
credentials are excluded from reusable plans, which still require compatible
explicit schema rebinding. Plans retaining runtime schema providers continue
to bypass the ready cache.
XQueryCompileOptions can be copied and populated fluently with static
parameters. XQueryDynamicContextBuilder accepts XDM, LINQ to XML,
XPathNavigator, and XmlReader context items and bounded CLR or XDM external
variables. Cached and prepared queries use the same compiled-query execution
methods as fresh compilation, including asynchronous execution.
XQueryModuleFunctionRuntime.CreateXPathHost compiles and instantiates one
explicitly resolved XQuery library module for XPath
fn:load-xquery-module(). It returns a structured XQueryModuleHostResult
containing a request-scoped XPathXQueryModuleHost and reusable driver query,
or normal XQuery diagnostics. Module resolver, schema provider, host-function,
cache, resource-limit, and cancellation authority remains explicit; the
prepared-plan overload never rediscovers resolver authority.
CreateXPathHostAsync also awaits module compilation and prepared initializers;
exported callables can be invoked with XPathProcessor.InvokeAsync. For a
namespace or options that become known during query evaluation, register an
XQueryModuleRuntimeAuthority under its ContextKey in the request's XPath
dynamic context. Its explicit AsyncModuleResolver acquires the graph through
the production compiler using the call's static base URI. Use an absolute base
URI when compiling the caller. Instances share the original execution's limits,
deadline and cancellation; runtime authority and pending operations are absent
from saved plans. Explicit denial cannot select a retained or synchronous fallback.
Compilation transfers compact canonical Compiler IR between the XQuery and XPath product layers without creating an intermediate persisted prepared-plan envelope. Immutable request-neutral metadata, including bindable-variable indexes and FLWOR clause pipelines, is prepared once and reused by executions; request-local variables, resolver authority, cancellation, and limits are not retained by the compiled query.
XQueryExecutionLimits is an immutable per-execution policy. In addition to
IR, result, retained-item, constructor, and recursion bounds, it limits
aggregate runtime string characters, regular-expression arguments, dynamic
resource and collection calls, resolver bytes, and elapsed execution time.
Caller cancellation still throws OperationCanceledException; an elapsed
execution limit returns the structured DCXML0983 resource diagnostic without
a partial XDM value. The six-argument constructor remains source compatible and
applies the secure additive defaults.
Dynamic document, text, JSON, external-entity, collection, and URI-collection access remains explicit and request local. One execution session owns its counters and cache, forwards one linked cancellation lineage to host resolvers, preserves resolver metadata and stream ownership, and shares its budget with all nested XPath IR work. Compiled queries, prepared artifacts, and process-wide regex caches retain none of that request state.
The package contains net8.0 and net11.0 assemblies and English XML API documentation.
Portable symbols are supplied in the matching .snupkg. See LICENSE.md and
NOTICE.md for the current legal and private-publication boundary.
The public compile, caller-owned cache, prepared-plan save/load, execute, and
serialize route has a bounded .NET 8 linux-x64 trimming and NativeAOT proof.
The proof uses a package-only consumer without linker roots, warning
suppressions, test-assembly access, or repository-relative runtime assets. It
does not imply a broader platform or full-package-set support matrix.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. net11.0 is compatible. |
-
net11.0
- DCoding.Xml.Serialization (>= 1.0.1)
- DCoding.Xml.Xdm (>= 1.0.1)
- DCoding.Xml.XPath (>= 1.0.1)
-
net8.0
- DCoding.Xml.Serialization (>= 1.0.1)
- DCoding.Xml.Xdm (>= 1.0.1)
- DCoding.Xml.XPath (>= 1.0.1)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on DCoding.Xml.XQuery:
| Package | Downloads |
|---|---|
|
DCoding.Xml.XQueryX
Optional XQueryX 3.1 conversion and compilation APIs over the DCoding XML query stack. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.1 | 48 | 11/20/2026 |
Stable 1.0.1: licensing and packaging correction delivery. Public APIs and edition rights are unchanged.