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

John Cowan wrote:
> Sandro Hawke scripsit:
>> <rdf:RDF xmlns:rdf=""
>> 	 xmlns:foaf=""
>>          xml:base="">
>>   <rdf:Description rdf:about="">
>>     <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:
>>    <> <> <>.
> Almost.  It parses to the N-Triple that results when
> you %-escape the above non-ASCII characters.  If you
> read either
> or , 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:
<> <>

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