Re: pound sign vs. slash as final URI delimiter

On Sat, 20 Mar 2004, Janne Saarela wrote:
> Coming back to this thread after a while...
> 
> > Just say no to "#".
> 
> I just ran across RDF schemas that use xml:base attribute
> with a URI that ends with a # character.
> 
> It appears the RDF test cases [1] do not address this
> issue or deliberately avoid use of it. I was browsing
> through old documents from RDF Core WG discussions
> but couldn't find out why this type of test is missing.

No, we deliberately tested it.  There are many xml:base tests:
  http://www.w3.org/2000/10/rdf-tests/rdfcore/xmlbase/
(there are none in the XML Base spec).

> Let me demonstrate a sample schema:
> 
> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
>           xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"

>           xml:base="http://www.schemas.org/music#">

This line is a problem, or at least can be confusing.
xml:base does not use URI references, but URIs, so the '#' here is 
stripped off in working out how to form a URI from an xml:base and
rdf:ID.

The explanation for this point is given in:
  5.3 Resolving URIs, RDF/XML Syntax Specification (Revised)
  http://www.w3.org/TR/2004/REC-rdf-syntax-grammar-20040210/#section-baseURIs

linking directly to the test cases.

> <rdfs:Class rdf:ID="Artist" />
> 
> </rdf:RDF>
> 
> Is this supposed to produce triple:
> 
> S:http://www.schemas.org/music#Artist
> P:http://www.w3.org/1999/02/22-rdf-syntax-ns#type 
> O:http://www.w3.org/2000/01/rdf-schema#Class

Yes

> or
> 
> S:http://www.schemas.org/Artist
> P:http://www.w3.org/1999/02/22-rdf-syntax-ns#type 
> O:http://www.w3.org/2000/01/rdf-schema#Class

No.

> I believe the former but RFC239 [3] suggests
> the relative URI (Artist) is resolved against the base
> URI by omitting characters after the last slash (/)
> resulting in http://www.schemas.org/Artist. Which one
> is now right?

The relative URI here is #Artist following the definition of
rdf:ID.

> Janne
> 
> [1] http://www.w3.org/TR/2004/REC-rdf-testcases-20040210/#tc_cert
> [2] http://www.w3.org/TR/2001/REC-xmlbase-20010627/#resolution
> [3] http://www.ietf.org/rfc/rfc2396.txt

Dave

Received on Saturday, 20 March 2004 10:23:17 UTC