-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Send more details to resolver when possible about nature of request #148
Comments
Yes. I think we should be able to do better here. The whole tangled mess of URI-related/resolver-related APIs is a mess. |
Indeed, the problem with the unparsed text resolver is clearly my fault. Here's a sketch of a proposal for a new design. Comments most welcome: https://so.nwalsh.com/2023/08/29-xmlresolver |
@ndw sounds good, your proposed changes are probably more than enough for our original purpose. |
You can (and I would really appreciate it if you did!) try them out now: 6x-SNAPSHOT |
@ndw sorry, we are getting close to a release, found some time to look a bit into this. This link you mention in your blog post does not work for me: https://oss.sonatype.org/content/repositories/snapshots/
|
Radu Coravu ***@***.***> writes:
@ndw sorry, we are getting close to a release, found some time to look a bit into this. This link
you mention in your blog post does not work for me:
https://oss.sonatype.org/content/repositories/snapshots/
That should work as a Maven repository. If you want to navigate there by
hand, you have to skip down a couple of levels:
https://oss.sonatype.org/content/repositories/snapshots/org/xmlresolver/xmlresolver/
Also running " ./gradlew build --stacktrace" on the sources does not work for me:
Caused by: java.io.IOException: Cannot run program "./gradlew" (in
directory "/Users/.../Downloads/xmlresolver-6.0.3-SNAPSHOT/data"):
error=2, No such file or directory
Odd. But the sources are part of the test build, you shouldn’t have to build
them separately.
Be seeing you,
norm
…--
Norm Tovey-Walsh ***@***.***>
https://norm.tovey-walsh.com/
Anything more than the truth would be too much.--Robert Frost
|
This is now shipping in the 6.x resolver, so I'm going to close this. The tl;dr is, I think, that you can provide your own extension of the |
Let's say I configure in Calabash the "com.xmlcalabash.core.XProcConfiguration.uriResolver" to be my custom implementation of "org.xmlresolver.Resolver".
In the "net.sf.saxon.lib.StandardUnparsedTextResolver" the "resolve" call sets of details about the nature of the request (nature, purpose).
But back in my "org.xmlresolver.Resolver" implementation the only callback I can override is "resolve(href, base)" where I no longer know details about the nature of the resolution and if for example on the "resolve(href, base)" I return a SaxSource, the StandardUnparsedTextResolver will not use it as it expects a stream source.
The text was updated successfully, but these errors were encountered: