Re: IRI and IDN in RDF

At 01:20 05/01/12, Jeremy Carroll wrote:
 >
 >
 >
 >I suspect that formally correct treatment and good practice diverge on this.
 >
 >The text of RDF Concepts and Abstract Syntax which expresses RDF's idea 
of an IRI is this:
 >http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#section-Graph-URIref
 >[[

[shortened]

 >]]
 >
 >my understanding is that the IDNs are not covered as such by the 
conversion stated,

Yes, because URIs according to RFC2396 don't allow %-encoding in the
host part.

 >and any additional conversion required from them would be an extra 
(non-standard) feature.

Extra, yes, but not actually any longer non-standard. RFC2396bis
allows it. So updating the RDF spec to RFC2396bis would fix this,
at least spec-wise.


 >I guess from a W3C side we should be revving a lot of text in light of 
IRI and IDN as they come to fruition.

Yes. The second point where problems may occur is that RDF currently
allows spaces and characters such as '<' and '>' directly, whereas
in IRIs, they are not allowed. There is some text in the IRI spec
that describes what a spec using IRIs can do in such a case.

Spec-wise, there would be two choices for RDF:
1) Just switching to IRIs, i.e. disallow direct spaces,... in
    the hope that nobody used them much because they are confusing
    anyway.
2) Saying that a "RDF URI reference" is an IRI after escaping
    spaces,...

1) would probably be the cleaner solution, and would be easier on
    things such as N3 and SPARCLE.

 >e.g. the conversion in
 >http://www.w3.org/International/iri-edit/draft-duerst-iri-10.txt
 >[[
 >    http://r&#xE9;sum&#xE9;.example.org may be converted to
 >    http://xn--rsum-bpad.example.org instead of
 >    http://r%C3%A9sum%C3%A9.example.org.
 >]]
 >and in fact, the first string is not an 'RDF URI reference' or an XLink 
href attribute value, or in the lexical space of xsd:anyURI, because
 >    http://r%C3%A9sum%C3%A9.example.org.
 >is not a legal URI, and the provisions of those specs only allow for %-encoding.
 >
 >So, I think an RSS or RDF tool would need either to:
 >- not check that the URIs were legal

Because there are very few things you can check with an URI/IRI
anyway, that's usually a good solution. It also helps with potential
future changes to URIs/IRIs.

 >or
 >- to have an extended check that knew something about IDNs
 >
 >and neither is particularly conformant. Personally I would prefer the latter.

If RDF gets updated to RFC2396bis, you can do that.


Regards,    Martin. 

Received on Thursday, 13 January 2005 09:24:12 UTC