Skip Menu |

This queue is for tickets about the XML-FOAF CPAN distribution.

Report information
The Basics
Id: 8726
Status: new
Priority: 0/
Queue: XML-FOAF

People
Owner: Nobody in particular
Requestors: iwai [...] alib.jp
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: 0.02



Subject: handling new FOAF Autodiscovery syntax
XML::FOAF 0.02 can't understand new FOAF Autodiscovery syntax. example: <link rel="meta FOAF.MAKER" type="application/rdf+xml" title="FOAF" href="foaf.rdf"/> <http://rdfweb.org/topic/Autodiscovery> This patch handlings FOAF.MAKER rel type in link tag.
diff -uNr XML-FOAF-0.02.orig/lib/XML/FOAF.pm XML-FOAF-0.02/lib/XML/FOAF.pm --- XML-FOAF-0.02.orig/lib/XML/FOAF.pm 2003-06-25 07:35:40.000000000 +0900 +++ XML-FOAF-0.02/lib/XML/FOAF.pm 2004-12-03 23:23:55.000000000 +0900 @@ -82,10 +82,13 @@ my $find_links = sub { my($tag, $attr) = @_; $foaf_url = $attr->{href} - if $tag eq 'link' && - $attr->{rel} eq 'meta' && - $attr->{type} eq 'application/rdf+xml' && - $attr->{title} eq 'FOAF'; + if ($tag eq 'link' && + $attr->{rel} eq 'meta' && + $attr->{type} eq 'application/rdf+xml' && + $attr->{title} eq 'FOAF') + || ($tag eq 'link' && + $attr->{rel} =~ m/FOAF\.MAKER/ && + $attr->{type} eq 'application/rdf+xml') }; require HTML::Parser; my $p = HTML::Parser->new(api_version => 3,