W3C home > Mailing lists > Public > www-validator@w3.org > October 2000

[PATCH] Labeled XML fix

From: Terje Bless <link@tss.no>
Date: Tue, 03 Oct 2000 05:12:31 +0200
Message-ID: <39D94E9F.A5052047@tss.no>
To: W3C Validator <www-validator@w3.org>
Here is a patch for the bug that made the validator choke on explicitly
labeled XML. The patch isn't tested, but I've been running the code in
my development branch for while (and it's pretty trivial) so there
shouldn't be any problems.
Index: check
===================================================================
RCS file: /sources/public/validator/httpd/cgi-bin/check,v
retrieving revision 1.67
diff -u -r1.67 check
--- check	2000/09/29 09:19:07	1.67
+++ check	2000/10/03 03:08:46
@@ -345,8 +345,9 @@
     $xmlflags            .= '-wno-valid ';
   }
   $decl                  = $xhtmldecl;
-} elsif ($guessed_doctype == 2) { # no doctype, with xmlns attr on 1st element
-  $File->{Type} = 'xml';	# @@ probably a better way to do this
+} elsif ($File->{Type} eq 'xml' or $guessed_doctype == 2) {
+  # no doctype, with xmlns attr on 1st element
+  $File->{Type} = 'xml'; # @@ probably a better way to do this
   $ENV{SGML_CATALOG_FILES} = $sgmlstuff . '/sp-1.3/pubtext/xml.soc';
   $ENV{SGML_SEARCH_PATH} = $sgmlstuff . '/sp-1.3/pubtext/';
   $ENV{SP_CHARSET_FIXED} = 'YES';
Received on Monday, 2 October 2000 23:12:05 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:13:54 GMT