mirror of
https://github.com/itplr-kosit/validator.git
synced 2026-05-26 01:05:38 +00:00
#14 load from jar einfacher
This commit is contained in:
parent
165ce94be9
commit
b4429bed89
5 changed files with 37 additions and 27 deletions
|
|
@ -62,7 +62,14 @@ public class RelativeUriResolver implements URIResolver, UnparsedTextURIResolver
|
|||
}
|
||||
}
|
||||
|
||||
static URI resolve(final URI href, final URI base) {
|
||||
/**
|
||||
* Resolves a relative uri including uris within a jar file.
|
||||
*
|
||||
* @param href the uri to resolve
|
||||
* @param base the base uri
|
||||
* @return the resolved uri
|
||||
*/
|
||||
public static URI resolve(final URI href, final URI base) {
|
||||
final boolean jarURI = isJarURI(base);
|
||||
final URI tmpBase = jarURI ? URI.create(base.toASCIIString().substring(4)) : base;
|
||||
final URI result = tmpBase.resolve(href);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue