DCoding.Xml.XPointer 1.0.1

dotnet add package DCoding.Xml.XPointer --version 1.0.1
                    
NuGet\Install-Package DCoding.Xml.XPointer -Version 1.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="DCoding.Xml.XPointer" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DCoding.Xml.XPointer" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="DCoding.Xml.XPointer" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add DCoding.Xml.XPointer --version 1.0.1
                    
#r "nuget: DCoding.Xml.XPointer, 1.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package DCoding.Xml.XPointer@1.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=DCoding.Xml.XPointer&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=DCoding.Xml.XPointer&version=1.0.1
                    
Install as a Cake Tool

DCoding.Xml.XPointer

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.

Explicit XPointer processing over immutable XDM resources. This optional package depends only on DCoding.Xml.Xdm.

Construct XPointerRequest with an already acquired document/element, the expanded scheme name and decoded scheme data. Register trusted implementations of IXPointerScheme with XPointerProcessor, then call Evaluate explicitly. Registrations, requests, diagnostics and result lists are immutable snapshots. Selected nodes retain their supplied XDM identity. Unsupported schemes, empty selection, resource/data/result limits and foreign nodes return stable diagnostics without partial nodes. Cancellation and scheme exceptions propagate.

XPointerParser.Parse(pointer, limits, cancellationToken) parses complete Framework syntax independently of selection. Its immutable syntax distinguishes NCName shorthand from ordered QName/data parts and retains their original UTF-16 source spans. Parsing reverses only the three Framework caret escapes and checks balanced nesting. Invalid syntax returns XPTR0006 with a source offset and no partial parts; exhausted limits return XPTR0003. XPointerParsingLimits bounds whole input, part count and nesting without changing the existing three-argument XPointerLimits constructor. Names use the shared XML 1.0 Fifth Edition/XML 1.1 name policy. Leading/trailing whitespace and whitespace before the opening parenthesis are outside the Framework grammar; XML S may separate parts.

processor.Evaluate(resource, pointer, limits, cancellationToken) validates the entire pointer before invoking a registered scheme. It evaluates supported parts left to right, skipping unsupported/unbound names and empty selections, then returns the first valid nonempty selection. Invalid selections, membership or resource limits, cancellation and trusted-provider exceptions remain terminal. The initial namespace context binds only the standard xml prefix. xmlns() parts declare or replace prefix bindings for later parts and never select a subresource. Invalid declarations and attempts to alter the reserved XML/XMLNS bindings leave the context unchanged. Namespace names remain opaque: they are not URI-decoded, normalized or dereferenced. XML S may surround the equals sign; trailing namespace-name characters are retained, including an empty name.

Registered providers receive the immutable request.NamespaceContext snapshot, including bindings for qualified names inside their scheme data. Later parts, repeated evaluations and concurrent callers cannot mutate an earlier snapshot. No selection scheme is registered implicitly.

An NCName shorthand selects the first matching element in document order using the supplied XDM's typed-ID metadata. This includes xml:id, DTD IDs and available schema-derived or union-member IDs. An ID-valued direct child identifies its parent element. Plain attributes named id and IDREF values do not identify elements. Comparisons use normalized ID values and ordinal equality; duplicate IDs select the first matching element. The lookup is iterative, honors cancellation and MaxResourceNodes, and returns XPTR0002 when the supplied resource contains no matching ID. It preserves the selected element's identity and never acquires another resource. General xpointer() remains unsupported.

Register new XPointerElementScheme() to enable the released element() scheme. element(/1/2) selects the document element's second element child, ignoring text, comments, processing instructions and namespaces. element(target/1) starts at the first element identified by the retained ID value target and selects its first element child. DTD IDs, host xml:id, and provider-supplied schema ID attributes or direct child elements supply ID authority through the public XdmXmlNode.IsId property. Schema normalized lexical values take precedence when supplied; ordinary attributes named id do not gain ID authority. The scheme does no schema validation or resource acquisition. Copies must preserve the required ID metadata explicitly.

Child indices are unsigned ASCII decimals starting at one without leading zeroes. Invalid scheme data and missing targets give an empty result so a later part may provide fallback. Arbitrarily large indices cannot overflow into valid indices. Lookup and navigation honor the finite resource limit and caller cancellation; an exhausted limit returns terminal XPTR0003. Selections retain input identity. Document resources may contain an acquired external entity's element forest; an element resource is treated as the single root of that acquired entity.

Direct XPointerRequest data remains already decoded and is not reparsed. URI percent decoding and XML escaping belong to the host; neither route reverses them again. Scheme implementations are trusted code and must honor the supplied budgets/cancellation within their own computations.

processor.EvaluateUriFragment(resource, escapedFragment, limits, token) is the explicit host helper for a URI/IRI fragment component without the leading #. It reverses strict UTF-8 %HH encoding once, preserves + and Unicode spelling, and then invokes the complete Framework route. Extract an escaped component with uri.GetComponents(UriComponents.Fragment, UriFormat.UriEscaped) after the host has acquired and authorized the resource. XML escaping remains a host parsing responsibility. Malformed triplets, UTF-8 or literal UTF-16 return XPTR0007, whose offset refers to the escaped component; pointer syntax still uses XPTR0006. ParsingLimits.MaxPointerLength bounds both the escaped component before allocation and the decoded pointer. Identity and base/document URI metadata remain attached to the existing selected nodes.

No resource resolver, network access, XML parsing or XPath compiler is invoked implicitly. Resource acquisition and authority remain with the calling host.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on DCoding.Xml.XPointer:

Package Downloads
DCoding.Xml.XInclude

Explicit, caller-authorized XInclude preprocessing for immutable XDM documents.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.1 54 11/20/2026

Stable 1.0.1: licensing and packaging correction delivery. Public APIs and edition rights are unchanged.