if (path == null)
throw new ApplicationRuntimeException(
Tapestry.format("Namespace.library-id-not-found", id, getNamespaceId()));
IResourceLocation location = getSpecificationLocation().getRelativeLocation(path);
// Ok, an absolute path to a library for an application whose specification
// is in the context root is problematic, cause getRelativeLocation()
// will still be looking in the context. Handle this case with the
// following little kludge:
if (location.getResourceURL() == null && path.startsWith("/"))
location = new ClasspathResourceLocation(_specification.getResourceResolver(), path);
ILibrarySpecification ls = _specificationSource.getLibrarySpecification(location);
return new Namespace(id, this, ls, _specificationSource);