[
https://issues.apache.org/jira/browse/JENA-2039?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17280998#comment-17280998
]
Andy Seaborne commented on JENA-2039:
-------------------------------------
Syntactically, that scheme is fine. It is "path-absolute" production in the
RFC3986 grammar. I've added "path-absolute" to the Jena test suite :).
The use of fragment is legal but maybe a hierarchical path would be useful?
wm:/content/graphname
because used as a base, it becomes a base of wm:/content/ (assuming graph name
does not have "/" in it).
Just "wm:/content#graphname" then:
Base: "wm:/abcde#graph"
Relative reference "xyz"
=> wm:/xyz
Relative reference "#xyz"
=> wm:/abcde#xyz
whereas
base = "wm:/abcde/graph
"xyz" => "wm:/abcde/xyz"
(Strictly, in RFC 3986, the base does not have a fragment whereas Jena ignores
them)
{{}}
> URI parsing fails
> -----------------
>
> Key: JENA-2039
> URL: https://issues.apache.org/jira/browse/JENA-2039
> Project: Apache Jena
> Issue Type: Bug
> Components: RIOT
> Reporter: Florian Kleedorfer
> Priority: Critical
>
> Depending on 3.18.0-SNAPSHOT, some of my tests started to fail recently. We
> are using URIs of the form 'wm:/abcde' - note the single slash. These URIs,
> it seems, can no longer be parsed.
> Here is a minimal example:
> {noformat}
> @prefix msg: <https://w3id.org/won/message#> .
> <wm:/jq15ga3aacsxbvl9nngw> a msg:Message .
> {noformat}
> This is the exception I get:
> {noformat}
> Exception in thread "main" org.apache.jena.riot.RiotException: [line: 3, col:
> 1 ] Bad IRI: <wm:/jq15ga3aacsxbvl9nngw> : Not an RDF IRI:
> wm:/jq15ga3aacsxbvl9nngw
> at
> org.apache.jena.riot.system.ErrorHandlerFactory$ErrorHandlerStd.error(ErrorHandlerFactory.java:146)
> at
> org.apache.jena.riot.system.ParserProfileStd.internalMakeIRI(ParserProfileStd.java:101)
> at
> org.apache.jena.riot.system.ParserProfileStd.resolveIRI(ParserProfileStd.java:81)
> at
> org.apache.jena.riot.system.ParserProfileStd.createURI(ParserProfileStd.java:162)
> at
> org.apache.jena.riot.system.ParserProfileStd.create(ParserProfileStd.java:234)
> at
> org.apache.jena.riot.lang.LangTurtleBase.tokenAsNode(LangTurtleBase.java:582)
> at
> org.apache.jena.riot.lang.LangTurtleBase.node(LangTurtleBase.java:414)
> at
> org.apache.jena.riot.lang.LangTriG.oneNamedGraphBlock2(LangTriG.java:115)
> at
> org.apache.jena.riot.lang.LangTriG.oneTopLevelElement(LangTriG.java:49)
> at
> org.apache.jena.riot.lang.LangTurtleBase.runParser(LangTurtleBase.java:79)
> at org.apache.jena.riot.lang.LangBase.parse(LangBase.java:43)
> at
> org.apache.jena.riot.RDFParserRegistry$ReaderRIOTLang.read(RDFParserRegistry.java:185)
> at org.apache.jena.riot.RDFParser.read(RDFParser.java:356)
> at org.apache.jena.riot.RDFParser.parseNotUri(RDFParser.java:346)
> at org.apache.jena.riot.RDFParser.parse(RDFParser.java:292)
> at
> org.apache.jena.riot.RDFParserBuilder.parse(RDFParserBuilder.java:539)
> at
> org.apache.jena.riot.RDFDataMgr.parseFromInputStream(RDFDataMgr.java:901)
> at org.apache.jena.riot.RDFDataMgr.read(RDFDataMgr.java:590)
> at org.apache.jena.riot.RDFDataMgr.read(RDFDataMgr.java:568)
> at org.apache.jena.riot.RDFDataMgr.read(RDFDataMgr.java:559)
> {noformat}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)