History | Log In     View a printable version of the current page. Get help!  
Issue Details [XML]

Key: SES-272
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: giovanni tummarello
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Sesame

URI allows spaces after fragment

Created: 09/May/06 05:26 PM   Updated: 11/May/06 04:00 PM
Component/s: RDF Model
Affects Version/s: 1.2.4
Fix Version/s: None


 Description   
Hi guys.. this comes straight from a DBin dump..

<ns4:Description ns4:about="http://ontomedia.ecs.soton.ac.uk/ontologies/ontomedia/entity_store/LittleRedRidingHood#LittleRedRidingHood ">
<ns2:label>Little Red Riding Hood</ns2:label>
</ns4:Description>

as you can see the URI has a space after the fragment identifier.
I am not sure how it got in the DB, but it is certainly there. The URI came probably from an xml import or it could have been added manually via API , i am unsure. But we think it was inserted in the db via the api

 All   Comments   Change History      Sort Order:
Comment by Jeen Broekstra [11/May/06 04:00 PM]
This is always a bit of a problem. Strictly speaking, this is actually allowed (at least, I think so, reading the specs). Quoting RDF Concepts and Abstract Syntax (http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#dfn-URI-reference ):

" A URI reference within an RDF graph (an RDF URI reference) is a Unicode string that:

    * does not contain any control characters ( #x00 - #x1F, #x7F-#x9F)
    * and would produce a valid URI character sequence (per RFC2396 [URI], sections 2.1) representing an absolute URI with optional fragment identifier when subjected to the encoding described below.

The encoding consists of:

   1. encoding the Unicode string as UTF-8 [RFC-2279], giving a sequence of octet values.
   2. %-escaping octets that do not correspond to permitted US-ASCII characters."

So, IMHO the above means that in an RDF graph, a URI Reference is a string that /when encoded/ would be an RFC-compliant URI. But the RDF URI _reference_ itself should not be encoded (so the white space is actually allowed in the reference).

It's tricky to get this right though: does this only apply to white spaces, or also to, for example, angle brackets (which would make parsing a whole lot trickier)? Hm, we need to take another deep dive into the specs I guess.