Skip to content

Commit

Permalink
Merge pull request #663 from tgbugs/fix-uri-spec
Browse files Browse the repository at this point in the history
namespace.py include colon in ALLOWED_NAME_CHARS
  • Loading branch information
gromgull authored May 14, 2018
2 parents 6cb0dab + 00c24cd commit 9da21db
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rdflib/namespace.py
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ def absolutize(self, uri, defrag=1):

NAME_START_CATEGORIES = ["Ll", "Lu", "Lo", "Lt", "Nl"]
NAME_CATEGORIES = NAME_START_CATEGORIES + ["Mc", "Me", "Mn", "Lm", "Nd"]
ALLOWED_NAME_CHARS = [u"\u00B7", u"\u0387", u"-", u".", u"_"]
ALLOWED_NAME_CHARS = [u"\u00B7", u"\u0387", u"-", u".", u"_", u":"]


# http://www.w3.org/TR/REC-xml-names/#NT-NCName
Expand All @@ -476,7 +476,7 @@ def is_ncname(name):
for i in range(1, len(name)):
c = name[i]
if not category(c) in NAME_CATEGORIES:
if c in ALLOWED_NAME_CHARS:
if c != ':' and c in ALLOWED_NAME_CHARS:
continue
return 0
# if in compatibility area
Expand Down

0 comments on commit 9da21db

Please sign in to comment.