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:
http://lists.w3.org/Archives/Public/semantic-web/2007Apr/0144.html
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:
http://www.w3.org/TR/rdf-testcases/#ntrip_strings

There is an example in the example linked from the N-Triples spec:
http://www.w3.org/2000/10/rdf-tests/rdfcore/ntriples/test.nt

> 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>
<http://www.w3.org/International/articles/idn-and-iri/JP\u7D0D\u8C46/\u5F15\u304D\u5272\u308A\u7D0D\uFFFD\uFFFD>
.

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

Dave
Received on Friday, 20 April 2007 01:46:47 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 21:45:14 GMT