This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 980 - This Page Is Valid -//W3C//DTD XHTML 1.1 Strict//EN! even if it's not valid XHTML 1.1
Summary: This Page Is Valid -//W3C//DTD XHTML 1.1 Strict//EN! even if it's not valid X...
Status: RESOLVED FIXED
Alias: None
Product: Validator
Classification: Unclassified
Component: check (show other bugs)
Version: 0.6.7
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Terje Bless
QA Contact: qa-dev tracking
URL: http://validator.w3.org/check
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-04 10:39 UTC by Bohdan Cech
Modified: 2005-02-04 19:06 UTC (History)
1 user (show)

See Also:


Attachments

Description Bohdan Cech 2005-01-04 10:39:54 UTC
If the page have this doctype declaration:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

validator says:
This Page Is Valid -//W3C//DTD XHTML 1.1 Strict//EN!

even if it is not valid XHTML 1.1, The page wasn't even valid XHTML 1.0 Strict ..
Comment 1 Bohdan Cech 2005-01-04 10:41:21 UTC
You can try http://validator.w3.org/check?uri=http%3A%2F%2Fwww.valxdater.net%2F
Comment 2 Bj 2005-01-04 11:45:03 UTC
I am not sure what the problem is, the public identifier for XHTML 1.1 is "-
//W3C//DTD XHTML 1.1//EN" (no Strict as there is no XHTML 1.1 Strict document 
type) which is all the Validator says. Since the Validator does not know the 
public identifier, it echoes it rather than using a more friendly identifier. 
It would be better if the Validator pointed out the problem of using an 
unrecognized document type declaration, is that your point?
Comment 3 Bohdan Cech 2005-01-04 12:51:47 UTC
(In reply to comment #2)
> I am not sure what the problem is, the public identifier for XHTML 1.1 is "-
> //W3C//DTD XHTML 1.1//EN" (no Strict as there is no XHTML 1.1 Strict document 
> type) which is all the Validator says. Since the Validator does not know the 
> public identifier, it echoes it rather than using a more friendly identifier. 
> It would be better if the Validator pointed out the problem of using an 
> unrecognized document type declaration, is that your point?

Well It should not say that it is Valid, if it's not even valid againts existing
dtd given there .. After validating that page validator says that the page is
perfectly valid and you can use logo W3C XHTML 1.1 on this page .. IMHO it is 
incorrect as well ..
It propably should not say anything about validity of the document if it doesnt
know type of the document?
Comment 4 Bj 2005-01-04 12:58:47 UTC
Aha, I see, that's a known problem, the Validator falls back to XHTML 1.0 
Transitional for XHTML documents with an unknown public identifier, this is 
fixed in the current development version. The Validator now validates the 
document against the referenced XHTML 1.0 Strict document type definition.
Comment 5 Ian 'Hixie' Hickson 2005-01-28 11:31:11 UTC
If the validator doesn't recognise the DOCTYPE, it should not assume anything. 
At the moment, validating something that says:

   <!DOCTYPE html PUBLIC "-//TEST/VALIDATE ME//EN" "http://example.com/">

...always says it is valid. It should either download the DTD and validate 
against that, or claim it cannot validate it. It should definitely never 
validate against something other than the specified DTD.
Comment 6 Bj 2005-01-28 11:37:10 UTC
> At the moment, validating something that says:
>    <!DOCTYPE html PUBLIC "-//TEST/VALIDATE ME//EN" "http://example.com/">
> ...always says it is valid.

I am unable to reproduce this problem, it rather says

Line 1, column 46: invalid formal public identifier "-//TEST/VALIDATE ME//EN": 
no SPACE after public text class

Line 1, column 69: DTD did not contain element declaration for document type 
name

...
Comment 7 Ian 'Hixie' Hickson 2005-01-28 11:59:05 UTC
Here's a testcase:

   http://www.hixie.ch/tests/adhoc/xml/validating/001.xml

When I validate it at:

   http://validator.w3.org/check?uri=http%3A%2F%2Fwww.hixie.ch%2Ftests%2Fadhoc%
2Fxml%2Fvalidating%2F001.xml

...I get:

   This Page Is Valid -//TEST//VALIDATE ME//EN!

Is this fixed in the latest version?
Comment 8 Bj 2005-01-28 12:12:19 UTC
See http://qa-dev.w3.org/wmvs/HEAD/check?
uri=http://www.hixie.ch/tests/adhoc/xml/validating/001.xml

The Validator does not support resolution of relative references as system 
identifiers hence the error. If you change it to use some supported system 
identifier, it should at least complain about the missing declarations. So
yes, it's fixed to the extend that the Validator does not silently ignore such 
problems.
Comment 9 Ian 'Hixie' Hickson 2005-01-28 12:55:33 UTC
Ah indeed, that version doesn't seem to have this bug. Thanks!
Comment 10 Terje Bless 2005-02-04 19:06:09 UTC
Current CVS HEAD will twig to the parse mode from the Content-Type if the
DOCTYPE Declaration is missing or bogus, fall back to the appropriate
Transitional DTD, and warn you of this fact.