Re: checklink: about checking of same-document ref in a page specified with data: url

On Saturday 20 February 2010, Makoto Mizukami wrote:
> Hi there,
> 
> > It does not say so to me.
> > http://validator.w3.org/checklink?uri=http%3A%2F%2Fkoti.welho.com%2Fvskyt
> >ta%2Ftest.html
> 
> I meant that it occurs if I use the validator WITH the url;
> namely, I mentioned this result:
> http://validator.w3.org/checklink?uri=data%3Atext%2Fhtml%3Bcharset%3DUTF-8%
> 2C%253C%2521doctype%2520html%253E%253Cmeta%2520charset%253D%2522UTF-8%2522%
> 253E%253Ctitle%253E%253C%252Ftitle%253E%253Ca%2520href%253D%2522%2523text%2
> 522%253ELink%253C%252Fa%253E%253Cdiv%2520id%253D%2522text%2522%253EText%253
> C%252Fdiv%253E%250A
> 
> I'm not sure whether a fragment-only reference in the document whose
> URI scheme does not accept relative references is valid,

I think the results in these cases are more or less undefined.

> but I think that resolution (#text -> data:#text) is somewhat odd.

I think it can be argued to make sense: the link in your doc is "#text" and 
when one makes a new absolute URI using that as a relative URI reference using 
a data: URI as the base, it becomes "data:#text" because the data: base URI 
does not support relative references and thus its whole scheme specific part 
becomes "#text".  (By the way FWIW I suppose data: URIs do not support 
fragment identifiers in the first place either, which adds another layer of 
undefinedness.)  Ditto if one would try to convert a non-fragment relative URI 
to an absolute one using a data: URI as the base (e.g. "test" with your URI 
above as the base would resolve to "data:test").

The behavior of link checker in this case comes pretty much as is from the 
perl URI module, I suggest discussing with its author or reporting a bug if 
you think this is incorrect or could be improved.  
http://search.cpan.org/dist/URI/

Received on Sunday, 21 February 2010 12:57:28 UTC