W3C home > Mailing lists > Public > www-validator@w3.org > November 2001

Re: Problem in HTML, or bug in Wc# validator?

From: Gannon Dick <gdick@gte.net>
Date: Sat, 17 Nov 2001 12:07:59 -0600
Message-ID: <000601c16f92$cbb91fa0$fb89e041@home2>
To: <www-validator@w3.org>
To 'upgrade' this test page for the obsessive-compulsive ...

<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "C:\Validation\xhtml1\DTD\xhtml1-strict.dtd">
<?xml-stylesheet type="text/css" href="#internalcss"?>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
  <title>Just a test</title>
  <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
  <style id="internalcss" type="text/css" xml:space="preserve">
   .foo {color:#006666; background-color:#ffffff;}
  <h1 class="foo">Test 1</h1>
  <h2 class="foo">Test 2</h2>

But there is a problem ...

Below are the results of checking this document for XML well-formedness and validity. 
Line 8, column 12: 
    <style id="internalcss" type="text/css" xml:space="preserve">
Error: there is no attribute "id" for this element (in this HTML version) 

Oh yes there is Mr. Validator ...

(from the XHTML 1.0 Strict DTD)

<!-- style info, which may include CDATA sections -->
<!ELEMENT style (#PCDATA)>
<!ATTLIST style
  id          ID             #IMPLIED
  type        %ContentType;  #REQUIRED
  media       %MediaDesc;    #IMPLIED
  title       %Text;         #IMPLIED
  xml:space   (preserve)     #FIXED 'preserve'

Unless of course the Catalog DTD is out of date or incorrect, or the Validator
 is actually using it's own (incorrect) version (SP actually does use a copy, not the original doesn't it ?)


This notation might be a SAX (rather than DOM) parser problem of the XML processing instruction 
not being matched to the implicit internal link.

Anybody have any ideas ?

Received on Saturday, 17 November 2001 13:06:11 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 14:17:31 UTC