XmlResolver 6.0.3

dotnet add package XmlResolver --version 6.0.3                
NuGet\Install-Package XmlResolver -Version 6.0.3                
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="XmlResolver" Version="6.0.3" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add XmlResolver --version 6.0.3                
#r "nuget: XmlResolver, 6.0.3"                
#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.
// Install XmlResolver as a Cake Addin
#addin nuget:?package=XmlResolver&version=6.0.3

// Install XmlResolver as a Cake Tool
#tool nuget:?package=XmlResolver&version=6.0.3                

xmlresolvercs

A C# implementation of the XML Resolver

See The XML Resolver Project for more details.

APIs

This API implements System.Xml.XmlResolver.

The resolver can read catalogs from the local filesystem, from ZIP files, or from assemblies bundled with your application.

Version 6.x

Version 6.x is a significant refactoring and is not backwards compatible with version 2.x. (The underlying functionality is the same, but the API is slightly different.) The version 2.x sources are now in the legacy_v2 branch. Important bug fixes will be applied to the 2.x release for some time, but new development is focused on the 6.x release.

Three main considerations drove the refactoring:

  1. Correcting design errors, mostly attempting to make the whole thing more C#-like. The classes are now XmlResolver.XmlResolver… and not Org.XmlResolver….
  2. Simplification of the design (removing the caching feature, for example)
  3. Bringing the Java and C# implementations into better alignment.

What’s changed?(tl;dr)

Where previously you would have instantiated an Org.Xmlresolver.Resolver and used it as the entity resolver for System.Xml.XmlResolver you should now instantiate an XmlResolver.XmlResolver. This new object has methods for performing catalog lookup and resource resolution. It also has a method that returns the System.Xml.XmlResolver resolver API:

XmlResolver.XmlResolver.getXmlResolver()

Behind the scenes, the API has been reworked so that most operations consist of constructing a request for some resource, asking the XmlResolver to either (just) look it up in the catalog or resolve it, and returning a response.

A note about version numbers

The XML Resolver API is often integrated into other projects and products. On the one hand, this means that it’s valuable to publish new releases early so that integrators can test them. On the other hand, integrators quite reasonably want to make production releases with only the most stable versions.

In an effort to make this easier, starting with version 6.x, the XML Resolver releases will use an even/odd pattern version number strategy to identify development and stable branches.

If the second number in the verion is even, that’s a work-in-progress, stabalization release. Please test it, and report bugs. If the second number is odd, that’s a stable release. (Test that and report bugs too, obviously!)

In other words 6.0.x are stabalization releases. When the API is deemed stable, there will be a 6.1.0 release. If more features are developed or significant changes are undertaken, those will be published in a series of 6.2.x releases before stabalizing in a 6.3.0 release. Etc.

Cloning

The build now includes a collection of schemas and resources that can be made available in a “data” assembly. Because these resources are shared across both the Java and C# projects, they’re in a separate repo and that repo is a “submodule” of this one.

What that means in practice is that after you clone this repository, you must also run:

git submodule sync
git submodule update --init

That will make sure that the submodule is checked out and the data files are available.

Run the Gradle tasks to build the data.

./gradlew make_data_csproj make_data_tests

Loading assembly catalogs

Assembly catalogs are loaded using their AssemblyName, not their path:

  config.SetFeature(ResolverFeature.ASSEMBLY_CATALOGS,
    "MyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null");

You can leave the version out of the name.

Release notes

Releases are being pushed to NuGet.

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on XmlResolver:

Package Downloads
SaxonCS

SaxonCS is a high-performance XSLT 3.0 processor. It conforms with the latest W3C specifications (notably XSLT 3.0, XQuery 3.1, and XPath 3.1).

SaxonCS-b6

SaxonCS is a high-performance XSLT 3.0 processor. It conforms with the latest W3C specifications (notably XSLT 3.0, XQuery 3.1, and XPath 3.1).

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
6.0.3 67 11/18/2024
6.0.2 280 2/1/2024
6.0.0 86 1/30/2024
2.1.1 61 11/18/2024
2.1.0 136,164 2/2/2023
2.0.0 298 1/25/2023
1.5.1 422 8/18/2022
1.5.0 383 8/10/2022
1.4.0 114,226 6/28/2022
1.3.0 27,117 2/17/2022
1.2.0 418 2/15/2022
1.1.0 421 2/11/2022
1.0.0 659 1/27/2022
0.7.0 443 1/25/2022
0.6.1 424 1/21/2022
0.6.0 413 1/20/2022
0.5.5 441 1/12/2022
0.5.3 267 12/21/2021
0.5.2 263 12/17/2021
0.5.1 276 12/16/2021
0.5.0 341 12/9/2021
0.4.1 267 12/8/2021
0.4.0 263 12/6/2021
0.3.0 879 12/3/2021
0.2.1 273 12/2/2021
0.2.0 255 12/2/2021
0.1.0 299 9/1/2021
0.0.6 273 9/1/2021
0.0.5 275 8/31/2021
0.0.4 278 8/28/2021
0.0.3 276 8/26/2021
0.0.2 311 8/26/2021
0.0.1 289 8/13/2021

A catalog-based XML Resolver API for .NET