[ 
https://issues.apache.org/jira/browse/JENA-281?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13419017#comment-13419017
 ] 

Andy Seaborne commented on JENA-281:
------------------------------------

You are more than welcome to submit a patch for Jena for the RDF/XML parser.

The parser you are using is the old Turtle which is going to be removed.  The 
RIOT Turtle parser issues warnings.

RDF/XML is the existing standard. It is not currently being revised by the RDF 
Working Group. Turtle is not a standard yet, and the current implementation 
coverage is quite lax; the pre-W3C test suite is small and, in at least one 
place, wrong. 

We will support Turtle as defined by the standard using the newer Turtle parser.

While spaces are allowed in "RDF URI references", this is the only place in any 
standard; they are not legal in IRIs or URIs.  So as soon as the data is used 
in a place wanting IRIs, it will be illegal.  In particular, you can not legal 
deference an RDF URI Reference which includes a real space.  HTTP does not 
allow it.

                
> 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


Reply via email to