W3C home > Mailing lists > Public > semantic-web@w3.org > April 2007

Re: xml:base (was Re: IRI meets RDF meets HTTP redirect)

From: Dave Beckett <dave@dajobe.org>
Date: Thu, 19 Apr 2007 18:42:42 -0700
Message-ID: <46281A92.3090904@dajobe.org>
To: John Cowan <cowan@ccil.org>
CC: Sandro Hawke <sandro@w3.org>, Jeremy Carroll <jjc@hpl.hp.com>, semantic-web@w3.org, www-international@w3.org

John Cowan wrote:
> Sandro Hawke scripsit:
>> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
>> 	 xmlns:foaf="http://xmlns.com/foaf/0.1/"
>>          xml:base="http://www.w3.org/International/articles/idn-and-iri/JP????/????????????">
>>   <rdf:Description rdf:about="http://www.w3.org/">
>>     <foaf:likes rdf:resource="" />
>>   </rdf:Description>
>> </rdf:RDF>
>> ================================================================
> Unfortunately, the above showed up in my mailer with a pile of question
> marks, but I'll pretend it didn't.  I'm also reversing the order of your
> options for rhetorical purposes.

me too, but I can see it in:
just fine


>> It parses to this N-Triple:
>>    <http://www.w3.org/> <http://xmlns.com/foaf/0.1/likes> <http://www.w3.org/International/articles/idn-and-iri/JP????/????????????>.
> Almost.  It parses to the N-Triple that results when
> you %-escape the above non-ASCII characters.  If you
> read either http://www.w3.org/2001/sw/RDFCore/ntriples/
> or http://www.w3.org/TR/rdf-testcases/#ntriples , you
> will find that non-ASCII characters are not permitted
> in N-Triples files.  Furthermore, they are not required,
> because N-Triples express relations between resources
> named by URIs, not by IRIs.

No, they are RDF URI References which can have non-ASCII characters
encoded as \uHHHH (when in U+0000-U+FFFF range - not all of these
are allowed in some situations such as writing them in XML 1.0)
or \UHHHHHHHH (U+10000-U+10FFFF range).  The N-Triples
spec explains how to encode every codepoint U+0-U+10FFFF inclusive at:

There is an example in the example linked from the N-Triples spec:

> I repeat:  the value of an xml:base attribute may contain
> non-ASCII (and non-URI) characters.  The resulting base URI
> does not; it contains their %-escaped equivalents.
>> I'm happy with this option, and I understood Jeremy and Chris to be as
>> well.  FWIW, the W3C RDF validator (using Jeremy's parser) does this.
> If the validator returns that N-Triple then it is broken.

Yes, if it does, it is broken.

The correct answer is:
<http://www.w3.org/> <http://xmlns.com/foaf/0.1/likes>

My copy of ARP (behind the w3c validator) as well as my own Raptor parser,
generate this with the example above.

Received on Friday, 20 April 2007 01:46:47 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 08:45:00 UTC