W3C home > Mailing lists > Public > www-validator@w3.org > August 2004

Re: Differences between validator output and nsgmls output

From: David Dorward <david@dorward.me.uk>
Date: Wed, 4 Aug 2004 13:30:41 +0100
Message-Id: <193448A8-E612-11D8-9C19-000A957E4F00@dorward.me.uk>
Cc: www-validator@w3.org
To: Jirka Kosek <jirka@kosek.cz>

On 4 Aug 2004, at 13:14, Jirka Kosek wrote:

> http://www.pixy.cz/blogg/clanky/w3-validator-bugs/valid.html
> you will get no errors. But there are several errors in this page 
> (unclosed A element, unquoted attribute value)

I'm guessing that we are hitting the magic of self closing tags.

Try validating again, but turn on the Parse Tree option. That makes 
things a bit clearer.

 From the HTML specification:

     In certain cases, authors may specify the value of
     an attribute without any quotation marks. The attribute
     value may only contain letters (a-z and A-Z), digits
     (0-9), hyphens (ASCII decimal 45), periods (ASCII
     decimal 46), underscores (ASCII decimal 95), and
     colons (ASCII decimal 58).

The anchor is:

    <A HREF=http://www.example.com>

Now - this bit is fine:

   <A HREF=http:

as it doesn't include any characters which aren't allowed to be 

Then we hit:


which acts as a self closing tag. The rest of it is just in free text. 
So it ends up being the same as:

   <a href="http:"></a>www.example.com>

and the > character doesn't have to be escaped to &gt; here either.

Why your local copy of nsgmls gets this wrong, I'm not sure. I only 
have a slight glimmering of the darker sides of SGML.
Received on Wednesday, 4 August 2004 08:30:47 UTC

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