Re: Differences between validator output and nsgmls output

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 
unquoted.

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