Skip to content

Commit

Permalink
Turtle FixPack (ParseURI corner case support)
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco authored and Marco committed Dec 7, 2018
1 parent cac2c4d commit 58d7aaf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions RDFSharp/Model/Serializers/RDFTurtle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -894,6 +894,9 @@ private static Uri ParseURI(String turtleData,
//Relative: append to graph context
else if (Uri.IsWellFormedUriString(uriString, UriKind.Relative))
return new Uri(result.ToString() + uriString);
//PureFragment: append to graph context
else if (uriString.Equals("#"))
return new Uri(result.ToString().TrimEnd(new Char[] { '#' }) + uriString);
//Error: not well-formed, so throw exception
else
throw new RDFModelException("Uri is not well-formed" + GetTurtleContextCoordinates(turtleContext));
Expand Down

0 comments on commit 58d7aaf

Please sign in to comment.