package org.argeo.cms.acr;
import java.net.MalformedURLException;
+import java.net.URI;
import java.net.URL;
import java.util.Objects;
//
XML("xml", "http://www.w3.org/XML/1998/namespace", "xml.xsd", "http://www.w3.org/2001/xml.xsd"),
//
- XLINK("xlink", "http://www.w3.org/1999/xlink", "xlink.xsd", "http://www.w3.org/XML/2008/06/xlink.xsd"),
+ XLINK("xlink", "http://www.w3.org/1999/xlink", "xlink.xsd", "https://www.w3.org/1999/xlink.xsd"),
//
WEBDAV("D", "DAV:", null, "https://raw.githubusercontent.com/lookfirst/sardine/master/webdav.xsd"),
//
Objects.requireNonNull(namespace);
this.namespace = namespace;
if (resourceFileName != null) {
- resource = getClass().getResource(RESOURCE_BASE + resourceFileName);
+ // resource = getClass().getResource(RESOURCE_BASE + resourceFileName);
+ try {
+ // FIXME workaround when in nested OSGi frameworks
+ resource = URI.create("platform:/plugin/org.argeo.cms" + RESOURCE_BASE + resourceFileName).toURL();
+ } catch (MalformedURLException e) {
+ throw new IllegalArgumentException("Cannot convert " + resourceFileName + " to URL");
+ }
Objects.requireNonNull(resource);
}
if (publicUrl != null)