[ https://issues.apache.org/jira/browse/JENA-281?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13418976#comment-13418976 ]
Piotr Hołubowicz commented on JENA-281: --------------------------------------- Thanks for the clarification. I was referring to the Team Submission, correct, and in the official Turtle specification draft I can see that spaces are not allowed in IRI References. The RDF 1.1 specification draft moves explicitly from URI References to IRI References [1], which will disallow using unescaped chars such as spaces. I'm just wondering why you've updated the Turtle parser to the draft specification but have not updated the RDF/XML parser? That leads to a situation in which an RDF graph can be imported by Jena from RDF/XML but cannot be exported to Turtle, and vice versa. [1] http://www.w3.org/TR/2012/WD-rdf11-concepts-20120605/#section-IRIs > Turtle parser does not support spaces in URI references > ------------------------------------------------------- > > Key: JENA-281 > URL: https://issues.apache.org/jira/browse/JENA-281 > Project: Apache Jena > Issue Type: Bug > Components: Jena > Affects Versions: Jena 2.7.2 > Reporter: Piotr Hołubowicz > > According to the Turtle spec [1], spaces are allowed in URI references: > {quote} > [34] relativeURI ::= ucharacter* > [41] ucharacter ::= ( character - #x3E ) | '\>' > [38] character ::= '\u' hex hex hex hex | > '\U' hex hex hex hex hex hex hex hex | > '\\' | > [#x20-#x5B] | [#x5D-#x10FFFF] // #x20 = " " > {quote} > However, when reading a turtle file with spaces in URI references, exception > is thrown: > {code} > com.hp.hpl.jena.n3.turtle.TurtleParseException: Lexical error at line 1, > column 6. Encountered: " " (32), after : "<a" > at com.hp.hpl.jena.n3.turtle.ParserTurtle.parse(ParserTurtle.java:56) > at > com.hp.hpl.jena.n3.turtle.TurtleReader.readWorker(TurtleReader.java:33) > at com.hp.hpl.jena.n3.JenaReaderBase.readImpl(JenaReaderBase.java:119) > at com.hp.hpl.jena.n3.JenaReaderBase.read(JenaReaderBase.java:84) > at com.hp.hpl.jena.rdf.model.impl.ModelCom.read(ModelCom.java:268) > at > com.hp.hpl.jena.ontology.impl.OntModelImpl.read(OntModelImpl.java:2241) > (...) > {code} > The Turtle writer also doesn't support unescaped spaces, so for example an > RDF graph can be uploaded to Jena in RDF/XML but downloading it in Turtle > causes an exception similar to the above. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira