Re: colons in URI path segments in RDF? (Form Post from Firefox)

Hello Dan,

 From http://www.ietf.org/rfc/rfc3986.txt (URI spec):

    URI-reference = URI / relative-ref


    relative-part = "//" authority path-abempty
                  / path-absolute
                  / path-noscheme
                  / path-empty

    path-noscheme = segment-nz-nc *( "/" segment )

    segment       = *pchar

    segment-nz-nc = 1*( unreserved / pct-encoded / sub-delims / "@" )
                  ; non-zero-length segment without any colon ":"

    pchar         = unreserved / pct-encoded / sub-delims / ":" / "@"

So colons are indeed allowed in a URI reference like "./foo:bar".
Please note that just writing "foo:bar" would be something completely
different, namely a URI with scheme "foo".

In general, it is a bad idea to use colons in file names; they don't
work on some file systems (Mac). But they are not a problem with the
URI (or IRI) spec.

I'm also not sure how much the RDF validator checks URIs; I don't
remember any checks in the servlet code, so any check would be
done in Jena.

Regards,    Martin.

At 06:29 06/03/08, Dan Connolly wrote:
 >
 >report=are colons really allowed in URIs like this? I'm not sure to what
 >extent the RDF validation service checks URIs, but I vaguely remember it
 >giving very pedantic messages about them.
 >RDF=<?xml version="1.0">
 ><?xml version="1.0"?>
 ><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
 >  xmlns:dc="http://purl.org/dc/elements/1.1/">
 >  <rdf:Description rdf:about="./foo:bar">
 >    <dc:title>World Wide Web Consortium</dc:title>
 >  </rdf:Description>
 ></rdf:RDF>
 > 

Received on Tuesday, 7 March 2006 23:46:04 UTC