diff --git a/rdflib_jsonld/context.py b/rdflib_jsonld/context.py index bd4cb6f..fc25ad0 100644 --- a/rdflib_jsonld/context.py +++ b/rdflib_jsonld/context.py @@ -42,10 +42,10 @@ def base(self): @base.setter def base(self, base): - if base: - hash_index = base.find('#') - if hash_index > -1: - base = base[0:hash_index] + #if base: + #hash_index = base.find('#') + #if hash_index > -1: + #base = base[0:hash_index] self._base = self.resolve_iri(base) if ( hasattr(self, '_base') and base is not None) else base self._basedomain = '%s://%s' % urlsplit(base)[0:2] if base else None diff --git a/rdflib_jsonld/util.py b/rdflib_jsonld/util.py index 698cac0..0b992de 100644 --- a/rdflib_jsonld/util.py +++ b/rdflib_jsonld/util.py @@ -55,14 +55,15 @@ def norm_url(base, url): 'http://example.net/one' """ parts = urlsplit(urljoin(base, url)) - path = normpath(parts[2]) - if sep != '/': - path = '/'.join(path.split(sep)) - if parts[2].endswith('/') and not path.endswith('/'): - path += '/' - result = urlunsplit(parts[0:2] + (path,) + parts[3:]) - if url.endswith('#') and not result.endswith('#'): - result += '#' + #path = normpath(parts[2]) + #if sep != '/': + # path = '/'.join(path.split(sep)) + #if parts[2].endswith('/') and not path.endswith('/'): + # path += '/' + #result = urlunsplit(parts[0:2] + (path,) + parts[3:]) + #if url.endswith('#') and not result.endswith('#'): + # result += '#' + result = url return result def context_from_urlinputsource(source):