W3C home > Mailing lists > Public > www-validator-cvs@w3.org > February 2008

perl/modules/W3C/LinkChecker/bin checklink,4.91,4.92

From: Ville Skytta via cvs-syncmail <cvsmail@w3.org>
Date: Sun, 10 Feb 2008 18:14:02 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1JOGgk-0003wM-0h@lionel-hutz.w3.org>

Update of /sources/public/perl/modules/W3C/LinkChecker/bin
In directory hutz:/tmp/cvs-serv14624

Modified Files:
	checklink 
Log Message:
Set XML parsing mode also based on Content-Type in addition to public ID,
relax public ID matching for XML mode so that it catches XHTML Mobile,
XHTML-Print and XHTML+RDFa.


Index: checklink
===================================================================
RCS file: /sources/public/perl/modules/W3C/LinkChecker/bin/checklink,v
retrieving revision 4.91
retrieving revision 4.92
diff -u -d -r4.91 -r4.92
--- checklink	10 Feb 2008 18:10:31 -0000	4.91
+++ checklink	10 Feb 2008 18:13:59 -0000	4.92
@@ -1353,6 +1353,8 @@
   # for right now.
   $$docref =~ s/\<\?(xml:stylesheet.*?)\?\>/\<$1\>/ unless $p->{only_anchors};
 
+  $p->xml_mode(1) if ($response->content_type() =~ /\+xml$/);
+
   $p->parse($$docref)->eof();
   $response->content("");
 
@@ -1425,8 +1427,9 @@
       m%^-//W3C//DTD HTML 3\.2//%) {
     $self->{check_id} = 0;
   }
-  # Enable XML extensions
-  $self->xml_mode(1) if (m%^-//W3C//DTD XHTML %);
+
+  # Enable XML mode (XHTML, XHTML Mobile, XHTML-Print, XHTML+RDFa, ...)
+  $self->xml_mode(1) if (m%^-//(W3C|WAPFORUM)//DTD XHTML[ \-\+]%);
 
   return;
 }
Received on Sunday, 10 February 2008 18:14:11 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 26 April 2012 12:55:00 GMT