[Python-modules-commits] [python-pyld] 112/276: Allow @id values that match term.
Wolfgang Borgert
debacle at moszumanska.debian.org
Wed Oct 8 23:47:59 UTC 2014
This is an automated email from the git hooks/post-receive script.
debacle pushed a commit to branch master
in repository python-pyld.
commit b5cdb0f414daa2d88ca964f39882288af425bd60
Author: Dave Longley <dlongley at digitalbazaar.com>
Date: Mon Apr 15 10:46:28 2013 -0400
Allow @id values that match term.
---
lib/pyld/jsonld.py | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/lib/pyld/jsonld.py b/lib/pyld/jsonld.py
index c5e50fb..fdf3893 100644
--- a/lib/pyld/jsonld.py
+++ b/lib/pyld/jsonld.py
@@ -3433,11 +3433,12 @@ class JsonLdProcessor:
raise JsonLdError(
'Invalid JSON-LD syntax; @context @id value must be a '
'string.', 'jsonld.SyntaxError', {'context': local_ctx})
- # add @id to mapping
- mapping['@id'] = self._expand_iri(
- active_ctx, id_, vocab=True, base=True,
- local_ctx=local_ctx, defined=defined)
- else:
+ if id_ != term:
+ # add @id to mapping
+ mapping['@id'] = self._expand_iri(
+ active_ctx, id_, vocab=True, base=True,
+ local_ctx=local_ctx, defined=defined)
+ if '@id' not in mapping:
# see if the term has a prefix
colon = term.find(':')
if colon != -1:
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-pyld.git
More information about the Python-modules-commits
mailing list