Skip to content

Refactored the “always resolve” feature to avoid namespaces#231

Merged
ndw merged 1 commit intoxmlresolver:mainfrom
ndw:iss-229
Mar 13, 2025
Merged

Refactored the “always resolve” feature to avoid namespaces#231
ndw merged 1 commit intoxmlresolver:mainfrom
ndw:iss-229

Conversation

@ndw
Copy link
Collaborator

@ndw ndw commented Mar 13, 2025

Fix #229

There’s an unfortunate interaction between the ResolverFeature.ALWAYS_RESOLVE feature and namespace URI lookup. Using a namespace URI to find, for example, a schema in the catalog, or via indirection with RDDL to find things online, makes sense. But, generally speaking, what’s located at the namespace URI is not a useful resource. It’s very often not even present.

This PR refactors how the “always resolve” feature is implemented so that it can be set on a per-request basis. By default, it’s the same as the global configuration setting, but when doing namespace URI lookup, we disable it.

Fix xmlresolver#229

There’s an unfortunate interaction between the ResolverFeature.ALWAYS_RESOLVE
feature and namespace URI lookup. Using a namespace URI to find, for example, a
schema in the catalog, or via indirection with RDDL to find things online, makes
sense. But, generally speaking, what’s located at the namespace URI is not a
useful resource. It’s very often not even present.

This PR refactors how the “always resolve” feature is implemented so that it can
be set on a per-request basis. By default, it’s the same as the global
configuration setting, but when doing namespace URI lookup, we disable it.
@ndw ndw merged commit a325017 into xmlresolver:main Mar 13, 2025
3 of 4 checks passed
@ndw ndw deleted the iss-229 branch March 13, 2025 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Resolver goes to Internet for XQuery module's namespace URI

1 participant