Re: 183: reference to non-existent ID X

On Sat, 6 Jan 2007, dNk wrote:

> Probably I misunderstood something, but my basic idea is that a page is
> valid if it does not contain any errors and it can contain warnings.

Basically, yes.

By definition, an SGML or XML document is valid if has a DTD and it does 
not contain reportable markup errors. What a validator issues as an error 
message should indicate a reportable markup error. What it issues as a 
warning is, formally at least, irrelevant to validation and not really 
part of the validation process proper.

> <label for='misspelledid'>My Label</label> <input name='correctid'
> id='correctid' /> <input type='submit' value='Send' />

There you have a reportable markup error, since the for="..." attribute is 
declared with an IDREF value, which means that the value must refer to an 
identifier defined in the document, and there is no id='misspelledid' 
attribute in the document.

> The Markup Validator said, that "Result: Failed Validation, 0 error". I
> had a warning tough: 1. Warning Line 20 column 12: reference to
> non-existent ID "misspelledid". So this warning with the ID 183, must be
> an error not a warning if I'm correct.

You are correct. There is some inconstency in the validator's handling of 
errors and warnings, since apparently the markup error is detected and 
the status of validation result set so that "Failed Validation" is issued, 
in addition to the specific error message - which is really an error 
message ("This error..."), though incorrectly labeled as "Warning".

-- 
Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/

Received on Sunday, 7 January 2007 19:54:29 UTC