rvesse commented on issue #1663: URL: https://github.com/apache/jena/issues/1663#issuecomment-1337022095
For clarification `<>` is not an empty resource but rather an empty relative URI. Thus this resolves to the Base URI that is in scope at the time that the RDF is parsed. Some things you could try (untested): - Use `RDFParser.create()` to get a [`RDFParserBuilder`](https://jena.apache.org/documentation/javadoc/arq/org.apache.jena.arq/org/apache/jena/riot/RDFParserBuilder.html) and set [`resolveUris(false)`](https://jena.apache.org/documentation/javadoc/arq/org.apache.jena.arq/org/apache/jena/riot/RDFParserBuilder.html#resolveURIs(boolean)) on that builder. Note that the documentation explicitly states that relative URIs are generally "bad data" because of the issues that you outline about their resolution varying - For writing the output explicitly set a Base URI to the `file` URI for the file. Depending on the format this may then cause the empty URI to be used on output -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
